/usr/local/bin/cache-prep-commands.sh failing to write to /etc/resolv.conf when resolvconf used on Xenial

Bug #1768592 reported by Kevin Jackson
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Critical
Jesse Pretorius

Bug Description

OS: Ubuntu 16.04.4
OpenStack-Ansible: 16.0.10 and 16.0.12 [not tried others]

As part of setup-hosts.yml, /usr/local/bin/cache-prep-commands.sh is failing with the following error:

TASK [lxc_hosts : Ensure that the LXC cache has been prepared] *****************
Wednesday 02 May 2018 15:10:40 +0000 (0:00:00.347) 0:01:07.539 *********
fatal: [controller-01]: FAILED! => {“ansible_job_id”: “429901853940.11990", “attempts”: 1, “changed”: true, “cmd”: “chroot /var/lib/machines/ubuntu-xenial-amd64 /usr/local/bin/cache-prep-commands.sh > /var/log/lxc-cache-prep-commands.log 2>&1", “delta”: “0:00:00.004371", “end”: “2018-05-02 15:10:38.458719", “failed”: true, “finished”: 1, “rc”: 1, “start”: “2018-05-02 15:10:38.454348”, “stderr”: “”, “stderr_lines”: [], “stdout”: “”, “stdout_lines”: []}

This leads to this log:

cat /var/log/lxc-cache-prep-commands.log
+ mkdir -p /etc/ansible/facts.d/
+ '[' -a /etc/resolv.conf ']'
+ echo 'nameserver 10.0.3.1'

The problem appears to be caused by resolvconf's symlink from /etc/resolv.conf to the relative symlink target of ../run/resolvconf/resolv.conf and the command being executed in a chroot jail:

chroot /var/lib/machines/ubuntu-xenial-amd64 /usr/local/bin/cache-prep-commands.sh > /var/log/lxc-cache-prep-commands.log

Outside of the chroot, /etc/resolv.conf correctly points to /run/resolvconf/resolv.conf, so therefore the test [ -a /etc/resolv.conf ] and the ability to follow the symlink would work.

However, inside the chroot, the run/ dir is empty... This has the effect of the fact that the bash test for the file existing is true, because it finds the file [really the actual symlink], so this then satisfies that test. However, when it comes to echoing the nameserver, that echo wants to follow the result of the symlink... so /etc/resolv.conf -> ../run/resolvconf/resolv.conf. And as the directory ../run/resolvconf/ doesn't exist, it fails with the error above.

Revision history for this message
Ondrej Vasko (lirt) wrote :

Same for me with 16.0.12. I don't remember this happened in older releases.

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

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

Revision history for this message
Ondrej Vasko (lirt) wrote :

Proposed fix worked for me on stable Pike 16.0.12. Thank you.

Revision history for this message
Kevin Jackson (kevin-linuxservices) wrote :

I'm not sure what's going on. This is working again.
No changes made from my end. Using 16.0.12 - this is the relevant part of the log now:

root@controller-01:~# cat /var/log/lxc-cache-prep-commands.log
+ mkdir -p /etc/ansible/facts.d/
+ '[' -a /etc/resolv.conf ']'
+ mv /etc/resolv.conf /etc/resolv.conf.org
+ echo 'nameserver 10.0.3.1'
+ apt-key add /root/repo.keys
OK

Whereas yesterday, the /var/lib/machines/ubuntu-xenial-amd64/run area was empty (/var/lib/machines/ubuntu-xenial-amd64 is the chroot), it is now populated, therefore the symlink in question here which ends up as /var/lib/machines/ubuntu-xenial-amd64/run/resolvconf/resolv.conf is satisfied.

