Traceback (most recent call last):
File "/usr/local/bin/run_allocation_checks.py", line 220, in
main()
File "/usr/local/bin/run_allocation_checks.py", line 214, in main
alerts = check_allocations(connection, placement_client)
File "/usr/local/bin/run_allocation_checks.py", line 99, in check_allocations
instances = get_instances(connection, placement_client)
File "/usr/local/bin/run_allocation_checks.py", line 71, in get_instances
nova_instances = get_nova_instances(connection)
File "/usr/local/bin/run_allocation_checks.py", line 41, in get_nova_instances
for vm in compute.servers(details=True, all_projects=True):
File "/usr/lib/python3/dist-packages/openstack/resource.py", line 883, in list
cls._query_mapping._validate(params, base_path=cls.base_path)
File "/usr/lib/python3/dist-packages/openstack/resource.py", line 252, in _validate
extra_data=invalid_keys)
openstack.exceptions.InvalidResourceQuery: Invalid query params: all_projects
This appears to be an artifact related to the version of python3-openstacksdk which ships with Bionic, which I presently see as 0.11.3+repack-0ubuntu1.
As the o-s-c charm doesn't appear to have a charmed way of pulling packages from UCA, the workaround is to upgrade to Focal, which currently has version 0.46.0-0ubuntu1 of python3-openstacksdk and should not be affected by the issue.
Suggestion for fix: consider only rendering this check on Focal or newer, and adding an appropriate note in config.yaml re: this restriction.
Affects: Bionic
Workaround: Upgrade to Focal
Description: The /usr/local/bin/run_allocation_checks.py script, run by /etc/cron.d/osc_allocations, fails on Bionic, giving this traceback:
sudo -u nagios /usr/local/bin/run_allocation_checks.py
Traceback (most recent call last): File "/usr/local/bin/run_allocation_checks.py", line 220, in
main()
File "/usr/local/bin/run_allocation_checks.py", line 214, in main
alerts = check_allocations(connection, placement_client)
File "/usr/local/bin/run_allocation_checks.py", line 99, in check_allocations
instances = get_instances(connection, placement_client)
File "/usr/local/bin/run_allocation_checks.py", line 71, in get_instances
nova_instances = get_nova_instances(connection)
File "/usr/local/bin/run_allocation_checks.py", line 41, in get_nova_instances
for vm in compute.servers(details=True, all_projects=True):
File "/usr/lib/python3/dist-packages/openstack/resource.py", line 883, in list
cls._query_mapping._validate(params, base_path=cls.base_path)
File "/usr/lib/python3/dist-packages/openstack/resource.py", line 252, in _validate
extra_data=invalid_keys)
openstack.exceptions.InvalidResourceQuery: Invalid query params: all_projects
This appears to be an artifact related to the version of python3-openstacksdk which ships with Bionic, which I presently see as 0.11.3+repack-0ubuntu1.
As the o-s-c charm doesn't appear to have a charmed way of pulling packages from UCA, the workaround is to upgrade to Focal, which currently has version 0.46.0-0ubuntu1 of python3-openstacksdk and should not be affected by the issue.
Suggestion for fix: consider only rendering this check on Focal or newer, and adding an appropriate note in config.yaml re: this restriction.
Imported from Launchpad using lp2gh.
date created: 2022-10-14T16:43:14Z
owner: vultaire
assignee: jneo8
the launchpad url