VolumesListTestJSON fails with "AssertionError: Could not find volumes ... in expected list"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tempest |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Seen here:
2017-12-21 13:32:44.399319 | primary | Captured traceback:
2017-12-21 13:32:44.399336 | primary | ~~~~~~~~~~~~~~~~~~~
2017-12-21 13:32:44.399357 | primary | b'Traceback (most recent call last):'
2017-12-21 13:32:44.399395 | primary | b' File "/opt/stack/
2017-12-21 13:32:44.399427 | primary | b' self.assertVolu
2017-12-21 13:32:44.399464 | primary | b' File "/opt/stack/
2017-12-21 13:32:44.399487 | primary | b' [str_vol(v) for v in fetched_list]))'
2017-12-21 13:32:44.399524 | primary | b' File "/opt/stack/
2017-12-21 13:32:44.399546 | primary | b' raise self.failureExc
2017-12-21 13:32:44.399704 | primary | b"AssertionError: Could not find volumes ['fd31d767-
2017-12-21 13:32:44.399719 | primary | b''
Looks like it's maybe a problem with the updated_at getting changed?
91 hits in 10 days, check and gate, all failures.
Changed in cinder: | |
status: | New → Confirmed |
importance: | Undecided → High |
Changed in cinder: | |
assignee: | nobody → Peter Penchev (openstack-dev-s) |
Changed in tempest: | |
status: | New → Fix Committed |
no longer affects: | cinder |
Hi,
This bug also came up earlier today in the StorPool third-party CI, see http:// logs.ci- openstack. storpool. com/96/ 529396/ 1/silent/ dsvm-tempest- storpool/ afa6b8a/
I think I may have found the cause. Tempest sends a request to create the volume, then repeatedly sends information requests about the volume id it got back until it sees the volume in the "available" status. However, it seems that the first time the volume gets into the "available" status is not the end of the Cinder flow: there are more actions to be taken later. In both my logs and the gate failure that mriedem originally saw, the "updated_at" field of the volume seems to be updated last by the CreateVolumeOnF inishTask. execute( ) method in cinder/ volume/ flows/manager/ create_ volume. py - the timestamp is the same as the timestamp of the "Volume {name} ({id}) created successfully" message in the screen-c-vol.txt logfile.
So Tempest gets the first "available" status with an early "updated_at" value, caches it in its list of created volumes, then goes off to do some more tests. In the meantime, Cinder finishes its create volume flow and updates the "updated_at" field again. Later, Tempest gets to the test_volume_ list_with_ details test, compares the new updated_at value with the one it has cached, and it fails.
I'm not sure what the right thing to do is here; an obvious workaround would be to let Tempest ignore the "updated_at" field in its comparison (e.g. set it to the value in its cached list). I could whip up a quick patch if people think it's worthwhile.
Best regards,
Peter