facter cache fails if facter.conf is a directory because it was mounted via docker

Bug #1852606 reported by Alex Schultz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Alex Schultz

Bug Description

If a user updates their facter of their running cloud and has a docker-puppet.py run prior to the facter cache running, the file location is created as a directory by docker. This causes the deployment to fail:

TASK [Write facter cache config] ***********************************************
fatal: [localhost]: FAILED! => {\"changed\": false, \"msg\": \"can not use content with a dir as dest\"}
\tto retry, use: --limit @/var/lib/heat-config/heat-config-ansible/ceeec832-1552-48ac-9998-a748e883641d_playbook.retry

We should check if the facter.conf exists prior to running and make sure it's a file.

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-ansible (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/694353

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

Reviewed: https://review.opendev.org/694342
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=3e25c2c48308694bbae737ad7699fe540ed1a098
Submitter: Zuul
Branch: master

commit 3e25c2c48308694bbae737ad7699fe540ed1a098
Author: Alex Schultz <email address hidden>
Date: Thu Nov 14 09:16:25 2019 -0700

    Check that facter.conf is a file

    If docker-puppet.py (or container-puppet.py) is run under docker prior
    to the facter config being generated, the file is created as a
    directory. This causes a failure later when we try to write the file
    out.

    Change-Id: I9b5a1e06e73b3b4cfc0ebfaeba8f1eb4b5d6fcfe
    Closes-Bug: #1852606

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

Reviewed: https://review.opendev.org/694353
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=79f41d1d41a23b8b851410a912fd352c5e6fac32
Submitter: Zuul
Branch: master

commit 79f41d1d41a23b8b851410a912fd352c5e6fac32
Author: Alex Schultz <email address hidden>
Date: Thu Nov 14 09:38:34 2019 -0700

    Don't fail hard when facter cache doesn't work correctly

    Since the facter cache is supposed to be a help but not necessarily a
    hard requirement, let's make sure the tasks don't fail if something goes
    wrong. We should output the error if the facter execution fails, but we
    don't want to always output it.

    Change-Id: I58d42c74295f031b260c0b67dbc12336fc31db1f
    Related-Bug: #1852606

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

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

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

Reviewed: https://review.opendev.org/694784
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=0606eb6483bd5c8afb1217ab52c1512d1b16d257
Submitter: Zuul
Branch: stable/train

commit 0606eb6483bd5c8afb1217ab52c1512d1b16d257
Author: Alex Schultz <email address hidden>
Date: Mon Nov 18 07:33:58 2019 -0700

    Check that facter.conf is a file

    If docker-puppet.py (or container-puppet.py) is run under docker prior
    to the facter config being generated, the file is created as a
    directory. This causes a failure later when we try to write the file
    out.

    Change-Id: I9b5a1e06e73b3b4cfc0ebfaeba8f1eb4b5d6fcfe
    Closes-Bug: #1852606
    (cherry picked from commit 3e25c2c48308694bbae737ad7699fe540ed1a098)

tags: added: in-stable-train
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/695756

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/695757

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/695758

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

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/695765

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

Related fix proposed to branch: stable/stein
Review: https://review.opendev.org/695767

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

Related fix proposed to branch: stable/rocky
Review: https://review.opendev.org/695768

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

Related fix proposed to branch: stable/queens
Review: https://review.opendev.org/695769

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-heat-templates (stable/stein)

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

commit a26b5ce8a907b89f1ea0a8c52d3c7b3807cea629
Author: Alex Schultz <email address hidden>
Date: Fri Nov 22 14:08:56 2019 -0700

    Don't fail hard when facter cache doesn't work correctly

    Since the facter cache is supposed to be a help but not necessarily a
    hard requirement, let's make sure the tasks don't fail if something goes
    wrong. We should output the error if the facter execution fails, but we
    don't want to always output it.

    Change-Id: I58d42c74295f031b260c0b67dbc12336fc31db1f
    Related-Bug: #1852606
    (cherry picked from 79f41d1d41a23b8b851410a912fd352c5e6fac32)

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

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

commit da384b5bffcbfc8ac6f137fd9d027ad1dcb0518b
Author: Alex Schultz <email address hidden>
Date: Fri Nov 22 14:08:56 2019 -0700

    Don't fail hard when facter cache doesn't work correctly

    Since the facter cache is supposed to be a help but not necessarily a
    hard requirement, let's make sure the tasks don't fail if something goes
    wrong. We should output the error if the facter execution fails, but we
    don't want to always output it.

    Change-Id: I58d42c74295f031b260c0b67dbc12336fc31db1f
    Related-Bug: #1852606
    (cherry picked from 79f41d1d41a23b8b851410a912fd352c5e6fac32)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-heat-templates (stable/train)

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

commit e8e9965eb75597f113833df414976d6cce8d2324
Author: Alex Schultz <email address hidden>
Date: Fri Nov 22 14:08:56 2019 -0700

    Don't fail hard when facter cache doesn't work correctly

    Since the facter cache is supposed to be a help but not necessarily a
    hard requirement, let's make sure the tasks don't fail if something goes
    wrong. We should output the error if the facter execution fails, but we
    don't want to always output it.

    Change-Id: I58d42c74295f031b260c0b67dbc12336fc31db1f
    Related-Bug: #1852606
    (cherry picked from 79f41d1d41a23b8b851410a912fd352c5e6fac32)

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

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

commit b2d71b3f1485c54f7d2dd9776d94fd4e00518713
Author: Alex Schultz <email address hidden>
Date: Fri Nov 22 14:08:56 2019 -0700

    Don't fail hard when facter cache doesn't work correctly

    Since the facter cache is supposed to be a help but not necessarily a
    hard requirement, let's make sure the tasks don't fail if something goes
    wrong. We should output the error if the facter execution fails, but we
    don't want to always output it.

    Change-Id: I58d42c74295f031b260c0b67dbc12336fc31db1f
    Related-Bug: #1852606
    (cherry picked from 79f41d1d41a23b8b851410a912fd352c5e6fac32)

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

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

commit cc428f998db3b76ec1e23be358b509a24862b76e
Author: Alex Schultz <email address hidden>
Date: Mon Nov 18 07:33:58 2019 -0700

    Check that facter.conf is a file

    If docker-puppet.py (or container-puppet.py) is run under docker prior
    to the facter config being generated, the file is created as a
    directory. This causes a failure later when we try to write the file
    out.

    Change-Id: I9b5a1e06e73b3b4cfc0ebfaeba8f1eb4b5d6fcfe
    Closes-Bug: #1852606
    (cherry picked from commit 3e25c2c48308694bbae737ad7699fe540ed1a098)
    (cherry picked from commit 0606eb6483bd5c8afb1217ab52c1512d1b16d257)

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

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

commit 17da3d622b068a9a401ac0cbe86280035fd48a87
Author: Alex Schultz <email address hidden>
Date: Mon Nov 18 07:33:58 2019 -0700

    Check that facter.conf is a file

    If docker-puppet.py (or container-puppet.py) is run under docker prior
    to the facter config being generated, the file is created as a
    directory. This causes a failure later when we try to write the file
    out.

    Change-Id: I9b5a1e06e73b3b4cfc0ebfaeba8f1eb4b5d6fcfe
    Closes-Bug: #1852606
    (cherry picked from commit 3e25c2c48308694bbae737ad7699fe540ed1a098)
    (cherry picked from commit 0606eb6483bd5c8afb1217ab52c1512d1b16d257)

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

This issue was fixed in the openstack/tripleo-ansible 1.0.0 release.

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

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

commit ff64711257296817833893c8af60f43795b7c81b
Author: Alex Schultz <email address hidden>
Date: Mon Nov 18 07:33:58 2019 -0700

    Check that facter.conf is a file

    If docker-puppet.py (or container-puppet.py) is run under docker prior
    to the facter config being generated, the file is created as a
    directory. This causes a failure later when we try to write the file
    out.

    Change-Id: I9b5a1e06e73b3b4cfc0ebfaeba8f1eb4b5d6fcfe
    Closes-Bug: #1852606
    (cherry picked from commit 3e25c2c48308694bbae737ad7699fe540ed1a098)
    (cherry picked from commit 0606eb6483bd5c8afb1217ab52c1512d1b16d257)

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

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

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

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

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

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

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

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