test failed if create several images with same name

Bug #1842769 reported by norman shen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
New
Undecided
Unassigned

Bug Description

Task Definition:
version: 2
title: test
subtasks:
-
  title: subtask1
  scenario:
    NovaServers.suspend_and_resume_server:
      flavor:
        name: m1.tiny
      force_delete: false
      image:
        name: cirros-0.3.5-x86_64-disk.img1
  contexts:
    network:
      network_create_args:
        name: test-sjt-test-with-rally
    users:
      tenants: 2
      users_per_tenant: 2
    images:
      image_url: "http://172.23.97.8/images/cirros-0.3.5-x86_64-disk.img"
      image_name: cirros-0.3.5-x86_64-disk.img1
      image_type: qcow2
      image_container: bare
      images_per_tenant: 1
  runner:
    constant:
      concurrency: 1
      times: 1

Test will fail with following information

2019-09-05 08:24:52.252 29580 ERROR rally.task.engine [-] Unexpected exception during the workload execution: InvalidScenarioArgument: Invalid scenario argument: 'Glance_Image with name 'cirros-0.3.5-x86_64-disk.img1' is ambiguous, possible matches by id: 3cec0bec-dd3e-44f2-9876-dfffb45f5fa0, 84c819bb-e63f-4769-b1c5-9b4b1ccd77dc, 6955edb3-ab39-4525-8fdc-488d3e3c6537, bfc561c5-3c9f-48c5-8b12-acd9bbdac9ce'
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine Traceback (most recent call last):
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine File "/home/like/rally/local/lib/python2.7/site-packages/rally/task/engine.py", line 515, in _run_workload
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine workload["args"])
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine File "/home/like/rally/local/lib/python2.7/site-packages/rally/task/runner.py", line 164, in run
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine args = types.preprocess(name, context, args)
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine File "/home/like/rally/local/lib/python2.7/site-packages/rally/task/types.py", line 87, in preprocess
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine resource_spec=processed_args[src], config=type_cfg)
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine File "/home/like/rally/local/lib/python2.7/site-packages/rally_openstack/types.py", line 205, in pre_process
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine resource = self._find_resource(resource_spec, images)
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine File "/home/like/rally/local/lib/python2.7/site-packages/rally_openstack/types.py", line 95, in _find_resource
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine matching_exact))})
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine InvalidScenarioArgument: Invalid scenario argument: 'Glance_Image with name 'cirros-0.3.5-x86_64-disk.img1' is ambiguous, possible matches by id: 3cec0bec-dd3e-44f2-9876-dfffb45f5fa0, 84c819bb-e63f-4769-b1c5-9b4b1ccd77dc, 6955edb3-ab39-4525-8fdc-488d3e3c6537, bfc561c5-3c9f-48c5-8b12-acd9bbdac9ce'
2019-09-05 08:24:52.252 29580 ERROR rally.task.engine
2019-09-05 08:24:52.288 29580 INFO rally.task.engine [-] Task 0cc3fc70-9c49-4ac9-8cfe-b81dc4b3ebed | Completed: Running task.

Revision history for this message
norman shen (jshen28) wrote :

I think the problem occurs if multiple images with same name exists in glance. But since rally_openstack.contexts.glance.images.ImageGenerator already saves image information by tenant id, it might be better to input null or "" as image id and let scenario retrieve image id by themselves.

norman shen (jshen28)
summary: - test failed when created image with same image
+ test failed if created image with same name
summary: - test failed if created image with same name
+ test failed if create several images with same name
Revision history for this message
Sergey Galkin (sgalkin) wrote :
Download full text (3.1 KiB)