root@controller-01:/var/lib/machines/ubuntu-xenial-amd64/run# ls -la
total 0
drwxr-xr-x 1 root root 74 May 3 03:55 .
drwxr-xr-x 1 root root 132 May 3 03:54 ..
drwxrwxrwt 1 root root 0 May 3 03:53 lock
drwxr-xr-x 1 root root 8 May 3 03:53 mount
drwxr-xr-x 1 root root 0 May 3 03:54 network
drwxr-xr-x 1 root root 68 May 3 03:54 resolvconf
drwxr-xr-x 1 root root 22 May 3 03:55 systemd
-rw-rw-r-- 1 root utmp 0 May 3 03:53 utmp

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

Reviewed: https://review.openstack.org/565933
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-lxc_hosts/commit/?id=e77c3a923bc8aae4a264917f592b58b5d1c79aed
Submitter: Zuul
Branch: stable/queens

commit e77c3a923bc8aae4a264917f592b58b5d1c79aed
Author: Kevin Carter <email address hidden>
Date: Wed May 2 20:55:04 2018 -0500

    Fix lxc cache prep resolvers

    Recent changes in the upstream LXC images have resulted in breakage
    caused by busted symlinks, likely to the image moving to
    "systemd-resolved". This change backports the process we use in master
    to create the cache resolvers which will ensure we're not having to deal
    with this issue.

    Change-Id: I3769053956b958a0ac7cab499ea90af2a40de850
    Related-Change: I1775e775bbb7fe86bdffdd8296c2cff5ebc5bac8
    Closes-Bug: #1768592
    Signed-off-by: Kevin Carter <email address hidden>

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

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/566046

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/566054

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

Reviewed: https://review.openstack.org/566046
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-lxc_hosts/commit/?id=3ed2dfc079cdeaaab1b71151f9dd8960559f6e1b
Submitter: Zuul
Branch: stable/pike

commit 3ed2dfc079cdeaaab1b71151f9dd8960559f6e1b
Author: Kevin Carter <email address hidden>
Date: Wed May 2 20:55:04 2018 -0500

    Fix lxc cache prep resolvers

    Recent changes in the upstream LXC images have resulted in breakage
    caused by busted symlinks, likely to the image moving to
    "systemd-resolved". This change backports the process we use in master
    to create the cache resolvers which will ensure we're not having to deal
    with this issue.

    Change-Id: I3769053956b958a0ac7cab499ea90af2a40de850
    Related-Change: I1775e775bbb7fe86bdffdd8296c2cff5ebc5bac8
    Closes-Bug: #1768592
    Signed-off-by: Kevin Carter <email address hidden>
    (cherry picked from commit e77c3a923bc8aae4a264917f592b58b5d1c79aed)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible (stable/pike)

Related fix proposed to branch: stable/pike
Review: https://review.openstack.org/566229

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

Related fix proposed to branch: stable/queens
Review: https://review.openstack.org/566287

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible (stable/pike)

Related fix proposed to branch: stable/pike
Review: https://review.openstack.org/566298

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible (stable/ocata)

Related fix proposed to branch: stable/ocata
Review: https://review.openstack.org/566301

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible (stable/newton)

Related fix proposed to branch: stable/newton
Review: https://review.openstack.org/566304

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible (stable/newton)

Change abandoned by Mohammed Naser (<email address hidden>) on branch: stable/newton
Review: https://review.openstack.org/566304
Reason: Abandon and will restore to remove from CI

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

Reviewed: https://review.openstack.org/566054
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-lxc_hosts/commit/?id=38287280a57544465d61d695c97575fb53c7ce16
Submitter: Zuul
Branch: stable/ocata

commit 38287280a57544465d61d695c97575fb53c7ce16
Author: Kevin Carter <email address hidden>
Date: Wed May 2 20:55:04 2018 -0500

    Fix lxc cache prep resolvers

    Recent changes in the upstream LXC images have resulted in breakage
    caused by busted symlinks, likely to the image moving to
    "systemd-resolved". This change backports the process we use in master
    to create the cache resolvers which will ensure we're not having to deal
    with this issue.

    Change-Id: I3769053956b958a0ac7cab499ea90af2a40de850
    Related-Change: I1775e775bbb7fe86bdffdd8296c2cff5ebc5bac8
    Closes-Bug: #1768592
    Signed-off-by: Kevin Carter <email address hidden>
    (cherry picked from commit e77c3a923bc8aae4a264917f592b58b5d1c79aed)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible (stable/ocata)

Related fix proposed to branch: stable/ocata
Review: https://review.openstack.org/566309

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible (stable/pike)

Reviewed: https://review.openstack.org/566229
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=f4a12160a63eef4ff1d24b4ae879b37b4106d4ff
Submitter: Zuul
Branch: stable/pike

commit f4a12160a63eef4ff1d24b4ae879b37b4106d4ff
Author: Jean-Philippe Evrard <email address hidden>
Date: Fri May 4 09:47:57 2018 +0200

    Bump lxc_host role

    This enables the fix for bug #1768592, fixing the lxc cache prep
    resolvers issue.

    Change-Id: I8523c34af069d097c9ffb46cbc9a16f87cc84fb1
    Related-Bug: #1768592

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

Reviewed: https://review.openstack.org/566287
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=2332d151e5b65c1b7f35526173d9f84687bbaa4a
Submitter: Zuul
Branch: stable/queens

commit 2332d151e5b65c1b7f35526173d9f84687bbaa4a
Author: Jesse Pretorius <email address hidden>
Date: Fri May 4 11:58:06 2018 +0100

    Add release note for resolvconf cache prep failure

    Change-Id: I7549e6710727d71f05dbc4082f543536280e9d85
    Related-Bug: #1768592

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible (stable/pike)

Reviewed: https://review.openstack.org/566298
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=0f88f27268a7913349aaa3df393ec55668746851
Submitter: Zuul
Branch: stable/pike

commit 0f88f27268a7913349aaa3df393ec55668746851
Author: Jesse Pretorius <email address hidden>
Date: Fri May 4 11:58:06 2018 +0100

    Add release note for resolvconf cache prep failure

    Change-Id: I7549e6710727d71f05dbc4082f543536280e9d85
    Related-Bug: #1768592

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible (stable/ocata)

Reviewed: https://review.openstack.org/566301
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=b819e7b176a72598e61ee5781159b940f705710b
Submitter: Zuul
Branch: stable/ocata

commit b819e7b176a72598e61ee5781159b940f705710b
Author: Jesse Pretorius <email address hidden>
Date: Fri May 4 11:58:06 2018 +0100

    Add release note for resolvconf cache prep failure

    Change-Id: I7549e6710727d71f05dbc4082f543536280e9d85
    Related-Bug: #1768592

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible (stable/newton)

Reviewed: https://review.openstack.org/566304
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=7b102466b1cbf61e06203e4977e71b72b54755e5
Submitter: Zuul
Branch: stable/newton

commit 7b102466b1cbf61e06203e4977e71b72b54755e5
Author: Jesse Pretorius <email address hidden>
Date: Fri May 4 11:58:06 2018 +0100

    Add release note for resolvconf cache prep failure

    Change-Id: I7549e6710727d71f05dbc4082f543536280e9d85
    Related-Bug: #1768592

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible (stable/ocata)

Reviewed: https://review.openstack.org/566309
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=bf7eaef96002564806eb2ccbe2946089a4d308bb
Submitter: Zuul
Branch: stable/ocata

commit bf7eaef96002564806eb2ccbe2946089a4d308bb
Author: Jesse Pretorius <email address hidden>
Date: Fri May 4 14:13:51 2018 +0100

    Update lxc_host/pip_install role SHA's

    This enables the fix for bug #1768592, fixing the lxc cache prep
    resolvers issue. The pip_install role SHA bump was also required
    to get CentOS host builds to a working state.

    Change-Id: I8523c34af069d097c9ffb46cbc9a16f87cc84fb1
    Related-Bug: #1768592

Changed in openstack-ansible:
importance: Undecided → Critical
status: New → Fix Committed
Revision history for this message
Shannon Mitchell (shannon-mitchell) wrote :

I tried the workaround with the following setting in newton.

oot@infra1:~# cat /etc/openstack_deploy/user_resolvconf_fix.yml
lxc_cache_prep_pre_commands: "rm -f /etc/resolv.conf || true"

It got past the cache-prep-commands.sh failure, but died when building out the repo containers. After logging into several of the containers the /etc/resolv.conf was missing all together.

I added a lxc_cache_prep_post_commands entry to rebuild the link, and can now see the /etc/resolv.conf after the containers come online now.

root@infra1:~# cat /etc/openstack_deploy/user_resolvconf_fix.yml
lxc_cache_prep_pre_commands: "rm -f /etc/resolv.conf || true"
lxc_cache_prep_post_commands: "ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf -f"

root@infra1:~# lxc-attach -n infra1_repo_container-786d898b
root@infra1-repo-container-786d898b:~# ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 29 May 4 16:35 /etc/resolv.conf -> ../run/resolvconf/resolv.conf

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible (stable/newton)

Related fix proposed to branch: stable/newton
Review: https://review.openstack.org/566968

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible (stable/ocata)

Related fix proposed to branch: stable/ocata
Review: https://review.openstack.org/567050

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible (stable/pike)

Related fix proposed to branch: stable/pike
Review: https://review.openstack.org/567051

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

Related fix proposed to branch: stable/queens
Review: https://review.openstack.org/567052

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible (stable/newton)

Reviewed: https://review.openstack.org/566968
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=ba1d25737c63478a16217a8d0e46edf903bf3b75
Submitter: Zuul
Branch: stable/newton

commit ba1d25737c63478a16217a8d0e46edf903bf3b75
Author: Jesse Pretorius <email address hidden>
Date: Tue May 8 19:33:15 2018 +0100

    Update release note for resolvconf cache prep failure

    The previously recommended method got it past the cache prep, but
    failed later due to a missing resolver configuration when the
    container started. This additional change fixes that.

    Change-Id: I196f4e29cfef5f0eb0fcacf898ded877672d99f9
    Related-Bug: #1768592

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

Reviewed: https://review.openstack.org/567052
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=15368cecd6713a4183d1ed6d64327dfc8a4a9e64
Submitter: Zuul
Branch: stable/queens

commit 15368cecd6713a4183d1ed6d64327dfc8a4a9e64
Author: Jesse Pretorius <email address hidden>
Date: Tue May 8 19:33:15 2018 +0100

    Update release note for resolvconf cache prep failure

    The previously recommended method got it past the cache prep, but
    failed later due to a missing resolver configuration when the
    container started. This additional change fixes that.

    Change-Id: I196f4e29cfef5f0eb0fcacf898ded877672d99f9
    Related-Bug: #1768592

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible (stable/ocata)

Reviewed: https://review.openstack.org/567050
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=e426377c1f64d53cf9c5ac1fb62f9275096c03f1
Submitter: Zuul
Branch: stable/ocata

commit e426377c1f64d53cf9c5ac1fb62f9275096c03f1
Author: Jesse Pretorius <email address hidden>
Date: Tue May 8 19:33:15 2018 +0100

    Update release note for resolvconf cache prep failure

    The previously recommended method got it past the cache prep, but
    failed later due to a missing resolver configuration when the
    container started. This additional change fixes that.

    Change-Id: I196f4e29cfef5f0eb0fcacf898ded877672d99f9
    Related-Bug: #1768592

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible (stable/pike)

Reviewed: https://review.openstack.org/567051
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=b97e2163fb2e732bdc0ba6c30fa911fc9c6928ac
Submitter: Zuul
Branch: stable/pike

