container images prepare fails with AttibuteError

Bug #1851502 reported by Denis Karpov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Alex Schultz

Bug Description

During minor upgrade within Stein release (some pagackes upgrade) container image upload fails with attribute error.
python2-tripleo-common-0.20191101065443.03890e2.el7

sudo openstack tripleo container image prepare --verbose --cleanup partial\
    --output-env-file /home/stack/templates/containers-default-parameters.yaml \
    ${PREPARE_ARGS} \
    -e /home/stack/containers-prepare-parameter.yaml
...
command: tripleo container image prepare -> tripleoclient.v1.container_image.TripleOImagePrepare (auth=False)
Using config files: ['/tmp/tmpHWMXEX']
[docker.io/tripleostein/centos-binary-ovn-northd:current-tripleo-rdo] Starting upload image process
[192.168.24.1:8787/tripleostein/centos-binary-ovn-northd:current-tripleo-rdo] Failed uploading the target image
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/tripleoclient/command.py", line 32, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python2.7/site-packages/tripleoclient/v1/container_image.py", line 659, in take_action
    cleanup=parsed_args.cleanup)
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/kolla_builder.py", line 228, in container_images_prepare_multi
    uploader.upload()
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/image_uploader.py", line 261, in upload
    uploader.run_tasks()
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/image_uploader.py", line 2090, in run_tasks
    local_images.extend(upload_task(args=self.upload_tasks.pop()))
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/image_uploader.py", line 2147, in upload_task
    return uploader.upload_image(task)
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/image_uploader.py", line 1271, in upload_image
    lock=lock
  File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 292, in wrapped_f
    return self.call(f, *args, **kw)
  File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 358, in call
    do = self.iter(retry_state=retry_state)
  File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 319, in iter
    return fut.result()
  File "/usr/lib/python2.7/site-packages/concurrent/futures/_base.py", line 422, in result
    return self.__get_result()
  File "/usr/lib/python2.7/site-packages/tenacity/__init__.py", line 361, in call
    result = fn(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/tripleo_common/image/image_uploader.py", line 1573, in _copy_registry_to_registry
    raise e
AttributeError: 'set' object has no attribute 'append'
'set' object has no attribute 'append'
END return value: 1

Revision history for this message
Rabi Mishra (rabi) wrote :

Looks like it's fixed with https://github.com/openstack/tripleo-common/commit/0b77267d5e974fcb1b759410a94bdb236e96852d and needs to be backported to stable/stein.

Revision history for this message
Alex Schultz (alex-schultz) wrote :
Changed in tripleo:
status: New → In Progress
assignee: nobody → Alex Schultz (alex-schultz)
milestone: none → ussuri-1
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/stein)

Reviewed: https://review.opendev.org/693196
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=962f0a33adf236a20f3b6803e63f755ba0622a8b
Submitter: Zuul
Branch: stable/stein

commit 962f0a33adf236a20f3b6803e63f755ba0622a8b
Author: Bogdan Dobrelya <email address hidden>
Date: Wed Oct 9 14:58:00 2019 +0200

    Fix dynamic executor appending to objects

    Set() has no the append() method.
    Unify the _objects to be always assigned a list.
    Take the safer remove() approach for the non-unique locks,
    if any happened in the image uploader locks manager.

    Closes-Bug: #1851502
    Change-Id: I1f15441ef31f530758f1588e8006cc6b17d3aeaf
    Signed-off-by: Bogdan Dobrelya <email address hidden>
    (cherry picked from commit 0b77267d5e974fcb1b759410a94bdb236e96852d)

tags: added: in-stable-stein
Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 10.8.2

This issue was fixed in the openstack/tripleo-common 10.8.2 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.