ifdown does not work if no ifcfg file exist

Bug #1836024 reported by Noam Angel
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-net-config
Fix Released
Undecided
Noam Angel

Bug Description

ifdown happen before writing_config and if interface is up by dhcp/dhclient will not be down, ifdown relaying on ifcfg exist.

https://github.com/openstack/os-net-config/blob/master/os_net_config/impl_ifcfg.py#L1592

causing issue when pxe boot interface is also used in part of bond interface.
interface is required to be down before adding to bond, failing network config at first run.

suggestion:

use "ip link set dev $interface down"

or

move all write_config to be before ifdown.

Noam Angel (noama)
description: updated
Noam Angel (noama)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (master)

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

Changed in os-net-config:
assignee: nobody → Noam Angel (noama)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (master)

Reviewed: https://review.opendev.org/670020
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=9aaaeb21eefc7622c6b6afeb0ac62830c40107f8
Submitter: Zuul
Branch: master

commit 9aaaeb21eefc7622c6b6afeb0ac62830c40107f8
Author: Noam Angel <email address hidden>
Date: Wed Jul 10 09:23:03 2019 +0000

    ifdown does not work if no ifcfg file exist

    ifdown happen before writing_config and if interface is up by
    dhcp/dhclient it will not be down, ifdown relaying on ifcfg exist.

    causing issue when pxe boot interface is also used as part of bond
    interface.
    interface is required to be down before adding to bond,
    this patch validate that any physical interface will be in down state.

    Change-Id: Ie096bf1296062744193bdcb9713ee42405e206d8
    Closes-Bug: #1836024

Changed in os-net-config:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (stable/stein)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (stable/rocky)

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

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (stable/stein)

Reviewed: https://review.opendev.org/671557
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=46e3e6508560a2f6b3abbea7cf4460a7afe03418
Submitter: Zuul
Branch: stable/stein

commit 46e3e6508560a2f6b3abbea7cf4460a7afe03418
Author: Noam Angel <email address hidden>
Date: Wed Jul 10 09:23:03 2019 +0000

    ifdown does not work if no ifcfg file exist

    ifdown happen before writing_config and if interface is up by
    dhcp/dhclient it will not be down, ifdown relaying on ifcfg exist.

    causing issue when pxe boot interface is also used as part of bond
    interface.
    interface is required to be down before adding to bond,
    this patch validate that any physical interface will be in down state.

    Change-Id: Ie096bf1296062744193bdcb9713ee42405e206d8
    Closes-Bug: #1836024
    (cherry picked from commit 9aaaeb21eefc7622c6b6afeb0ac62830c40107f8)

tags: added: in-stable-stein
tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (stable/rocky)

Reviewed: https://review.opendev.org/671558
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=b6cc6eca35fe91a6fbf9920b40870a8fdde25c05
Submitter: Zuul
Branch: stable/rocky

commit b6cc6eca35fe91a6fbf9920b40870a8fdde25c05
Author: Noam Angel <email address hidden>
Date: Wed Jul 10 09:23:03 2019 +0000

    ifdown does not work if no ifcfg file exist

    ifdown happen before writing_config and if interface is up by
    dhcp/dhclient it will not be down, ifdown relaying on ifcfg exist.

    causing issue when pxe boot interface is also used as part of bond
    interface.
    interface is required to be down before adding to bond,
    this patch validate that any physical interface will be in down state.

    Change-Id: Ie096bf1296062744193bdcb9713ee42405e206d8
    Closes-Bug: #1836024
    (cherry picked from commit 9aaaeb21eefc7622c6b6afeb0ac62830c40107f8)
    (cherry picked from commit 46e3e6508560a2f6b3abbea7cf4460a7afe03418)

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

Reviewed: https://review.opendev.org/671560
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=08dd63ec002e11958f9b2cf25d8e6d3663cef8d4
Submitter: Zuul
Branch: stable/queens

commit 08dd63ec002e11958f9b2cf25d8e6d3663cef8d4
Author: Noam Angel <email address hidden>
Date: Wed Jul 10 09:23:03 2019 +0000

    ifdown does not work if no ifcfg file exist

    ifdown happen before writing_config and if interface is up by
    dhcp/dhclient it will not be down, ifdown relaying on ifcfg exist.

    causing issue when pxe boot interface is also used as part of bond
    interface.
    interface is required to be down before adding to bond,
    this patch validate that any physical interface will be in down state.

    Change-Id: Ie096bf1296062744193bdcb9713ee42405e206d8
    Closes-Bug: #1836024
    (cherry picked from commit 9aaaeb21eefc7622c6b6afeb0ac62830c40107f8)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 11.1.0

This issue was fixed in the openstack/os-net-config 11.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 10.4.1

This issue was fixed in the openstack/os-net-config 10.4.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 9.4.1

This issue was fixed in the openstack/os-net-config 9.4.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 8.5.1

This issue was fixed in the openstack/os-net-config 8.5.1 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.