Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to disable ipv4 on eth0 #188

Closed
phoracek opened this issue Dec 6, 2018 · 0 comments
Closed

Failed to disable ipv4 on eth0 #188

phoracek opened this issue Dec 6, 2018 · 0 comments

Comments

@phoracek
Copy link
Member

phoracek commented Dec 6, 2018

I was trying to drop ipv4 from eth0 and attach it to OVS bridge, but it failed with ipv4.gateway: gateway cannot be set if there are no addresses configured.

config.yaml:

interfaces:
- name: eth0
  type: ethernet
  state: up
  ipv4:
    enabled: false

nmstatectl set config.yaml output:

2018-12-06 21:57:38,531 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/23 created for all devices: 60
2018-12-06 21:57:38,565 root         WARNING  IPv6 link local address fe80::5055:ff:fed1:5501/64 is ignored when applying desired state
2018-12-06 21:57:38,565 root         DEBUG    Connection settings for duplicate_settings:
id: eth0
iface: eth0
uuid: 4513218f-4a9e-4843-9c27-18138bcdc8f1
type: 802-3-ethernet
autoconnect: False
autoconnect_slaves: <enum NM_SETTING_CONNECTION_AUTOCONNECT_SLAVES_DEFAULT of type NM.SettingConnectionAutoconnectSlaves>
2018-12-06 21:57:38,567 root         DEBUG    Executing NM action: func=commit_changes_async, args=(True, <Gio.Cancellable object at 0x7f784af35730 (GCancellable at 0x7f783c0623a0)>, <function _commit_changes_callback at 0x7f784cb85ed8>, (<libnmstate.nm.nmclient._MainLoop object at 0x7f784af1c810>, <NM.DeviceEthernet object at 0x7f784af351e0 (NMDeviceEthernet at 0x1638490)>))
2018-12-06 21:57:38,572 root         ERROR    NM main-loop aborted: Connection update failed: error=nm-connection-error-quark: ipv4.gateway: gateway cannot be set if there are no addresses configured (7), dev=eth0/<enum NM_DEVICE_STATE_ACTIVATED of type NM.DeviceState>
2018-12-06 21:57:38,575 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/23 rollback executed: dbus.Dictionary({dbus.String(u'/org/freedesktop/NetworkManager/Devices/14'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/1'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/3'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/2'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/12'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/13'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/10'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/11'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/4'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/17'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/6'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/7'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/8'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/9'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/18'): dbus.UInt32(0L), dbus.String(u'/org/freedesktop/NetworkManager/Devices/5'): dbus.UInt32(0L)}, signature=dbus.Signature('su'))
Traceback (most recent call last):
  File "/bin/nmstatectl", line 9, in <module>
    load_entry_point('nmstate==0.0.2', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python2.7/site-packages/nmstatectl/nmstatectl.py", line 54, in main
    return args.func(args)
  File "/usr/lib/python2.7/site-packages/nmstatectl/nmstatectl.py", line 147, in apply
    netapplier.apply(state, verify_change=args.verify)
  File "/usr/lib/python2.7/site-packages/libnmstate/netapplier.py", line 47, in apply
    _apply_ifaces_state(desired_state[Constants.INTERFACES], verify_change)
  File "/usr/lib/python2.7/site-packages/libnmstate/netapplier.py", line 64, in _apply_ifaces_state
    _edit_interfaces(ifaces_desired_state, ifaces_current_state)
  File "/usr/lib64/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/usr/lib/python2.7/site-packages/libnmstate/netapplier.py", line 97, in _setup_providers
    raise ApplyError(mainloop.error)
libnmstate.netapplier.ApplyError: run execution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant