unable to remove interfaces from bridge, automatically reatached after restarting network

Issues related to configuring your network
Post Reply
beeaaver
Posts: 2
Joined: 2017/12/24 12:20:02

unable to remove interfaces from bridge, automatically reatached after restarting network

Post by beeaaver » 2017/12/24 12:45:47

hi,
I'm working on Centos 7.2 kernel version 3.10.0-327.36.3.
I'm writing a simple bash script that modifies some network parameters of a server.

I'm trying to remove some interfaces from a linux bridge, but they keep coming back after restarting the network service.

the initial configuration is:
4: enp7s0f2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-MCP state UP qlen 1000
link/ether 00:10:f3:5e:fe:11 brd ff:ff:ff:ff:ff:ff
5: enp7s0f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br-MCP state UP qlen 1000
link/ether 00:10:f3:5e:fe:12 brd ff:ff:ff:ff:ff:ff
first I delete the "BRIDGE=br-MCP" line from ifcfg-enp7s0f2 and from ifcfg-enp7s0f3.
then I remove the interfaces using brctl tool:
#brctl delif br-MCP enp7s0f2
#brctl delif br-MCP enp7s0f3

so far everything works as expected.
at the end of my script I restart the network service in order to apply other changes I made to other interfaces.
after restarting the network service, the interfaces are reattached to the br-MCP bridge.

I tried going through the process manually, same result, after restarting the network service the reattached to the bridge.

what am I missing here?
how can I remove the interfaces from the bridge permanently?

best regards,
Igal

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: unable to remove interfaces from bridge, automatically reatached after restarting network

Post by TrevorH » 2017/12/24 16:45:35

I'm working on Centos 7.2 kernel version 3.10.0-327.36.3.
Don't. That's about 2 years old so you are missing a whole raft of security fixes, some of them very serious. 7.4 is current and the only version that gets fixes. Run yum update to get up to date.

Is NetworkManager installed and running?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

beeaaver
Posts: 2
Joined: 2017/12/24 12:20:02

Re: unable to remove interfaces from bridge, automatically reatached after restarting network

Post by beeaaver » 2017/12/25 06:36:45

unfortunately updating the kernel is not my decision to make and it won't be updated in the near future..

network manager is disabled.
the system has an openVswitch running, but it has nothing to do with those 2 interfaces.

what I am missing in the bridge removal sequence?
why does it keep coming back from the dead? :twisted:

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: unable to remove interfaces from bridge, automatically reatached after restarting network

Post by TrevorH » 2017/12/26 16:13:56

unfortunately updating the kernel is not my decision to make and it won't be updated in the near future..
That's a common excuse and not a valid one. Please ask e.g. equifax how that worked out for them!

I would suggest reading the Redhat errata pages for RHEL7 and filtering on critical and important and reading the items there dated since the release of 7.3 in March 2016. If you've never updated CentOS 7.2 then you need to read the links dating back to March 2015 instead.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply