tasks which try to omit a delegation attempt to ssh directly to containers

Bug #1763300 reported by Jonathan Rosser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
High
Jean-Philippe Evrard

Bug Description

I tried to make the target-host download the tempest images with the functionality here https://github.com/openstack/openstack-ansible-os_tempest/blob/master/tasks/tempest_resources.yml#L43

That results in an attempt to ssh directly to the target container rather than use the ssh plugin correctly.

I wrote a test case for that which confirms the behaviour:

https://review.openstack.org/#/c/560595/

cloudnull suggests that the code could look like this instead

http://paste.openstack.org/show/719016/

There are several uses of this pattern in the openstack-ansible roles

http://codesearch.openstack.org/?q=downloader%20%3D%3D%20%27deployment-host%27&i=nope&files=&repos

Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

Hey.

I 100% agree with cloudnull, omit should only be used in task arguments.

The omit in delegation would replace the inventory_hostname with omit_place_holder_<number>, which would not inherit the variables that are required for connecting, and all the other variables we are setting, except the all variables. This is a bad pattern.

Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Jean-Philippe Evrard (jean-philippe-evrard)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-galera_server (master)

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

Changed in openstack-ansible:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-haproxy_server (master)

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

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

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

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

Reviewed: https://review.openstack.org/560838
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-haproxy_server/commit/?id=9b7c79572af0bc438d137dde24c16c8e7aa45247
Submitter: Zuul
Branch: master

commit 9b7c79572af0bc438d137dde24c16c8e7aa45247
Author: Jean-Philippe Evrard <email address hidden>
Date: Thu Apr 12 11:00:17 2018 +0200

    Do not delegate to omit

    delegate_to should never delegate to omit, as omit is only
    intended for task argument's values.
    More explanations of the reasons can be found in the bug.

    Change-Id: Ic00c5d6eeee8858a7bc6bd47a95782374eedb944
    Closes-Bug: #1763300

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-galera_server (master)

Reviewed: https://review.openstack.org/560833
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-galera_server/commit/?id=342f723006d3c4bf0c97a4ccc39639c89102b36f
Submitter: Zuul
Branch: master

commit 342f723006d3c4bf0c97a4ccc39639c89102b36f
Author: Jean-Philippe Evrard <email address hidden>
Date: Thu Apr 12 10:56:56 2018 +0200

    Do not delegate to omit

    delegate_to should never delegate to omit, as omit is only
    intended for task argument's values.
    More explanations of the reasons can be found in the bug.

    Change-Id: Iaeed4026962e635f68013ff8d175f0e20bffe415
    Closes-Bug: #1763300

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

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/560941

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

Reviewed: https://review.openstack.org/560840
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_tempest/commit/?id=f451c1a3e2dff69edaf3a72fc215ffa46104a295
Submitter: Zuul
Branch: master

commit f451c1a3e2dff69edaf3a72fc215ffa46104a295
Author: Jean-Philippe Evrard <email address hidden>
Date: Thu Apr 12 11:02:27 2018 +0200

    Do not delegate to omit

    delegate_to should never delegate to omit, as omit is only
    intended for task argument's values.
    More explanations of the reasons can be found in the bug.

    Change-Id: Ief2fecbc266adcc816336b601253d3e90c39c32b
    Closes-Bug: #1763300

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_tempest (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/561059

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-galera_server (stable/queens)

Reviewed: https://review.openstack.org/560941
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-galera_server/commit/?id=d3459a89cf69afbee5b19d71d764eec27800d762
Submitter: Zuul
Branch: stable/queens

commit d3459a89cf69afbee5b19d71d764eec27800d762
Author: Jean-Philippe Evrard <email address hidden>
Date: Thu Apr 12 10:56:56 2018 +0200

    Do not delegate to omit

    delegate_to should never delegate to omit, as omit is only
    intended for task argument's values.
    More explanations of the reasons can be found in the bug.

    Change-Id: Iaeed4026962e635f68013ff8d175f0e20bffe415
    Closes-Bug: #1763300
    (cherry picked from commit 342f723006d3c4bf0c97a4ccc39639c89102b36f)

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

Reviewed: https://review.openstack.org/561059
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_tempest/commit/?id=f73b0dbebffae1306e1d1c0a129d250064c88506
Submitter: Zuul
Branch: stable/queens

commit f73b0dbebffae1306e1d1c0a129d250064c88506
Author: Jean-Philippe Evrard <email address hidden>
Date: Thu Apr 12 11:02:27 2018 +0200

    Do not delegate to omit

    delegate_to should never delegate to omit, as omit is only
    intended for task argument's values.
    More explanations of the reasons can be found in the bug.

    Change-Id: Ief2fecbc266adcc816336b601253d3e90c39c32b
    Closes-Bug: #1763300
    (cherry picked from commit f451c1a3e2dff69edaf3a72fc215ffa46104a295)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-galera_server 17.0.3

This issue was fixed in the openstack/openstack-ansible-galera_server 17.0.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_tempest 17.0.3

This issue was fixed in the openstack/openstack-ansible-os_tempest 17.0.3 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-galera_server 18.0.0.0b1

This issue was fixed in the openstack/openstack-ansible-galera_server 18.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-haproxy_server 18.0.0.0b1

This issue was fixed in the openstack/openstack-ansible-haproxy_server 18.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_tempest 18.0.0.0b1

This issue was fixed in the openstack/openstack-ansible-os_tempest 18.0.0.0b1 development milestone.

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.