The same issue
2020-06-02 12:46:44.170 130 INFO rally.task.context [-] Task 232bbbe2-26f2-445d-b731-ab4821edd3f2 | Context users@openstack cleanup() finished in 4.31 sec
2020-06-02 12:46:45.040 130 INFO rally.task.engine [-] Load duration is: 0.0
2020-06-02 12:46:45.040 130 INFO rally.task.engine [-] Full runner duration is: 0.0
2020-06-02 12:46:45.043 130 INFO rally.task.engine [-] Full duration is: 29.443483
2020-06-02 12:46:45.081 130 ERROR rally.task.engine [-] Unexpected exception during the workload execution: InvalidScenarioArgument: Invalid scenario argument: 'Glance_Image with name 'cirros-0.3.5-x86_64-disk.img' is ambiguous, possible matches by id: 3534edaa-be1c-4eb5-90af-300782e9de2c, 1fd3ca13-5acd-4861-9e44-be77b7e7d626'
2020-06-02 12:46:45.081 130 ERROR rally.task.engine Traceback (most recent call last):
2020-06-02 12:46:45.081 130 ERROR rally.task.engine File "/usr/local/lib/python2.7/dist-packages/rally/task/engine.py", line 515, in _run_workload
2020-06-02 12:46:45.081 130 ERROR rally.task.engine workload["args"])
2020-06-02 12:46:45.081 130 ERROR rally.task.engine File "/usr/local/lib/python2.7/dist-packages/rally/task/runner.py", line 164, in run
2020-06-02 12:46:45.081 130 ERROR rally.task.engine args = types.preprocess(name, context, args)
2020-06-02 12:46:45.081 130 ERROR rally.task.engine File "/usr/local/lib/python2.7/dist-packages/rally/task/types.py", line 87, in preprocess
2020-06-02 12:46:45.081 130 ERROR rally.task.engine resource_spec=processed_args[src], config=type_cfg)
2020-06-02 12:46:45.081 130 ERROR rally.task.engine File "/usr/local/lib/python2.7/dist-packages/rally_openstack/types.py", line 204, in pre_process
2020-06-02 12:46:45.081 130 ERROR rally.task.engine resource = self._find_resource(resource_spec, images)
2020-06-02 12:46:45.081 130 ERROR rally.task.engine File "/usr/local/lib/python2.7/dist-packages/rally_openstack/types.py", line 95, in _find_resource
2020-06-02 12:46:45.081 130 ERROR rally.task.engine matching_exact))})
2020-06-02 12:46:45.081 130 ERROR rally.task.engine InvalidScenarioArgument: Invalid scenario argument: 'Glance_Image with name 'cirros-0.3.5-x86_64-disk.img' is ambiguous, possible matches by id: 3534edaa-be1c-4eb5-90af-300782e9de2c, 1fd3ca13-5acd-4861-9e44-be77b7e7d626'
2020-06-02 12:46:45.081 130 ERROR rally.task.engine

but I have only one cirros-0.3.5-x86_64-disk.img image
ubuntu@useful-mayfly:~$ ./venv/bin/openstack --insecure image list
+--------------------------------------+------------------------------+--------+
| ID | Name | Status |
+--------------------------------------+------------------------------+--------+
| 8e40c45a-ef4c-4c74-8602-7ecdb3d832f1 | Cirros-5.1 | active |
| b38c4f5b-15ca-4f85-ba1d-cd44e02288fc | Fedora-27-1.6 | active |
| ecea22f1-9d48-4220-a7d8-cabf37b807db | TestVM | active |
| 15fbf7bd-9eac-4d3f-baf2-5124c2496a29 | amphora-x64-haproxy | active |
| 1fd3ca13-5acd-4861-9e44-be77b7e7d626 | cirros-0.3.5-x86_64-disk.img | active |
+--------------------------------------+-----------------------------...

Read more...

Revision history for this message
Sergey Galkin (sgalkin) wrote :

I figured it out. In my case this is incorrect scenario. I have had
            image:
              name: cirros-0.3.5-x86_64-disk.img
          context:
            network:
              start_cidr: 100.1.0.0/26
            users:
              tenants: 2
              users_per_tenant: 1
            images:
              image_url: "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img"
              image_name: cirros-0.3.5-x86_64-disk.img
              image_type: qcow2
              image_container: bare
              images_per_tenant: 1

in each task

Revision history for this message
Sergey Galkin (sgalkin) wrote :

Removing
            images:
              image_url: "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img"
              image_name: cirros-0.3.5-x86_64-disk.img
              image_type: qcow2
              image_container: bare
              images_per_tenant: 1
is solve issue

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.