paunch/docker: health-cmd needs to quote the argument

Bug #1824808 reported by Emilien Macchi on 2019-04-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
High
Emilien Macchi

Bug Description

Initially reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1694572

If we don't quote the health-cmd in paunch, the docker command that is generated by paunch ends up being:

"(...) --health-cmd=/openstack/healthcheck 5672 (...)"

Docker think 5672 is the image to pull and of course fails.

We need to quote the healthcheck command to avoid this kind of problem.

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

Changed in tripleo:
status: Triaged → In Progress

Reviewed: https://review.openstack.org/652647
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=affc28f515703044bda8de74fb8f3bdd33fc646c
Submitter: Zuul
Branch: master

commit affc28f515703044bda8de74fb8f3bdd33fc646c
Author: Emilien Macchi <email address hidden>
Date: Mon Apr 15 09:00:53 2019 -0400

    docker/compose: quote health-cmd

    Healthcheck commands need to be quoted to avoid Docker interpreting the
    cmd as arguments of CLI.
    This patch prevents that, and also test it in unit tests.

    Change-Id: I8273684716df0dbe6f58608d1915e0c9c17493b3
    Closes-Bug: #1824808

Changed in tripleo:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/653067
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=9fbbad559dcffaf4d57c5c1c244db3b80e09106c
Submitter: Zuul
Branch: stable/queens

commit 9fbbad559dcffaf4d57c5c1c244db3b80e09106c
Author: Emilien Macchi <email address hidden>
Date: Mon Apr 15 09:00:53 2019 -0400

    docker/compose: quote health-cmd

    Healthcheck commands need to be quoted to avoid Docker interpreting the
    cmd as arguments of CLI.
    This patch prevents that, and also test it in unit tests.

    Change-Id: I8273684716df0dbe6f58608d1915e0c9c17493b3
    Closes-Bug: #1824808
    (cherry picked from commit affc28f515703044bda8de74fb8f3bdd33fc646c)

tags: added: in-stable-queens
tags: added: in-stable-rocky

Reviewed: https://review.openstack.org/653063
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=d3c1cdc13abf174f669d653935cff163213a2849
Submitter: Zuul
Branch: stable/rocky

commit d3c1cdc13abf174f669d653935cff163213a2849
Author: Emilien Macchi <email address hidden>
Date: Mon Apr 15 09:00:53 2019 -0400

    docker/compose: quote health-cmd

    Healthcheck commands need to be quoted to avoid Docker interpreting the
    cmd as arguments of CLI.
    This patch prevents that, and also test it in unit tests.

    Change-Id: I8273684716df0dbe6f58608d1915e0c9c17493b3
    Closes-Bug: #1824808
    (cherry picked from commit affc28f515703044bda8de74fb8f3bdd33fc646c)

Reviewed: https://review.opendev.org/654452
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=251ca7edc0d2dd49b4280ad434a685c902a5c57e
Submitter: Zuul
Branch: stable/stein

commit 251ca7edc0d2dd49b4280ad434a685c902a5c57e
Author: Emilien Macchi <email address hidden>
Date: Mon Apr 15 09:00:53 2019 -0400

    docker/compose: quote health-cmd

    Healthcheck commands need to be quoted to avoid Docker interpreting the
    cmd as arguments of CLI.
    This patch prevents that, and also test it in unit tests.

    Change-Id: I8273684716df0dbe6f58608d1915e0c9c17493b3
    Closes-Bug: #1824808
    (cherry picked from commit affc28f515703044bda8de74fb8f3bdd33fc646c)

tags: added: in-stable-stein

This issue was fixed in the openstack/paunch 5.0.0 release.

Reviewed: https://review.opendev.org/665249
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=78f61f9c9c75e6dfee1fe601927b9822df06f062
Submitter: Zuul
Branch: stable/rocky

commit 78f61f9c9c75e6dfee1fe601927b9822df06f062
Author: Emilien Macchi <email address hidden>
Date: Thu Jun 13 22:00:50 2019 +0000

    Revert "docker/compose: quote health-cmd"

    This reverts commit 9fbbad559dcffaf4d57c5c1c244db3b80e09106c.
    This patch was wrong. We don't need the quotes because
    we use subprocess and the args aren't parsed lie on
    bash.

    Change-Id: I975a5de297e07eb701e2b9c72495e63daa3cbc41
    Related-Bug: #1824808

Reviewed: https://review.opendev.org/665248
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=90cf8bbb3e0a5baf4dbee519ffacfddf04cdb7b0
Submitter: Zuul
Branch: stable/queens

commit 90cf8bbb3e0a5baf4dbee519ffacfddf04cdb7b0
Author: Emilien Macchi <email address hidden>
Date: Thu Jun 13 21:59:46 2019 +0000

    Revert "docker/compose: quote health-cmd"

    This reverts commit 9fbbad559dcffaf4d57c5c1c244db3b80e09106c.
    This patch was wrong. We don't need the quotes because
    we use subprocess and the args aren't parsed lie on
    bash.

    Change-Id: Ibd97df51b7eede9c8c617777bd5255d075954db2
    Related-Bug: #1824808

Reviewed: https://review.opendev.org/665250
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=fb760307b3baf45dbbc19a5de2a290526830bf17
Submitter: Zuul
Branch: stable/stein

commit fb760307b3baf45dbbc19a5de2a290526830bf17
Author: Emilien Macchi <email address hidden>
Date: Thu Jun 13 22:01:04 2019 +0000

    Revert "docker/compose: quote health-cmd"

    This reverts commit 9fbbad559dcffaf4d57c5c1c244db3b80e09106c.
    This patch was wrong. We don't need the quotes because
    we use subprocess and the args aren't parsed lie on
    bash.

    Change-Id: I066fb243caa7f9fd819a7f91c47857b3aa678807
    Related-Bug: #1824808

Reviewed: https://review.opendev.org/665251
Committed: https://git.openstack.org/cgit/openstack/paunch/commit/?id=a809d783e7e50030f7dc740a9aaec5dc9c560210
Submitter: Zuul
Branch: master

commit a809d783e7e50030f7dc740a9aaec5dc9c560210
Author: Emilien Macchi <email address hidden>
Date: Thu Jun 13 22:01:16 2019 +0000

    Revert "docker/compose: quote health-cmd"

    This reverts commit 9fbbad559dcffaf4d57c5c1c244db3b80e09106c.
    This patch was wrong. We don't need the quotes because
    we use subprocess and the args aren't parsed lie on
    bash.

    Change-Id: I47a6dd2f57809c02d57b0772e6c17150cb6687b3
    Related-Bug: #1824808

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

Other bug subscribers