Bug 1117636 - network configuration is ignored switching from static to dhcp
network configuration is ignored switching from static to dhcp
Status: RESOLVED DUPLICATE of bug 1122194
Classification: openSUSE
Product: openSUSE Distribution
Classification: openSUSE
Component: Network
Leap 15.0
Other Other
: P5 - None : Major (vote)
: ---
Assigned To: wicked maintainers
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-11-28 11:19 UTC by Wolfgang Rosenauer
Modified: 2019-01-31 13:06 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Rosenauer 2018-11-28 11:19:57 UTC
My network configuration for eth0 is:
BOOTPROTO='static'
STARTMODE='auto'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.250.1/24'
MTU=''
NAME=''
NETWORK=''
REMOTE_IPADDR=''

I think this is even working after a reboot.
But after some time I end up with a dynamic address anyway:

Hygiea:/etc/sysconfig/network # ip -4 addr show eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet 192.168.250.103/24 brd 192.168.250.255 scope global noprefixroute dynamic eth0
       valid_lft 683775sec preferred_lft 683775sec
    inet 192.168.250.1/24 brd 192.168.250.255 scope global secondary eth0
       valid_lft forever preferred_lft forever
Comment 1 Marius Tomaschewski 2019-01-30 09:42:59 UTC
Hi Wolfgang!

What is
 systemctl status network.service wicked*.service NetworkManager.service
showing on your system?

A "systemctl show -P Id network.service" shows which service is currently
enabled as network.service (wicked.service or NetworkManager.service), but
the above status call shows if there is something running that is disabled.


When you change a config from BOOTPROTO='dhcp' to BOOTPROTO='static', please
use "rcnetwork reload" or "wicked ifreload all", "wicked ifreload eth0 eth1"
to apply it.

But this seems to be a result of improper switch between e.g. NetworkManager
and wicked. The 192.168.250.103/24 address wasn't applied by wickedd dhcp4,
but by NetworkManager or whatever is running additionaly to wicked as wickedd
dhcp4 is never applying the noprefixroute option.

When you are switching manually, you need IMO (¹: I didn't tested it):
- NM to wicked:
  systemctl disable NetworkManager.service             # disable current service
  systemctl stop --kill-who=all NetworkManager.service # network + NM + dhclients
  #
  systemctl enable wicked.service                      # enable wicked* services
  systemctl start network.service                      # start enabled service
- wicked to NM:
  systemctl disable wicked.service                     # disable current service
  systemctl stop wicked.service                        # optional? stop network
  systemctl stop wickedd.service                       # stop wickedd* services
  #
  systemctl enable NetworkManager.service              # enable NM
  systemctl start network.service                      # start enabled service

The "--kill-who=all" is needed to not stop the NetworkManager daemon only,
but also the dhclients, ... it started because NetworkManager.service is
using the KillMode=process causing to not stop them on stop request to
survive shutdown on systems with mounted remote-fs.

Wicked is using two parts: wickedd*.service that start daemons and the
wicked.service alias network.service, which is calling "ifup" and "ifdown"
commands which trigger the actions in wickedd*, that is it starts/stops the
network.

¹: This should be done properly by switching between the services in yast2,
when it isn't and wicked* + NetworkManager are running at the same time, it
is a yast2-network bug. When the manual switch was incorrect, it is invalid.
Comment 2 Marius Tomaschewski 2019-01-30 09:44:01 UTC
What is
 systemctl status network.service wicked*.service NetworkManager.service
showing on your system? Did you switches between them in yast2 or manually?
Comment 3 Wolfgang Rosenauer 2019-01-30 10:25:12 UTC
First of all. Just at this moment my machine is not in this state.
My desktop is running 24x7 usually so I have no idea when it started or starts again. My last reboot was just a few days ago.
But then again I did not change any network settings since I had this.

(In reply to Marius Tomaschewski from comment #1)
> What is
>  systemctl status network.service wicked*.service NetworkManager.service
> showing on your system?

● wicked.service - wicked managed network interfaces
   Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled; vendor preset: disabled)
   Active: active (exited) since Fri 2019-01-25 23:07:27 CET; 4 days ago
  Process: 1250 ExecStart=/usr/sbin/wicked --systemd ifup all (code=exited, status=0/SUCCESS)
 Main PID: 1250 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/wicked.service

Jan 25 23:07:21 Hygiea systemd[1]: Starting wicked managed network interfaces...
Jan 25 23:07:27 Hygiea wicked[1250]: lo              up
Jan 25 23:07:27 Hygiea wicked[1250]: eth0            up
Jan 25 23:07:27 Hygiea systemd[1]: Started wicked managed network interfaces.

● NetworkManager.service - Network Manager
   Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
           └─NetworkManager-ovs.conf
   Active: inactive (dead)
     Docs: man:NetworkManager(8)

● wickedd-auto4.service - wicked AutoIPv4 supplicant service
   Loaded: loaded (/usr/lib/systemd/system/wickedd-auto4.service; enabled; vendor preset: disabled)
   Active: active (running)
 Main PID: 1115 (wickedd-auto4)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/wickedd-auto4.service
           └─1115 /usr/lib/wicked/bin/wickedd-auto4 --systemd --foreground

Jan 25 23:07:20 Hygiea systemd[1]: Starting wicked AutoIPv4 supplicant service...
Jan 25 23:07:20 Hygiea systemd[1]: Started wicked AutoIPv4 supplicant service.

● wicked.service - wicked managed network interfaces
   Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled; vendor preset: disabled)
   Active: active (exited) since Fri 2019-01-25 23:07:27 CET; 4 days ago
  Process: 1250 ExecStart=/usr/sbin/wicked --systemd ifup all (code=exited, status=0/SUCCESS)
 Main PID: 1250 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   CGroup: /system.slice/wicked.service

