canonical / charm-cloudsupport

Support charm for OpenStack operations. It's main purpose is to package common tasks into easy-to-use actions.
Other
0 stars 2 forks source link

Error after upgrading to revision 5, can't downgrade to revision 4 #8

Closed jneo8 closed 1 month ago

jneo8 commented 8 months ago

After upgrading cloudsupport from revision 4 to 5, the unit ended up in the error/idle state, with the following error:

Traceback (most recent call last): File "./src/charm.py", line 8, in from lib_cloudsupport import CloudSupportHelper File "/var/lib/juju/agents/unit-cloudsupport-0/charm/lib/lib_cloudsupport.py", line 16, in from openstack.exceptions import SDKException File "/var/lib/juju/agents/unit-cloudsupport-0/charm/venv/openstack/init.py", line 17, in import openstack.config File "/var/lib/juju/agents/unit-cloudsupport-0/charm/venv/openstack/config/init.py", line 17, in from openstack.config.loader import OpenStackConfig # noqa File "/var/lib/juju/agents/unit-cloudsupport-0/charm/venv/openstack/config/loader.py", line 28, in from keystoneauth1 import adapter File "/var/lib/juju/agents/unit-cloudsupport-0/charm/venv/keystoneauth1/init.py", line 16, in version = pbr.version.VersionInfo('keystoneauth1').version_string() File "/var/lib/juju/agents/unit-cloudsupport-0/charm/venv/pbr/version.py", line 500, in version_string return self.semantic_version().brief_string() File "/var/lib/juju/agents/unit-cloudsupport-0/charm/venv/pbr/version.py", line 493, in semantic_version self._semantic = self._get_version_from_importlib_metadata() File "/var/lib/juju/agents/unit-cloudsupport-0/charm/venv/pbr/version.py", line 478, in _get_version_from_importlib_metadata return SemanticVersion.from_pip_string(result_string) File "/var/lib/juju/agents/unit-cloudsupport-0/charm/venv/pbr/version.py", line 151, in from_pip_string return klass._from_pip_string_unsafe(version_string) File "/var/lib/juju/agents/unit-cloudsupport-0/charm/venv/pbr/version.py", line 158, in _from_pip_string_unsafe version_string = version_string.lstrip('vV') AttributeError: 'NoneType' object has no attribute 'lstrip'

I couldn't find any workaround for this issue yet. Also, the charm can't be downgraded to v4 because of the following issue:

$ juju upgrade-charm --switch ch:cloudsupport-4 cloudsupport --channel latest/edge Added charm-hub charm "cloudsupport", revision 4 in channel edge, to the model ERROR cannot downgrade from v2 charm format to v1


Imported from Launchpad using lp2gh.

jneo8 commented 8 months ago

(by przemeklal) Versions:

$ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.4 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.4 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal

$ dpkg -l | grep openstack ii python3-openstackclient 5.2.0-0ubuntu1 all OpenStack Command-line Client - Python 3.x ii python3-openstacksdk 0.46.0-0ubuntu1 all SDK for building applications to work with OpenStack - Python 3.x

Pjack commented 1 month ago

Update from https://bugs.launchpad.net/charm-cloudsupport/+bug/1991518

Hi, we have also come across this bug and it seems to be a juju issue rather than a Charm issue: https://bugs.launchpad.net/juju/+bug/2058335

You can work around it by removing the old version of the library: https://github.com/canonical/github-runner-operator/pull/291