cloud-init may destroy network config on reboot if config-drive is not found

Bug #1958332 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Harald Jensås

Bug Description

BugZillas:
 * https://bugzilla.redhat.com/show_bug.cgi?id=1773637
 * https://bugzilla.redhat.com/show_bug.cgi?id=1773642

The above bugs describe an issue where cloud-init may destroy the network configuration for one interface on reboot. The bug should have been fixed, but in Bz1773642 there is a report that the issue was seen in Wallaby.

We can safe-guard against such issue by disabling network config in cloud-init once we have had a successfull network configuration applied by triple_network_cofing ansible role.

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/825278
Committed: https://opendev.org/openstack/tripleo-ansible/commit/85bcbfb8a6d53cbcf2b727e0b0bf12b3e4281567
Submitter: "Zuul (22348)"
Branch: master

commit 85bcbfb8a6d53cbcf2b727e0b0bf12b3e4281567
Author: Harald Jensås <email address hidden>
Date: Wed Jan 19 06:09:47 2022 +0100

    Disable cloud-init netconfig post os-net-config

    After a successfull os-net-config run disable network config
    in cloud-init.

    There has been reports of cloud-init re-writing network config
    files on reboot, resulting in incorrect network configuration.

    Closes-Bug: #1958332
    Change-Id: I3e3692030b86e4afff6fc5e09cd763ee1e184cfa

Changed in tripleo:
status: In Progress → Fix Released
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/c/openstack/tripleo-ansible/+/826023

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/826023
Committed: https://opendev.org/openstack/tripleo-ansible/commit/7d16b0f33f37ba9196838003e5da578239273473
Submitter: "Zuul (22348)"
Branch: master

commit 7d16b0f33f37ba9196838003e5da578239273473
Author: Cédric Jeanneret <email address hidden>
Date: Mon Jan 24 08:58:59 2022 +0100

    Ensure cloud-init config dir exists

    In some cases, it may happen cloud-init isn't installed (on the UC, for
    instance).
    In such cases, the directory doesn't exist, and ansible fails to push
    the file to this location, leading to a deploy error.

    Change-Id: I02b8aef9bf8ae73556ade37a20bd0afda2786321
    Related-Bug: #1958332

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

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/826157

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/826157
Committed: https://opendev.org/openstack/tripleo-ansible/commit/6ae4970c70595af582b6e0de00a46cbe707082f9
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 6ae4970c70595af582b6e0de00a46cbe707082f9
Author: Harald Jensås <email address hidden>
Date: Wed Jan 19 06:09:47 2022 +0100

    Disable cloud-init netconfig post os-net-config

    This is a combination of 2 commits.

    This is the 1st commit message:

    After a successfull os-net-config run disable network config
    in cloud-init.

    There has been reports of cloud-init re-writing network config
    files on reboot, resulting in incorrect network configuration.

    This is the 2nd commit message:

    Ensure cloud-init config dir exists

    In some cases, it may happen cloud-init isn't installed (on the UC, for
    instance).
    In such cases, the directory doesn't exist, and ansible fails to push
    the file to this location, leading to a deploy error.

    Closes-Bug: #1958332
    Change-Id: I3e3692030b86e4afff6fc5e09cd763ee1e184cfa
    (cherry picked from commit 85bcbfb8a6d53cbcf2b727e0b0bf12b3e4281567)
    (cherry picked from commit 7d16b0f33f37ba9196838003e5da578239273473)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/826371

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

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/826394

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/826396

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/826371
Committed: https://opendev.org/openstack/tripleo-ansible/commit/757512484fc4693c568dbc0587cdb6e483481899
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 757512484fc4693c568dbc0587cdb6e483481899
Author: Harald Jensås <email address hidden>
Date: Wed Jan 19 06:09:47 2022 +0100

    Disable cloud-init netconfig post os-net-config

    This is a combination of 2 commits.

    This is the 1st commit message:

    After a successfull os-net-config run disable network config
    in cloud-init.

    There has been reports of cloud-init re-writing network config
    files on reboot, resulting in incorrect network configuration.

    This is the 2nd commit message:

    Ensure cloud-init config dir exists

    In some cases, it may happen cloud-init isn't installed (on the UC, for
    instance).
    In such cases, the directory doesn't exist, and ansible fails to push
    the file to this location, leading to a deploy error.

    Closes-Bug: #1958332
    Change-Id: I3e3692030b86e4afff6fc5e09cd763ee1e184cfa
    (cherry picked from commit 85bcbfb8a6d53cbcf2b727e0b0bf12b3e4281567)
    (cherry picked from commit 7d16b0f33f37ba9196838003e5da578239273473)
    (cherry picked from commit 6ae4970c70595af582b6e0de00a46cbe707082f9)

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/826396
Committed: https://opendev.org/openstack/tripleo-ansible/commit/a63697ffd67f24f65feec88acd8d164154f01d9f
Submitter: "Zuul (22348)"
Branch: stable/train

commit a63697ffd67f24f65feec88acd8d164154f01d9f
Author: Harald Jensås <email address hidden>
Date: Wed Jan 19 06:09:47 2022 +0100

    Disable cloud-init netconfig post os-net-config

    This is a combination of 2 commits.

    This is the 1st commit message:

    After a successfull os-net-config run disable network config
    in cloud-init.

    There has been reports of cloud-init re-writing network config
    files on reboot, resulting in incorrect network configuration.

    This is the 2nd commit message:

    Ensure cloud-init config dir exists

    In some cases, it may happen cloud-init isn't installed (on the UC, for
    instance).
    In such cases, the directory doesn't exist, and ansible fails to push
    the file to this location, leading to a deploy error.

    Closes-Bug: #1958332
    Change-Id: I3e3692030b86e4afff6fc5e09cd763ee1e184cfa
    (cherry picked from commit 85bcbfb8a6d53cbcf2b727e0b0bf12b3e4281567)
    (cherry picked from commit 7d16b0f33f37ba9196838003e5da578239273473)
    (cherry picked from commit daf76eb86a4bcf9b14e0b2c5125bfb5a7ce5e20f)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-ansible (stable/ussuri)

Change abandoned by "Harald Jensås <email address hidden>" on branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/826394
Reason: Branch is going EOL.

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

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

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

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

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

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