Jan 25 23:07:21 Hygiea systemd[1]: Starting wicked managed network interfaces...
Jan 25 23:07:27 Hygiea wicked[1250]: lo              up
Jan 25 23:07:27 Hygiea wicked[1250]: eth0            up
Jan 25 23:07:27 Hygiea systemd[1]: Started wicked managed network interfaces.

● wickedd-nanny.service - wicked network nanny service
   Loaded: loaded (/usr/lib/systemd/system/wickedd-nanny.service; enabled; vendor preset: disabled)
   Active: active (running)
 Main PID: 1179 (wickedd-nanny)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/wickedd-nanny.service
           └─1179 /usr/sbin/wickedd-nanny --systemd --foreground

Jan 25 23:07:20 Hygiea systemd[1]: Starting wicked network nanny service...
Jan 25 23:07:21 Hygiea systemd[1]: Started wicked network nanny service.

● wickedd.service - wicked network management service daemon
   Loaded: loaded (/usr/lib/systemd/system/wickedd.service; indirect; vendor preset: disabled)
   Active: active (running) since Fri 2019-01-25 23:07:20 CET; 4 days ago
 Main PID: 1175 (wickedd)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/wickedd.service
           └─1175 /usr/sbin/wickedd --systemd --foreground

Jan 30 10:49:30 Hygiea dns-resolver[5014]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched...
Jan 30 10:49:30 Hygiea dns-resolver[5016]: You can find my version in /etc/resolv.conf.netconfig
Jan 30 10:53:50 Hygiea dns-resolver[5404]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched...
Jan 30 10:53:50 Hygiea dns-resolver[5406]: You can find my version in /etc/resolv.conf.netconfig
Jan 30 10:59:55 Hygiea dns-resolver[5775]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched...
Jan 30 10:59:55 Hygiea dns-resolver[5777]: You can find my version in /etc/resolv.conf.netconfig
Jan 30 11:09:46 Hygiea dns-resolver[6284]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched...
Jan 30 11:09:46 Hygiea dns-resolver[6286]: You can find my version in /etc/resolv.conf.netconfig
Jan 30 11:13:48 Hygiea dns-resolver[6560]: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched...
Jan 30 11:13:48 Hygiea dns-resolver[6562]: You can find my version in /etc/resolv.conf.netconfig

● wickedd-dhcp6.service - wicked DHCPv6 supplicant service
   Loaded: loaded (/usr/lib/systemd/system/wickedd-dhcp6.service; enabled; vendor preset: disabled)
   Active: active (running)
 Main PID: 1101 (wickedd-dhcp6)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/wickedd-dhcp6.service
           └─1101 /usr/lib/wicked/bin/wickedd-dhcp6 --systemd --foreground

Jan 25 23:07:20 Hygiea systemd[1]: Starting wicked DHCPv6 supplicant service...
Jan 25 23:07:20 Hygiea systemd[1]: Started wicked DHCPv6 supplicant service.

● wickedd-dhcp4.service - wicked DHCPv4 supplicant service
   Loaded: loaded (/usr/lib/systemd/system/wickedd-dhcp4.service; enabled; vendor preset: disabled)
   Active: active (running)
 Main PID: 1103 (wickedd-dhcp4)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/wickedd-dhcp4.service
           └─1103 /usr/lib/wicked/bin/wickedd-dhcp4 --systemd --foreground

Jan 25 23:07:20 Hygiea systemd[1]: Starting wicked DHCPv4 supplicant service...
Jan 25 23:07:20 Hygiea systemd[1]: Started wicked DHCPv4 supplicant service.

 
> A "systemctl show -P Id network.service" shows which service is currently
> enabled as network.service (wicked.service or NetworkManager.service), but
> the above status call shows if there is something running that is disabled.

As it's currently not reproducible I think I cannot provide useful information here. When I checked it back then I'm pretty sure I checked that NetworkManager is not active/enabled because that's the easy part I still understand. 
 
> When you change a config from BOOTPROTO='dhcp' to BOOTPROTO='static', please
> use "rcnetwork reload" or "wicked ifreload all", "wicked ifreload eth0 eth1"
> to apply it.

This machine was installed as static from the beginning and was never set to dhcp.
 
> But this seems to be a result of improper switch between e.g. NetworkManager
> and wicked. The 192.168.250.103/24 address wasn't applied by wickedd dhcp4,
> but by NetworkManager or whatever is running additionaly to wicked as wickedd
> dhcp4 is never applying the noprefixroute option.

As written above I do not think that NetworkManager was active at any point.
I cannot rule out any other things though which might fiddle with network interfaces. Nothing jumps in my mind but then again this is my working machine used probably 12 hours a day for _everything_.

From your explanation the issue I'm seeing is how to catch the issue. Even if it comes back (what I do believe) I will notice only at some point afterwards and still do not recognize WHAT did the DHCP request. Any idea what and how to monitor that?
Comment 4 Rubén Torrero Marijnissen 2019-01-31 11:18:17 UTC
Hi Wolfgang,

That dynamic address you had as not likely added by wicked as wicked does not add 'noprefixroute'. I'm inclined to think that some service is pulling NetworkManager.service or NetworkManager-wait-online.serivce as dependency.

I have seen one case where even though wicked was enabled and NetworkManager disabled, teamviewerd was dependendant on NetworkManager-wait-online.service so when teamviewerd was started, it would also start NetworkManager.

Could you paste the output of
$ systemctl list-dependencies --reverse NetworkManager-wait-online.service
$ systemctl list-dependencies --reverse NetworkManager.service

Thanks!

(In reply to Wolfgang Rosenauer from comment #3)
> First of all. Just at this moment my machine is not in this state.
> My desktop is running 24x7 usually so I have no idea when it started or
> starts again. My last reboot was just a few days ago.
> But then again I did not change any network settings since I had this.
> 
> (In reply to Marius Tomaschewski from comment #1)
> > What is
> >  systemctl status network.service wicked*.service NetworkManager.service
> > showing on your system?
> 
> ● wicked.service - wicked managed network interfaces
>    Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled; vendor
> preset: disabled)
>    Active: active (exited) since Fri 2019-01-25 23:07:27 CET; 4 days ago
>   Process: 1250 ExecStart=/usr/sbin/wicked --systemd ifup all (code=exited,
> status=0/SUCCESS)
>  Main PID: 1250 (code=exited, status=0/SUCCESS)
>     Tasks: 0 (limit: 4915)
>    CGroup: /system.slice/wicked.service
> 
> Jan 25 23:07:21 Hygiea systemd[1]: Starting wicked managed network
> interfaces...
> Jan 25 23:07:27 Hygiea wicked[1250]: lo              up
> Jan 25 23:07:27 Hygiea wicked[1250]: eth0            up
> Jan 25 23:07:27 Hygiea systemd[1]: Started wicked managed network interfaces.
> 
> ● NetworkManager.service - Network Manager
>    Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service; disabled;
> vendor preset: disabled)
>   Drop-In: /usr/lib/systemd/system/NetworkManager.service.d
>            └─NetworkManager-ovs.conf
>    Active: inactive (dead)
>      Docs: man:NetworkManager(8)
> 
> ● wickedd-auto4.service - wicked AutoIPv4 supplicant service
>    Loaded: loaded (/usr/lib/systemd/system/wickedd-auto4.service; enabled;
> vendor preset: disabled)
>    Active: active (running)
>  Main PID: 1115 (wickedd-auto4)
>     Tasks: 1 (limit: 4915)
>    CGroup: /system.slice/wickedd-auto4.service
>            └─1115 /usr/lib/wicked/bin/wickedd-auto4 --systemd --foreground
> 
> Jan 25 23:07:20 Hygiea systemd[1]: Starting wicked AutoIPv4 supplicant
> service...
> Jan 25 23:07:20 Hygiea systemd[1]: Started wicked AutoIPv4 supplicant
> service.
> 
> ● wicked.service - wicked managed network interfaces
>    Loaded: loaded (/usr/lib/systemd/system/wicked.service; enabled; vendor
> preset: disabled)
>    Active: active (exited) since Fri 2019-01-25 23:07:27 CET; 4 days ago
>   Process: 1250 ExecStart=/usr/sbin/wicked --systemd ifup all (code=exited,
> status=0/SUCCESS)
>  Main PID: 1250 (code=exited, status=0/SUCCESS)
>     Tasks: 0 (limit: 4915)
>    CGroup: /system.slice/wicked.service
> 
> Jan 25 23:07:21 Hygiea systemd[1]: Starting wicked managed network
> interfaces...
> Jan 25 23:07:27 Hygiea wicked[1250]: lo              up
> Jan 25 23:07:27 Hygiea wicked[1250]: eth0            up
> Jan 25 23:07:27 Hygiea systemd[1]: Started wicked managed network interfaces.
> 
> ● wickedd-nanny.service - wicked network nanny service
>    Loaded: loaded (/usr/lib/systemd/system/wickedd-nanny.service; enabled;
> vendor preset: disabled)
>    Active: active (running)
>  Main PID: 1179 (wickedd-nanny)
>     Tasks: 1 (limit: 4915)
>    CGroup: /system.slice/wickedd-nanny.service
>            └─1179 /usr/sbin/wickedd-nanny --systemd --foreground
> 
> Jan 25 23:07:20 Hygiea systemd[1]: Starting wicked network nanny service...
> Jan 25 23:07:21 Hygiea systemd[1]: Started wicked network nanny service.
> 
> ● wickedd.service - wicked network management service daemon
>    Loaded: loaded (/usr/lib/systemd/system/wickedd.service; indirect; vendor
> preset: disabled)
>    Active: active (running) since Fri 2019-01-25 23:07:20 CET; 4 days ago
>  Main PID: 1175 (wickedd)
>     Tasks: 1 (limit: 4915)
>    CGroup: /system.slice/wickedd.service
>            └─1175 /usr/sbin/wickedd --systemd --foreground
> 
> Jan 30 10:49:30 Hygiea dns-resolver[5014]: ATTENTION: You have modified
> /etc/resolv.conf. Leaving it untouched...
> Jan 30 10:49:30 Hygiea dns-resolver[5016]: You can find my version in
> /etc/resolv.conf.netconfig
> Jan 30 10:53:50 Hygiea dns-resolver[5404]: ATTENTION: You have modified
> /etc/resolv.conf. Leaving it untouched...
> Jan 30 10:53:50 Hygiea dns-resolver[5406]: You can find my version in
> /etc/resolv.conf.netconfig
> Jan 30 10:59:55 Hygiea dns-resolver[5775]: ATTENTION: You have modified
> /etc/resolv.conf. Leaving it untouched...
> Jan 30 10:59:55 Hygiea dns-resolver[5777]: You can find my version in
> /etc/resolv.conf.netconfig
> Jan 30 11:09:46 Hygiea dns-resolver[6284]: ATTENTION: You have modified
> /etc/resolv.conf. Leaving it untouched...
> Jan 30 11:09:46 Hygiea dns-resolver[6286]: You can find my version in
> /etc/resolv.conf.netconfig
> Jan 30 11:13:48 Hygiea dns-resolver[6560]: ATTENTION: You have modified
> /etc/resolv.conf. Leaving it untouched...
> Jan 30 11:13:48 Hygiea dns-resolver[6562]: You can find my version in
> /etc/resolv.conf.netconfig
> 
> ● wickedd-dhcp6.service - wicked DHCPv6 supplicant service
>    Loaded: loaded (/usr/lib/systemd/system/wickedd-dhcp6.service; enabled;
> vendor preset: disabled)
>    Active: active (running)
>  Main PID: 1101 (wickedd-dhcp6)
>     Tasks: 1 (limit: 4915)
>    CGroup: /system.slice/wickedd-dhcp6.service
>            └─1101 /usr/lib/wicked/bin/wickedd-dhcp6 --systemd --foreground
> 
> Jan 25 23:07:20 Hygiea systemd[1]: Starting wicked DHCPv6 supplicant
> service...
> Jan 25 23:07:20 Hygiea systemd[1]: Started wicked DHCPv6 supplicant service.
> 
> ● wickedd-dhcp4.service - wicked DHCPv4 supplicant service
>    Loaded: loaded (/usr/lib/systemd/system/wickedd-dhcp4.service; enabled;
> vendor preset: disabled)
>    Active: active (running)
>  Main PID: 1103 (wickedd-dhcp4)
>     Tasks: 1 (limit: 4915)
>    CGroup: /system.slice/wickedd-dhcp4.service
>            └─1103 /usr/lib/wicked/bin/wickedd-dhcp4 --systemd --foreground
> 
> Jan 25 23:07:20 Hygiea systemd[1]: Starting wicked DHCPv4 supplicant
> service...
> Jan 25 23:07:20 Hygiea systemd[1]: Started wicked DHCPv4 supplicant service.
> 
>  
> > A "systemctl show -P Id network.service" shows which service is currently
> > enabled as network.service (wicked.service or NetworkManager.service), but
> > the above status call shows if there is something running that is disabled.
> 
> As it's currently not reproducible I think I cannot provide useful
> information here. When I checked it back then I'm pretty sure I checked that
> NetworkManager is not active/enabled because that's the easy part I still
> understand. 
>  
> > When you change a config from BOOTPROTO='dhcp' to BOOTPROTO='static', please
> > use "rcnetwork reload" or "wicked ifreload all", "wicked ifreload eth0 eth1"
> > to apply it.
> 
> This machine was installed as static from the beginning and was never set to
> dhcp.
>  
> > But this seems to be a result of improper switch between e.g. NetworkManager
> > and wicked. The 192.168.250.103/24 address wasn't applied by wickedd dhcp4,
> > but by NetworkManager or whatever is running additionaly to wicked as wickedd
> > dhcp4 is never applying the noprefixroute option.
> 
> As written above I do not think that NetworkManager was active at any point.
> I cannot rule out any other things though which might fiddle with network
> interfaces. Nothing jumps in my mind but then again this is my working
> machine used probably 12 hours a day for _everything_.
> 
> From your explanation the issue I'm seeing is how to catch the issue. Even
> if it comes back (what I do believe) I will notice only at some point
> afterwards and still do not recognize WHAT did the DHCP request. Any idea
> what and how to monitor that?
Comment 5 Wolfgang Rosenauer 2019-01-31 11:30:09 UTC
(In reply to Rubén Torrero Marijnissen from comment #4)
> Hi Wolfgang,
> 
> That dynamic address you had as not likely added by wicked as wicked does
> not add 'noprefixroute'. I'm inclined to think that some service is pulling
> NetworkManager.service or NetworkManager-wait-online.serivce as dependency.
> 
> I have seen one case where even though wicked was enabled and NetworkManager
> disabled, teamviewerd was dependendant on NetworkManager-wait-online.service
> so when teamviewerd was started, it would also start NetworkManager.

Now that rings a bell. I have teamviewer installed on this machine indeed.
 
> Could you paste the output of
> $ systemctl list-dependencies --reverse NetworkManager-wait-online.service
> $ systemctl list-dependencies --reverse NetworkManager.service

Hygiea:~ # systemctl list-dependencies --reverse NetworkManager-wait-online.service
NetworkManager-wait-online.service
Hygiea:~ # systemctl list-dependencies --reverse NetworkManager.service
NetworkManager.service
Hygiea:~ # 

Hygiea:~ # systemctl status teamviewerd.service 
● teamviewerd.service - TeamViewer remote control daemon
   Loaded: loaded (/etc/systemd/system/teamviewerd.service; disabled; vendor pr>
   Active: inactive (dead)
Comment 6 Rubén Torrero Marijnissen 2019-01-31 11:49:57 UTC
I'd bet that starting teamviewerd would cause NetworkManager to be started again, and would mean that you get again another dhcp-acquired IP.

As a temporary workround, you could change the teamviewerd service file by removing the NetworkManager-wait-online.service mentions and then

# systemctl daemon-reload

I've send an email to them asking to remove the NetworkManager-wait-online.service dependency.
Comment 7 Rubén Torrero Marijnissen 2019-01-31 13:06:07 UTC
Marking as duplicate as it seems that in both cases the issue seems to be teamviewerd depending directly on NetworkManager-wait-online.service

*** This bug has been marked as a duplicate of bug 1122194 ***