Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_os_codename_package returns an empty object if your Ubuntu release does not have a package named "openstack-release" #907

Open
jadonn opened this issue Jul 11, 2024 · 0 comments

Comments

@jadonn
Copy link

jadonn commented Jul 11, 2024

I am cross-posting this bug from a bug report on the Ceilometer charm bug tracker. In that bug the user is running OpenStack on Focal and attempted an upgrade. The charm threw an exception in the CompareOpenStackReleases class, but the problem lies in the call to get_os_codename_package right before the call for CompareOpenStackReleases.

It looks to me that if you do not have a package called "openstack-release" available for your Ubuntu release that get_os_codename_package returns an empty object {} instead of failing. The package exists on Jammy, Mantic, Noble, and Oracular, but not Focal.

I think one problem lies in the openstack_release method on the CompareOpenStackReleases class passing on a FileNotFound exception. There should be a FileNotFound exception when the script attempts to access /etc/openstack-release since that file will not exist if there is no openstack-release package. There are also several fatal=False arguments that could have caused the lack of a package to break this flow sooner.

Overall, this particular bit of logic probably needs better safeguards for when there is not an openstack-release package available for your Ubuntu release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant