"Sync cached facts" task fails on dry-run

Bug #1839321 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Emilien Macchi

Bug Description

ry-run fails on TASK [Sync cached facts]:

TASK [Sync cached facts] *******************************************************
fatal: [controller-1 -> 192.168.24.7]: FAILED! => {"changed": false, "cmd": "/bin/rsync --delay-updates -F --compress --dry-run --archive --out-format=<<CHANGED>>%i %n%L /opt/puppetlabs/ /var/lib/container-puppet/puppetlabs/", "msg": "rsync: change_dir \"/opt/puppetlabs\" failed: No such file or directory (2)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]\n", "rc": 23}

The task shouldn't try to do actual rsyncs, we should skip it.

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

Logs from a dry-run:

TASK [Create puppet caching structures] ****************************************
changed: [controller-0]
changed: [controller-1]
changed: [controller-2]
changed: [compute-0]
changed: [compute-1]

TASK [Write facter cache config] ***********************************************
changed: [controller-0]
changed: [controller-1]
changed: [controller-2]
changed: [compute-0]
changed: [compute-1]

TASK [Cleanup facter cache if exists] ******************************************
ok: [controller-0]
ok: [controller-1]
ok: [controller-2]
ok: [compute-0]
ok: [compute-1]

TASK [Pre-cache facts] *********************************************************
skipping: [controller-0]
skipping: [controller-1]
skipping: [controller-2]
skipping: [compute-0]
skipping: [compute-1]

TASK [Sync cached facts] *******************************************************
fatal: [controller-1 -> 192.168.24.7]: FAILED! => {"changed": false, "cmd": "/bin/rsync --delay-updates -F --compress --dry-run --archive --out-format=<<CHANGED>>%i %n%L /opt/puppetlabs/ /var/lib/container-puppet/puppetlabs/", "msg": "rsync: change_dir \"/opt/puppetlabs\" failed: No such file or directory (2)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]\n", "rc": 23}
fatal: [controller-0 -> 192.168.24.19]: FAILED! => {"changed": false, "cmd": "/bin/rsync --delay-updates -F --compress --dry-run --archive --out-format=<<CHANGED>>%i %n%L /opt/puppetlabs/ /var/lib/container-puppet/puppetlabs/", "msg": "rsync: change_dir \"/opt/puppetlabs\" failed: No such file or directory (2)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]\n", "rc": 23}
fatal: [controller-2 -> 192.168.24.21]: FAILED! => {"changed": false, "cmd": "/bin/rsync --delay-updates -F --compress --dry-run --archive --out-format=<<CHANGED>>%i %n%L /opt/puppetlabs/ /var/lib/container-puppet/puppetlabs/", "msg": "rsync: change_dir \"/opt/puppetlabs\" failed: No such file or directory (2)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]\n", "rc": 23}
fatal: [compute-0 -> 192.168.24.17]: FAILED! => {"changed": false, "cmd": "/bin/rsync --delay-updates -F --compress --dry-run --archive --out-format=<<CHANGED>>%i %n%L /opt/puppetlabs/ /var/lib/container-puppet/puppetlabs/", "msg": "rsync: change_dir \"/opt/puppetlabs\" failed: No such file or directory (2)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]\n", "rc": 23}
fatal: [compute-1 -> 192.168.24.12]: FAILED! => {"changed": false, "cmd": "/bin/rsync --delay-updates -F --compress --dry-run --archive --out-format=<<CHANGED>>%i %n%L /opt/puppetlabs/ /var/lib/container-puppet/puppetlabs/", "msg": "rsync: change_dir \"/opt/puppetlabs\" failed: No such file or directory (2)\nrsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1189) [sender=3.1.3]\n", "rc": 23}

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

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

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (stable/stein)

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

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

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

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.opendev.org/675108
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=9581614e9353576c6a7b83136793631473851b31
Submitter: Zuul
Branch: master

commit 9581614e9353576c6a7b83136793631473851b31
Author: Emilien Macchi <email address hidden>
Date: Wed Aug 7 08:33:34 2019 -0400

    Force "Pre-cache" tasks to run in dry run

    We don't want the pre-cache tasks to be skipped in dry-run so we force
    check_mode to "no".

    For example, "command" is skipped in check mode because we don't provide
    "creates" nor "removes"; and since we need to cache facts when running Puppet
    in dry mode, we need to make sure this task is run anyway.

    See https://docs.ansible.com/ansible/latest/modules/command_module.html

    For "file", "copy", and "synchronize", they aren't skipped in dry mode
    but the resources aren't executed for real.

    So this patch disable check_mode for all these tasks.
    We also move the tasks in a block which avoid tags & check_mode
    duplication for each task and avoid problems in the future if a task is
    added.

    Closes-Bug: #1839321
    Change-Id: I21524419b8b416d0879fc61aa3274d2e30537438

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (stable/stein)

Reviewed: https://review.opendev.org/675621
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=d191423e86512e6101523ccea23f7f47e21087dd
Submitter: Zuul
Branch: stable/stein

commit d191423e86512e6101523ccea23f7f47e21087dd
Author: Emilien Macchi <email address hidden>
Date: Wed Aug 7 08:33:34 2019 -0400

    Force "Pre-cache" tasks to run in dry run

    We don't want the pre-cache tasks to be skipped in dry-run so we force
    check_mode to "no".

    For example, "command" is skipped in check mode because we don't provide
    "creates" nor "removes"; and since we need to cache facts when running Puppet
    in dry mode, we need to make sure this task is run anyway.

    See https://docs.ansible.com/ansible/latest/modules/command_module.html

    For "file", "copy", and "synchronize", they aren't skipped in dry mode
    but the resources aren't executed for real.

    So this patch disable check_mode for all these tasks.
    We also move the tasks in a block which avoid tags & check_mode
    duplication for each task and avoid problems in the future if a task is
    added.

    Closes-Bug: #1839321
    Change-Id: I21524419b8b416d0879fc61aa3274d2e30537438
    (cherry picked from commit 9581614e9353576c6a7b83136793631473851b31)

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

Reviewed: https://review.opendev.org/675623
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=6eb1048e303a1b4d530e47fb89d9c2460a7668f7
Submitter: Zuul
Branch: stable/queens

commit 6eb1048e303a1b4d530e47fb89d9c2460a7668f7
Author: Emilien Macchi <email address hidden>
Date: Wed Aug 7 08:33:34 2019 -0400

    Force "Pre-cache" tasks to run in dry run

    We don't want the pre-cache tasks to be skipped in dry-run so we force
    check_mode to "no".

    For example, "command" is skipped in check mode because we don't provide
    "creates" nor "removes"; and since we need to cache facts when running Puppet
    in dry mode, we need to make sure this task is run anyway.

    See https://docs.ansible.com/ansible/latest/modules/command_module.html

    For "file", "copy", and "synchronize", they aren't skipped in dry mode
    but the resources aren't executed for real.

    So this patch disable check_mode for all these tasks.
    We also move the tasks in a block which avoid tags & check_mode
    duplication for each task and avoid problems in the future if a task is
    added.

    Closes-Bug: #1839321
    Change-Id: I21524419b8b416d0879fc61aa3274d2e30537438
    (cherry picked from commit 9581614e9353576c6a7b83136793631473851b31)

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

Reviewed: https://review.opendev.org/675622
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=d65795e1ea9e857fd28082befb2b61916fc92817
Submitter: Zuul
Branch: stable/rocky

commit d65795e1ea9e857fd28082befb2b61916fc92817
Author: Emilien Macchi <email address hidden>
Date: Wed Aug 7 08:33:34 2019 -0400

    Force "Pre-cache" tasks to run in dry run

    We don't want the pre-cache tasks to be skipped in dry-run so we force
    check_mode to "no".

    For example, "command" is skipped in check mode because we don't provide
    "creates" nor "removes"; and since we need to cache facts when running Puppet
    in dry mode, we need to make sure this task is run anyway.

    See https://docs.ansible.com/ansible/latest/modules/command_module.html

    For "file", "copy", and "synchronize", they aren't skipped in dry mode
    but the resources aren't executed for real.

    So this patch disable check_mode for all these tasks.
    We also move the tasks in a block which avoid tags & check_mode
    duplication for each task and avoid problems in the future if a task is
    added.

    Closes-Bug: #1839321
    Change-Id: I21524419b8b416d0879fc61aa3274d2e30537438
    (cherry picked from commit 9581614e9353576c6a7b83136793631473851b31)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 10.6.1

This issue was fixed in the openstack/tripleo-heat-templates 10.6.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 9.4.1

This issue was fixed in the openstack/tripleo-heat-templates 9.4.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 8.4.1

This issue was fixed in the openstack/tripleo-heat-templates 8.4.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 11.2.0

This issue was fixed in the openstack/tripleo-heat-templates 11.2.0 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.