openstack-tox-py3N jobs continously fails

Bug #1974682 reported by Takashi Kajinami
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
Undecided
Unassigned
Wallaby
Fix Released
High
Unassigned
Xena
Fix Released
High
Unassigned
Yoga
Fix Released
High
Unassigned
python-aodhclient
Confirmed
High
Unassigned
aodh (Ubuntu)
Fix Released
Undecided
Unassigned
Jammy
Fix Released
High
Unassigned
python-aodhclient (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
these changes fix the aodhclient functional tests and are needed
in order for packages such as aodh to be able to run their tests.

[Test Plan]
run aodh tempest/functional tests

[Regression Potential]
no regressions expected and aodh CI func tests should pass once this lands

--------------------------------------------------------------------------

Currently openstack-tox-py36/9 jobs are both broken.

Debugging the failures, I suspect the recent change in aodh is causing the problem.

https://review.opendev.org/c/openstack/aodh/+/829870

~~~
aodhclient.tests.functional.test_alarm.AodhClientGnocchiRulesTest.test_update_gnaggrresthr_gnaggrmetricthr
----------------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/home/tkajinam/git/openstack/python-aodhclient/aodhclient/tests/functional/test_alarm.py", line 837, in test_update_gnaggrresthr_gnaggrmetricthr
    result = self.aodh(

      File "/home/tkajinam/git/openstack/python-aodhclient/aodhclient/tests/functional/base.py", line 67, in aodh
    return self.clients.aodh(*args, **kwargs)

      File "/home/tkajinam/git/openstack/python-aodhclient/aodhclient/tests/functional/base.py", line 43, in aodh
    return base.execute("aodh", action, flags, params, fail_ok,

      File "/home/tkajinam/git/openstack/python-aodhclient/.tox/py39/lib/python3.9/site-packages/tempest/lib/cli/base.py", line 63, in execute
    raise exceptions.CommandFailed(proc.returncode,

    tempest.lib.exceptions.CommandFailed: Command '['/home/tkajinam/git/openstack/python-aodhclient/.tox/py39/bin/aodh', '--os-auth-plugin', 'aodh-noauth', '--user-id', 'f4a65d12-7e8f-489c-92a3-36d2da311441', '--project-id', '20b9ebcd-d704-4c9c-89e2-df691f3bfba5', '--aodh-endpoint', 'http://localhost:8042', 'alarm', 'create', '--type', 'gnocchi_aggregation_by_resources_threshold', '--name', 'alarm123', '--metric', 'cpu', '--threshold', '80', '--query', '{"=": {"creator": "cr3at0r"}}', '--resource-type', 'generic', '--aggregation-method', 'last']' returned non-zero exit status 1.
stdout:
b''
stderr:
b'{\'cause\': \'Invalid input\', \'reason\': "\'aggregate\' operation invalid for dictionary value @ data[\'operations\']", \'detail\': [\'operations\']} (HTTP 400) (Request-ID: req-8fcf38cd-76c3-404d-9ec1-c0f27eed8264)\n'
~~~

Matthias Runge (mrunge)
Changed in python-aodhclient:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Hemanth Nakkina (hemanth-n) wrote :

I debugged this a bit and the error is because of some wrong params in the aodh call and the metrics does not exist in functional test

Metrics list shows empty

$ .tox/py3/bin/gnocchi --os-auth-type gnocchi-basic --user admin --endpoint http://localhost:8051 metric list

alarm create --type gnocchi_aggregation_by_resources_threshold says cpu metrics not found

$ .tox/py3/bin/aodh --os-auth-plugin aodh-noauth --user-id 0c64700f-6926-4e6f-b966-391e75682adb --project-id c18b0723-c075-41d2-a96e-d82317a9d98d --aodh-endpoint http://localhost:8042 alarm create --type gnocchi_aggregation_by_resources_threshold --name alarm1 --metric cpu --threshold 80 --query '{"=": {"creator": "admin"}}' --resource-type generic --aggregation-method mean
{'cause': 'Metrics not found', 'detail': ['cpu']} (HTTP 400) (Request-ID: req-dec0afc1-d2da-4d5b-82bc-96474a2bd674)

Revision history for this message
Hemanth Nakkina (hemanth-n) wrote :

Hi after looking a bit more, this is already fixed in gnocchi master branch here [1]

Currently the change is not part of any stable branch or release but is on master of gnocchi.
Also comment #2 in [1] mentions of release of 4.5 which did not happened.

I beleive we should request gnocchi team for a release which should resolve this problem.

[1] https://github.com/gnocchixyz/gnocchi/pull/1202

Revision history for this message
Takashi Kajinami (kajinamit) wrote (last edit ):

AFAIK we are not using the latest gnocchi but the released version in our unit/functional tests. So it should not be affected by the change made only in master.

I think the problem is that you did not update the ignored return code properly. I'll propose a fix for that.

Revision history for this message
Takashi Kajinami (kajinamit) wrote :

Hmm... wait. it seems I was looking at something wrong. Let me give it another thought.

Revision history for this message
Takashi Kajinami (kajinamit) wrote :

Let me re-summarize the situation.

So it was definitely the change[1] which introduced this test failure.

 [1] https://review.opendev.org/c/openstack/aodh/+/829870

This works with Gnocchi >=4.5 (which is not yet released) but breaks
compatibility with Gnocchi <=4.4 and to make it work with Gnocchi <=4.4,
we should ignore 400 as well as 404.

Currently unit/functional tests in aodh is pulling gnocchi from pypi so
the tests are using not master but 4.4.z which is the latest release,
and are hitting the issue.

Revision history for this message
Hemanth Nakkina (hemanth-n) wrote :

Thanks Takashi for submitting the following patch on aodh project - https://review.opendev.org/c/openstack/aodh/+/843764

Here is the followup aodhclient patch to make functional tests work
https://review.opendev.org/c/openstack/python-aodhclient/+/843776

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-aodhclient 3.0.0

This issue was fixed in the openstack/python-aodhclient 3.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/aodh 15.0.0.0rc1

This issue was fixed in the openstack/aodh 15.0.0.0rc1 release candidate.

Changed in python-aodhclient (Ubuntu):
status: New → Fix Released
Changed in python-aodhclient (Ubuntu Jammy):
status: New → Triaged
importance: Undecided → High
Changed in cloud-archive:
status: New → Fix Released
Revision history for this message
Corey Bryant (corey.bryant) wrote : Please test proposed package

Hello Takashi, or anyone else affected,

Accepted aodh into xena-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:xena-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-xena-needed to verification-xena-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-xena-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-xena-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Takashi, or anyone else affected,

Accepted aodh into wallaby-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:wallaby-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-wallaby-needed to verification-wallaby-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-wallaby-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-wallaby-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote :
tags: added: verification-wallaby-done verification-xena-done
removed: verification-wallaby-needed verification-xena-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote : Update Released

The verification of the Stable Release Update for aodh has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package aodh - 1:13.0.0-0ubuntu2~cloud1
---------------

 aodh (1:13.0.0-0ubuntu2~cloud1) focal-xena; urgency=medium
 .
   * gnocchi: Use Dynamic Aggregates API (LP: #1946793, LP: #1974682)
     - d/p/0001-Bump-minimum-version-of-gnocchiclient-for-aggregats-.patch
     - d/p/0002-Ignore-Gnocchi-API-error-when-the-metric-is-not-yet-.patch
     - d/p/0003-gnocchi-Use-Dynamic-Aggregates-API.patch
     - d/control: Align min version of python3-gnocchiclient with patch above.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

The verification of the Stable Release Update for aodh has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package aodh - 1:12.0.0-0ubuntu1~cloud2
---------------

 aodh (1:12.0.0-0ubuntu1~cloud2) focal-wallaby; urgency=medium
 .
   * gnocchi: Use Dynamic Aggregates API (LP: #1946793, LP: #1974682)
     - d/p/0001-Bump-minimum-version-of-gnocchiclient-for-aggregats-.patch
     - d/p/0002-Ignore-Gnocchi-API-error-when-the-metric-is-not-yet-.patch
     - d/p/0003-gnocchi-Use-Dynamic-Aggregates-API.patch
     - d/control: Align min version of python3-gnocchiclient with patch above.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/aodh 13.1.0

This issue was fixed in the openstack/aodh 13.1.0 release.

Changed in aodh (Ubuntu Jammy):
status: New → Triaged
importance: Undecided → High
Changed in aodh (Ubuntu):
status: New → Fix Released
no longer affects: python-aodhclient (Ubuntu Jammy)
description: updated
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Takashi, or anyone else affected,

Accepted aodh into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/aodh/1:14.0.0-0ubuntu1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in aodh (Ubuntu Jammy):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Takashi, or anyone else affected,

Accepted aodh into yoga-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:yoga-proposed
  sudo apt-get update

Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-yoga-needed to verification-yoga-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-yoga-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-yoga-needed
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

I verified this by checking code directly installed in aodh unit. and checked metric command if there is no issue

please let me know if there is anything

i aodh-api 1:14.0.0-0ubuntu1.1~cloud0 all OpenStack Telemetry (Ceilometer) Alarming - API server
ii aodh-common 1:14.0.0-0ubuntu1.1~cloud0 all OpenStack Telemetry (Ceilometer) Alarming - common files
ii aodh-evaluator 1:14.0.0-0ubuntu1.1~cloud0 all OpenStack Telemetry (Ceilometer) Alarming - alarm evaluator
ii aodh-expirer 1:14.0.0-0ubuntu1.1~cloud0 all OpenStack Telemetry (Ceilometer) Alarming - expirer
ii aodh-listener 1:14.0.0-0ubuntu1.1~cloud0 all OpenStack Telemetry (Ceilometer) Alarming - listener
ii aodh-notifier 1:14.0.0-0ubuntu1.1~cloud0 all OpenStack Telemetry (Ceilometer) Alarming - alarm notifier
ii python3-aodh 1:14.0.0-0ubuntu1.1~cloud0 all OpenStack Telemetry (Ceilometer) Alarming - Python 3 libraries

tags: added: verification-yoga-done
removed: verification-yoga-needed
Revision history for this message
Seyeong Kim (seyeongkim) wrote :

the same for jammy

ii aodh-api 1:14.0.0-0ubuntu1.1 all OpenStack Telemetry (Ceilometer) Alarming - API server
ii aodh-common 1:14.0.0-0ubuntu1.1 all OpenStack Telemetry (Ceilometer) Alarming - common files
ii aodh-doc 1:14.0.0-0ubuntu1.1 all OpenStack efficient metering counters system - doc
ii aodh-evaluator 1:14.0.0-0ubuntu1.1 all OpenStack Telemetry (Ceilometer) Alarming - alarm evaluator
ii aodh-expirer 1:14.0.0-0ubuntu1.1 all OpenStack Telemetry (Ceilometer) Alarming - expirer
ii aodh-listener 1:14.0.0-0ubuntu1.1 all OpenStack Telemetry (Ceilometer) Alarming - listener
ii aodh-notifier 1:14.0.0-0ubuntu1.1 all OpenStack Telemetry (Ceilometer) Alarming - alarm notifier
ii python3-aodh 1:14.0.0-0ubuntu1.1 all OpenStack Telemetry (Ceilometer) Alarming - Python 3 libraries

Revision history for this message
Edward Hope-Morley (hopem) wrote :

i have updated the jammy verification tags since it seems that was skipped in the previous comment

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ):

# aodh

I verified the test results and am satisfied that they show the executed planned test case, and that the results are correct.

The package built correctly in all architectures and Ubuntu releases it was meant for.

There are no DEP8 regressions.

There is no SRU freeze ongoing at the moment.

There is no halted phasing on the previous update.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package aodh - 1:14.0.0-0ubuntu1.1

---------------
aodh (1:14.0.0-0ubuntu1.1) jammy; urgency=medium

  [ Corey Bryant ]
  * d/gbp.conf: Create stable/yoga branch.

  [ Seyeong Kim ]
  * gnocchi: Use Dynamic Aggregates API (LP: #1974682)
    - d/p/0001-Bump-minimum-version-of-gnocchiclient-for-aggregats-.patch
    - d/p/0002-Ignore-Gnocchi-API-error-when-the-metric-is-not-yet-.patch
    - d/control: Align min version of python3-gnocchiclient with patch above.

 -- Seyeong Kim <email address hidden> Thu, 10 Nov 2022 11:21:30 +0900

Changed in aodh (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Corey Bryant (corey.bryant) wrote : Update Released

The verification of the Stable Release Update for aodh has completed successfully and the package has now been released to -updates. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package aodh - 1:14.0.0-0ubuntu1.1~cloud0
---------------

 aodh (1:14.0.0-0ubuntu1.1~cloud0) focal-yoga; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 aodh (1:14.0.0-0ubuntu1.1) jammy; urgency=medium
 .
   [ Corey Bryant ]
   * d/gbp.conf: Create stable/yoga branch.
 .
   [ Seyeong Kim ]
   * gnocchi: Use Dynamic Aggregates API (LP: #1974682)
     - d/p/0001-Bump-minimum-version-of-gnocchiclient-for-aggregats-.patch
     - d/p/0002-Ignore-Gnocchi-API-error-when-the-metric-is-not-yet-.patch
     - d/control: Align min version of python3-gnocchiclient with patch above.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/aodh 14.1.0

This issue was fixed in the openstack/aodh 14.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-aodhclient yoga-eom

This issue was fixed in the openstack/python-aodhclient yoga-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/aodh train-eol

This issue was fixed in the openstack/aodh train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-aodhclient train-eol

This issue was fixed in the openstack/python-aodhclient train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/aodh ussuri-eol

This issue was fixed in the openstack/aodh ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-aodhclient ussuri-eol

This issue was fixed in the openstack/python-aodhclient ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/aodh victoria-eom

This issue was fixed in the openstack/aodh victoria-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-aodhclient victoria-eom

This issue was fixed in the openstack/python-aodhclient victoria-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/aodh wallaby-eom

This issue was fixed in the openstack/aodh wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-aodhclient wallaby-eom

This issue was fixed in the openstack/python-aodhclient wallaby-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-aodhclient xena-eom

This issue was fixed in the openstack/python-aodhclient xena-eom release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.