commit b97e2163fb2e732bdc0ba6c30fa911fc9c6928ac
Author: Jesse Pretorius <email address hidden>
Date: Tue May 8 19:33:15 2018 +0100

    Update release note for resolvconf cache prep failure

    The previously recommended method got it past the cache prep, but
    failed later due to a missing resolver configuration when the
    container started. This additional change fixes that.

    Change-Id: I196f4e29cfef5f0eb0fcacf898ded877672d99f9
    Related-Bug: #1768592

Changed in openstack-ansible:
assignee: nobody → Jesse Pretorius (jesse-pretorius)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-lxc_hosts 17.0.4

This issue was fixed in the openstack/openstack-ansible-lxc_hosts 17.0.4 release.

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

This issue was fixed in the openstack/openstack-ansible-lxc_hosts 16.0.13 release.

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

This issue was fixed in the openstack/openstack-ansible-lxc_hosts 15.1.21 release.

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

Reviewed: https://review.openstack.org/567137
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-lxc_hosts/commit/?id=ed7270e8146718c5b278026c49b5135572b6fc25
Submitter: Zuul
Branch: stable/queens

commit ed7270e8146718c5b278026c49b5135572b6fc25
Author: Jesse Pretorius <email address hidden>
Date: Wed May 9 08:25:11 2018 +0100

    Fix LXC cache resolvers more appropriately

    The implementation of I3769053956b958a0ac7cab499ea90af2a40de850
    was somewhat brutal in the approach based on the assumption that
    systemd networking is implemented in the base cache. This may be
    true for Rocky, but is not true for any of the older branches.

    This patch returns the previous method, but fixes it in two ways:

    1. It uses the -f file test operator, instead of the deprecated
       -a operator.
    2. It also tests for the presence of a symbolic link with -L.

    The downloaded image has resolvconf installed, so there is a symlink
    for /etc/resolv.conf which points to /run/resolvconf/resolv.conf
    in the cache. Given that in a chroot /run does not exist, the file
    test operator fails. This is why we're adding the symlink check.

    Instead of then removing resolv.conf at the end, we return it back
    so that resolveconf works as expected. This is important for anyone
    implementing their resolvers through configuration of network
    interfaces.

    This is only implemented for Queens and older because for master
    we've moved to using a different image source, and using
    systemd-resolved.

    Closes-Bug: #1768592
    Change-Id: I11d069e2d0cb3becad067689fa8f1e4c9391f368

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

Reviewed: https://review.openstack.org/567184
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-lxc_hosts/commit/?id=33daa0bdd1250c9ad9b9f35005b45b10741a34a7
Submitter: Zuul
Branch: stable/ocata

commit 33daa0bdd1250c9ad9b9f35005b45b10741a34a7
Author: Jesse Pretorius <email address hidden>
Date: Wed May 9 08:25:11 2018 +0100

    Fix LXC cache resolvers more appropriately

    The implementation of I3769053956b958a0ac7cab499ea90af2a40de850
    was somewhat brutal in the approach based on the assumption that
    systemd networking is implemented in the base cache. This may be
    true for Rocky, but is not true for any of the older branches.

    This patch returns the previous method, but fixes it in two ways:

    1. It uses the -f file test operator, instead of the deprecated
       -a operator.
    2. It also tests for the presence of a symbolic link with -L.

    The downloaded image has resolvconf installed, so there is a symlink
    for /etc/resolv.conf which points to /run/resolvconf/resolv.conf
    in the cache. Given that in a chroot /run does not exist, the file
    test operator fails. This is why we're adding the symlink check.

    Instead of then removing resolv.conf at the end, we return it back
    so that resolveconf works as expected. This is important for anyone
    implementing their resolvers through configuration of network
    interfaces.

    This is only implemented for Queens and older because for master
    we've moved to using a different image source, and using
    systemd-resolved.

    Closes-Bug: #1768592
    Change-Id: I11d069e2d0cb3becad067689fa8f1e4c9391f368
    (cherry picked from commit ed7270e8146718c5b278026c49b5135572b6fc25)

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

