container image prepare can't be interrupted via Ctrl-C

Bug #1746724 reported by Steven Hardy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Emilien Macchi

Bug Description

^C^C^CProcess PoolWorker-88:
Process PoolWorker-87:
Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python2.7/multiprocessing/pool.py", line 102, in worker
  File "/usr/lib64/python2.7/multiprocessing/pool.py", line 102, in worker
    task = get()
    task = get()
  File "/usr/lib64/python2.7/multiprocessing/queues.py", line 374, in get
  File "/usr/lib64/python2.7/multiprocessing/queues.py", line 374, in get
    racquire()
    racquire()
KeyboardInterrupt
KeyboardInterrupt

We should catch ctrl-c and allow graceful exit.

Changed in tripleo:
status: New → Triaged
importance: Undecided → Medium
milestone: none → queens-rc1
Revision history for this message
Emilien Macchi (emilienm) wrote :

Steve, I think you want a graceful exit on "container image upload", correct?
"container image prepare" only takes a few seconds and generates a YAML, so I don't see the need to graceful exit.

Anyway, if it's for "container image upload" then yes it makes sense.

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

If you specify --tag-from-label then the prepare call will be running skopeo inspect on every image in parellel, so ctrl-c handling will be needed here too.

Revision history for this message
Emilien Macchi (emilienm) wrote :

ack SteveB, I missed that part.
Thanks

Changed in tripleo:
assignee: nobody → Emilien Macchi (emilienm)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

Fix proposed to branch: master
Review: https://review.openstack.org/540213

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/541722

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-common (master)

Change abandoned by Emilien Macchi (<email address hidden>) on branch: master
Review: https://review.openstack.org/540213
Reason: https://review.openstack.org/541722

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/541722
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=e72065cd3343401e8a78cada140f68818912fb33
Submitter: Zuul
Branch: master

commit e72065cd3343401e8a78cada140f68818912fb33
Author: Emilien Macchi <email address hidden>
Date: Wed Feb 7 06:04:07 2018 -0800

    image_upload: allow ctrl-c

    Allow operators to run ctrl-c during image uplaod and gracefully exit.

    Change-Id: I6e4aead3e4a03d1025b987bc2f0305614e4d0c18
    Closes-Bug: #1746724

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
Alex Schultz (alex-schultz) wrote :

The usage of tenacity appears to have broken this again. http://paste.openstack.org/show/698791/

Changed in tripleo:
status: Fix Released → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 10.0.0

This issue was fixed in the openstack/python-tripleoclient 10.0.0 release.

Changed in tripleo:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/704428

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (master)

Fix proposed to branch: master
Review: https://review.opendev.org/704440

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-tripleoclient (stable/queens)

Change abandoned by Alex Schultz (<email address hidden>) on branch: stable/queens
Review: https://review.opendev.org/704428

tags: added: train-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (master)

Reviewed: https://review.opendev.org/704440
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=9003b7ac5be6a54aed0b3cd8172c838c413f17f5
Submitter: Zuul
Branch: master

commit 9003b7ac5be6a54aed0b3cd8172c838c413f17f5
Author: Alex Schultz <email address hidden>
Date: Mon Jan 27 14:52:11 2020 -0700

    Raise exception on KeyboardInterrupt

    Using subprocess with tenacity can lead to issues when a keyboard
    interrupt occurs because the logic we have will actually trigger a
    retry. This can lead to the inability to stop some of the commands with
    a ctrl+c.

    Change-Id: I294910384fc9dd9ca8c7114d08842868909d9e9f
    Closes-Bug: #1746724

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/704815

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/704816

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/704817

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-common (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/704819

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/rocky)

Reviewed: https://review.opendev.org/704817
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=af2b1e11cafe4063819098cd78808d865988849a
Submitter: Zuul
Branch: stable/rocky

commit af2b1e11cafe4063819098cd78808d865988849a
Author: Alex Schultz <email address hidden>
Date: Mon Jan 27 14:52:11 2020 -0700

    Raise exception on KeyboardInterrupt

    Using subprocess with tenacity can lead to issues when a keyboard
    interrupt occurs because the logic we have will actually trigger a
    retry. This can lead to the inability to stop some of the commands with
    a ctrl+c.

    Conflicts:
        tripleo_common/image/image_uploader.py

    Change-Id: I294910384fc9dd9ca8c7114d08842868909d9e9f
    Closes-Bug: #1746724
    (cherry picked from commit 9003b7ac5be6a54aed0b3cd8172c838c413f17f5)

tags: added: in-stable-rocky
tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/stein)

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

commit 3e1c52853bac0627333882626bc06b67934f6329
Author: Alex Schultz <email address hidden>
Date: Mon Jan 27 14:52:11 2020 -0700

    Raise exception on KeyboardInterrupt

    Using subprocess with tenacity can lead to issues when a keyboard
    interrupt occurs because the logic we have will actually trigger a
    retry. This can lead to the inability to stop some of the commands with
    a ctrl+c.

    Change-Id: I294910384fc9dd9ca8c7114d08842868909d9e9f
    Closes-Bug: #1746724
    (cherry picked from commit 9003b7ac5be6a54aed0b3cd8172c838c413f17f5)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/train)

Reviewed: https://review.opendev.org/704815
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=95c117498d5d5caeb8359dc830f748cabc9c7228
Submitter: Zuul
Branch: stable/train

commit 95c117498d5d5caeb8359dc830f748cabc9c7228
Author: Alex Schultz <email address hidden>
Date: Mon Jan 27 14:52:11 2020 -0700

    Raise exception on KeyboardInterrupt

    Using subprocess with tenacity can lead to issues when a keyboard
    interrupt occurs because the logic we have will actually trigger a
    retry. This can lead to the inability to stop some of the commands with
    a ctrl+c.

    Change-Id: I294910384fc9dd9ca8c7114d08842868909d9e9f
    Closes-Bug: #1746724
    (cherry picked from commit 9003b7ac5be6a54aed0b3cd8172c838c413f17f5)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-common (stable/queens)

Reviewed: https://review.opendev.org/704819
Committed: https://git.openstack.org/cgit/openstack/tripleo-common/commit/?id=5a93687ab142575d31952fd7db7132271c5648ac
Submitter: Zuul
Branch: stable/queens

commit 5a93687ab142575d31952fd7db7132271c5648ac
Author: Alex Schultz <email address hidden>
Date: Mon Jan 27 14:52:11 2020 -0700

    Raise exception on KeyboardInterrupt

    Using subprocess with tenacity can lead to issues when a keyboard
    interrupt occurs because the logic we have will actually trigger a
    retry. This can lead to the inability to stop some of the commands with
    a ctrl+c.

    Conflicts:
        tripleo_common/image/image_uploader.py

    Change-Id: I294910384fc9dd9ca8c7114d08842868909d9e9f
    Closes-Bug: #1746724
    (cherry picked from commit 9003b7ac5be6a54aed0b3cd8172c838c413f17f5)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common 12.1.0

This issue was fixed in the openstack/tripleo-common 12.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common rocky-eol

This issue was fixed in the openstack/tripleo-common rocky-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common queens-eol

This issue was fixed in the openstack/tripleo-common queens-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-common stein-eol

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