RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1136843 - NetworkManager ifups VDSM's reference bond
Summary: NetworkManager ifups VDSM's reference bond
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.0
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jirka Klimes
QA Contact: Desktop QE
URL:
Whiteboard: network
Depends On:
Blocks: 1142701
TreeView+ depends on / blocked
 
Reported: 2014-09-03 12:14 UTC by Ondřej Svoboda
Modified: 2015-03-05 13:52 UTC (History)
11 users (show)

Fixed In Version: NetworkManager-0.9.9.1-35.git20140326.4dba720.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1142701 (view as bug list)
Environment:
Last Closed: 2015-03-05 13:52:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
journalctl -b -u NetworkManager.service (2.94 KB, text/plain)
2014-09-03 12:14 UTC, Ondřej Svoboda
no flags Details
[PATCH] core: don't generate a connection for unmanaged devices (4.21 KB, patch)
2014-09-08 16:34 UTC, Jirka Klimes
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0311 0 normal SHIPPED_LIVE NetworkManager bug fix and enhancement update 2015-03-05 17:35:10 UTC

Description Ondřej Svoboda 2014-09-03 12:14:09 UTC
Created attachment 934065 [details]
journalctl -b -u NetworkManager.service

Description of problem:

VDSM component of oVirt project is used (among many other tasks) to manage and monitor select network devices of a virtualization slave. In particular, to be able to report options of bonding devices it manages, it has to create a randomly named (to prevent clashes) dummy bond on startup to asses default kernel options (and deletes it right away).

As soon as NetworkManager learns of this new bonding device it sets its state to UP. This, however, makes VDSM unable to change bonding mode of the device ("Operation not permitted"), which is crucial for reading default bonding options across modes.

As a workaround, VDSM could ifdown the device but I am seeking a solution in NetworkManager. I hoped that installing NetworkManager-config-server package would prevent NM from managing the bond, but neither of two directives in 00-server.conf, 'no-auto-default' and 'ignore-carrier', apply to this situation.

Is there a way to keep this bond in its DOWN state with NetworkManager running?

Version-Release number of selected component (if applicable):

NetworkManager-0.9.9.1-25.git20140326.4dba720.el7_0.x86_64
NetworkManager-config-server-0.9.9.1-25.git20140326.4dba720.el7_0.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Make sure you have NetworkManager running with 00-server.conf in /etc/NetworkManager/conf.d/
2. echo +do_not_ifup > /sys/class/net/bonding_masters
3. ip link show do_not_ifup

Actual results:

9: do_not_ifup: <NO-CARRIER,BROADCAST,MULTICAST,MASTER,UP> mtu 1500 qdisc noqueue state DOWN mode DEFAULT
    link/ether 4a:9f:7f:1e:61:f0 brd ff:ff:ff:ff:ff:ff

Expected results:

9: do_not_ifup: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noqueue state DOWN mode DEFAULT 
    link/ether 4a:9f:7f:1e:61:f0 brd ff:ff:ff:ff:ff:ff

Additional info:

journalctl -b -u NetworkManager.service attached.

Comment 2 Jirka Klimes 2014-09-03 14:05:16 UTC
It should be sufficient to add 'unmanaged-devices' option to keyfile section in NetworkManager.conf.
/etc/NetworkManager.conf

...
[keyfile]
unmanaged-devices=interface-name:do_not_ifup;interface-name:other_iface;

Unfortunately, RHEL7 version of NM misses this commit:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=194b14e39899e8f3a73b1a151ed5384ecbf80149
which will cause that a connection will be created for the interface. And NM will not show the interface as unmanaged. However, the interface will be downed, so this could be good enough for your usecase.

Alternatively, you can add the line into the config file *after* you created the interface, this will cause that NM will properly unmanage the interface.
Yet another way is to create /etc/sysconfig/network-scripts/ifcfg-bla
with this content:
DEVICE=do_not_ifup
NM_CONTROLLED=no
and then call 'nmcli con load /etc/sysconfig/network-scripts/ifcfg-bla'

Note:
We consider adding an API for unmanaging interfaces, see bug 1114685. However, the main goal is to make NetworkManager to be non-disruptive, so that one doesn't have to care about whether an interface is managed or not.

Comment 3 Antoni Segura Puimedon 2014-09-03 21:24:46 UTC
Hi Jirka,

When you say 'the interface will be downed' do you mean that it will be taken back down after NM takes it up? If that is the case, we need a way to work around (or better yet, prevent) the iff_up.

Comment 4 Ondřej Svoboda 2014-09-03 23:16:52 UTC
Jirka, thanks for your answer :-)

(In reply to Jirka Klimes from comment #2)
> It should be sufficient to add 'unmanaged-devices' option to keyfile section
> in NetworkManager.conf.
> /etc/NetworkManager.conf
> 
> ...
> [keyfile]
> unmanaged-devices=interface-name:do_not_ifup;interface-name:other_iface;
> 
> Unfortunately, RHEL7 version of NM misses this commit:
> http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/
> ?id=194b14e39899e8f3a73b1a151ed5384ecbf80149
> which will cause that a connection will be created for the interface. And NM
> will not show the interface as unmanaged. However, the interface will be
> downed, so this could be good enough for your usecase.

If this option accepts a glob like bond* and can be added to /etc/NetworkManager/conf.d/00-server.conf I consider this a good solution for my problem :-) I would only have to name the dummy bond accordingly (append the random part to 'bond' prefix).

> Alternatively, you can add the line into the config file *after* you created
> the interface, this will cause that NM will properly unmanage the interface.

I'd rather have NM completely ignore the bond.

> Yet another way is to create /etc/sysconfig/network-scripts/ifcfg-bla
> with this content:
> DEVICE=do_not_ifup
> NM_CONTROLLED=no
> and then call 'nmcli con load /etc/sysconfig/network-scripts/ifcfg-bla'

This is also a good workaround. If only NM watched the directory and modified the connection automatically :-)

> Note:
> We consider adding an API for unmanaging interfaces, see bug 1114685.
> However, the main goal is to make NetworkManager to be non-disruptive, so
> that one doesn't have to care about whether an interface is managed or not.

The second approach hints that a proper API is welcome. Taking manual control should be possible, at least for troubleshooting. But this comment belongs to the linked bug, I guess.

Comment 5 Jirka Klimes 2014-09-08 16:31:23 UTC
(In reply to Antoni Segura Puimedon from comment #3)
> Hi Jirka,
> 
> When you say 'the interface will be downed' do you mean that it will be
> taken back down after NM takes it up? If that is the case, we need a way to
> work around (or better yet, prevent) the iff_up.

In my test the interface stays down, so it should be OK.
Anyway, NM will not show the interface as unmanaged. So we should include the commit I pointed out in comment #2 into RHEL7:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=194b14e39899e8f3a73b1a151ed5384ecbf80149

I would focus this bug on that.

Comment 6 Jirka Klimes 2014-09-08 16:34:02 UTC
Created attachment 935415 [details]
[PATCH] core: don't generate a connection for unmanaged devices

Rebase of the upstream patch to RHEL7 code.

Comment 9 Dan Winship 2014-09-11 12:30:14 UTC
patch looks right

Comment 14 errata-xmlrpc 2015-03-05 13:52:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0311.html


Note You need to log in before you can comment on or make changes to this bug.