Reviewed: https://review.openstack.org/567161
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-lxc_hosts/commit/?id=f7b315ce6f75c048b469300822f104287d34630b
Submitter: Zuul
Branch: stable/pike

commit f7b315ce6f75c048b469300822f104287d34630b
Author: Jesse Pretorius <email address hidden>
Date: Wed May 9 08:25:11 2018 +0100

    Fix LXC cache resolvers more appropriately

    The implementation of I3769053956b958a0ac7cab499ea90af2a40de850
    was somewhat brutal in the approach based on the assumption that
    systemd networking is implemented in the base cache. This may be
    true for Rocky, but is not true for any of the older branches.

    This patch returns the previous method, but fixes it in two ways:

    1. It uses the -f file test operator, instead of the deprecated
       -a operator.
    2. It also tests for the presence of a symbolic link with -L.

    The downloaded image has resolvconf installed, so there is a symlink
    for /etc/resolv.conf which points to /run/resolvconf/resolv.conf
    in the cache. Given that in a chroot /run does not exist, the file
    test operator fails. This is why we're adding the symlink check.

    Instead of then removing resolv.conf at the end, we return it back
    so that resolveconf works as expected. This is important for anyone
    implementing their resolvers through configuration of network
    interfaces.

    This is only implemented for Queens and older because for master
    we've moved to using a different image source, and using
    systemd-resolved.

    Closes-Bug: #1768592
    Change-Id: I11d069e2d0cb3becad067689fa8f1e4c9391f368
    (cherry picked from commit ed7270e8146718c5b278026c49b5135572b6fc25)

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

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

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

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/569014

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/569015

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

Reviewed: https://review.openstack.org/569015
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=5d92bc4ee70e413530620751aca0bc768b41e85a
Submitter: Zuul
Branch: stable/ocata

commit 5d92bc4ee70e413530620751aca0bc768b41e85a
Author: Jesse Pretorius <email address hidden>
Date: Thu May 17 06:35:12 2018 +0100

    Update lxc_hosts role SHA for cache resolver fix

    In order to ensure that https://review.openstack.org/567184
    is included in the next release, we bump the role SHA.

    Change-Id: Iba329a23d3388a588cc8d030c97c20664edbbaee
    Closes-Bug: #1768592

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

Reviewed: https://review.openstack.org/569014
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=a6458d0d1a0b4aa7e6125462ef36b775587c5c45
Submitter: Zuul
Branch: stable/pike

commit a6458d0d1a0b4aa7e6125462ef36b775587c5c45
Author: Jesse Pretorius <email address hidden>
Date: Thu May 17 06:33:11 2018 +0100

    Update lxc_hosts role SHA for cache resolver fix

    In order to ensure that https://review.openstack.org/567161
    is included in the next release, we bump the role SHA.

    Change-Id: Iba329a23d3388a588cc8d030c97c20664edbbaee
    Closes-Bug: #1768592

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

Reviewed: https://review.openstack.org/569013
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=4b53dbea90a3c2d3c0808cb9a342b99dfd5eed9e
Submitter: Zuul
Branch: stable/queens

commit 4b53dbea90a3c2d3c0808cb9a342b99dfd5eed9e
Author: Jesse Pretorius <email address hidden>
Date: Thu May 17 06:30:52 2018 +0100

    Update lxc_hosts role SHA for cache resolver fix

    In order to ensure that https://review.openstack.org/567137
    is included in the next release, we bump the role SHA.

    Change-Id: Iba329a23d3388a588cc8d030c97c20664edbbaee
    Closes-Bug: #1768592

Changed in openstack-ansible:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible 15.1.22

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

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

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

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-lxc_hosts ocata-em

This issue was fixed in the openstack/openstack-ansible-lxc_hosts ocata-em release.

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

This issue was fixed in the openstack/openstack-ansible-lxc_hosts 16.0.29 release.

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

This issue was fixed in the openstack/openstack-ansible-lxc_hosts queens-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.