Charm stuck in "Charm configuration in progress"

Hello charmers!

I’m currently writing a charm for our PowerFlex storage systems, the code looks fine and the application and integration with cinder works as expected.

However, after the application got deployed the status get stuck in waiting with a “Charm configuration in progress” although the configuration is complete.

I’m sharing the link to our charm and would appreciate if someone can help me to understand on how to fix it as it can be confusing for the operator. https://github.com/dell-esg/powerflex-cinder-charm/blob/main/src/charm.py

Without knowing how ops-sunbeam works it’s hard to tell. I’d try to figure out who’s setting that status and based on what parameters.

@jproque15130 Seems like you are hitting [1] Can you check if self._stored.is_started is set to True.

[1] https://opendev.org/openstack/charm-ops-openstack/src/commit/54dbb7f0002aff85dde83775838c537120c9498b/ops_openstack/core.py#L202

re what @hemanth-n is saying, you can verify that in three ways:

  • jhack show-stored mycharm/0
  • jhack eval mycharm/0 self._stored._is_started
  • add a print statement to the charm, repack, redeploy
1 Like

Hello, let me check and get back to you.

[quote=“ppasotti, post:4, topic:15984”] self._stored._is_started [/quote]Hello, not really sure to understand the output:

ubuntu@juju:~$ jhack eval cinder-dell-powerflex/0 --charm-name CinderPowerflexCharm self._stored._is_started
WARNING:jhack./snap/jhack/411/lib/python3.8/site-packages/jhack/conf/conf.py:failed to create default user config in /home/ubuntu/.config/jhack/config.toml. You'll have to do that manually.
WARNING:jhack./snap/jhack/411/lib/python3.8/site-packages/jhack/conf/conf.py:
 ** Jhack is now 'safe'! **
All dangerous commands require manual confirmation.

If you know better, you can run:
> `jhack conf [default | destructive | yolo] > ~/.config/jhack/config.toml`
and edit the config to match your needs.

See https://github.com/canonical/jhack?tab=readme-ov-file#enabling-devmode for more.
Proceed with this potentially world-ending command [y/N]: y
Connection to 10.19.119.4 closed.

But never got the prompt back

The other command fails with a permission denied error:

ubuntu@juju:~$ jhack show-stored cinder-dell-powerflex/0
WARNING:jhack./snap/jhack/411/lib/python3.8/site-packages/jhack/conf/conf.py:failed to create default user config in /home/ubuntu/.config/jhack/config.toml. You'll have to do that manually.
ERROR:jhack:failed to fetch db; command ['juju', 'scp', 'cinder-dell-powerflex/0:/var/lib/juju/agents/unit-cinder-dell-powerflex-0/charm/.unit-state.db', '/home/ubuntu/snap/jhack/411/unit-state-dxv2sb74.db'] exited with 1
failed to fetch db; aborting. b'ERROR exit status 1 (scp: /var/lib/juju/agents/unit-cinder-dell-powerflex-0/charm/.unit-state.db: Permission denied)\n'

have you connected the ssh plug? snap connections jhack

Yes with no effect.

oh wait, is it a reactive or otherwise non-ops charm? if so your only bet is figuring out how to use juju exec to grab the stored state via, presumably, the state-get hook tool?

Hi, it looks like the state is currently empty.

ubuntu@juju:~$ juju exec --unit cinder-dell-powerflex/0 -- state-get  --format yaml
{}

there is your answer @hemanth-n

I finally succeed to use jhack show-stored by changing permissions on /var/lib/juju/agents/unit-cinder-dell-powerflex-0/charm/.unit-state.db and here’s what I got:

ubuntu@juju:~$ jhack show-stored cinder-dell-powerflex/0
                                                                                                                                                                                                                                                       stored data v0.1
                                                                                                                                                                                                                                 ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
                                                                                                                                                                                                                                 ┃ CinderPowerflexCharm._stored                             ┃
                                                                                                                                                                                                                                 ┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
                                                                                                                                                                                                                                 │                                                          │
                                                                                                                                                                                                                                 │  handle:  CinderPowerflexCharm/StoredStateData[_stored]  │
                                                                                                                                                                                                                                 │    size:  436b                                           │
                                                                                                                                                                                                                                 │            <dict>                                        │
                                                                                                                                                                                                                                 │ ┏━━━━━━━━━━━━━━━━━━┳━━━━━━━┓                             │
                                                                                                                                                                                                                                 │ ┃ key              ┃ value ┃                             │
                                                                                                                                                                                                                                 │ ┡━━━━━━━━━━━━━━━━━━╇━━━━━━━┩                             │
                                                                                                                                                                                                                                 │ │ 'is_started'     │ False │                             │
                                                                                                                                                                                                                                 │ │ 'is_paused'      │ False │                             │
                                                                                                                                                                                                                                 │ │ 'series_upgrade' │ False │                             │
                                                                                                                                                                                                                                 │ └──────────────────┴───────┘                             │
                                                                                                                                                                                                                                 └──────────────────────────────────────────────────────────┘

1 Like