openSUSE/wicked — pull request #310 by kmroz (2014-07-10 13:35:05+00:00)
Title: DO NOT MERGE YET -- Fix device delete -- DO NOT MERGE YET

Initial ifup works fine. Then we do an ifdown all and remove netdev dbus objects only on del link events. This also works nicely. Now for physical devices, Pawel and I see del links also, followed by a create-device event. However, we never receive a device-ready for the re-created physical devices. This obviously leads to problems on the next ifup. We also did not see any add/move events for the physical devices arriving in udevadm.

Attaching log of wickedd for relevant section of bridge1 + eth1 ifdown and eth1 device-create:
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_message(path=/org/opensuse/Network/Interface/6, interface=org.opensuse.Network.Bridge, method=shutdownDevice) called
Jul 10 15:29:42 hammer7 wickedd[739]: ni_objectmodel_shutdown_bridge(dev=br1)
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for eth1 with ifindex 3
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for eth1 with ifindex 3
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_dellink:279 for eth1 with ifindex 3
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_netdev_event(eth1, idx=3, device-delete)
Jul 10 15:29:42 hammer7 wickedd[739]: dbus_connection_unregister_object_path(/org/opensuse/Network/Interface/3)
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_unregister(path=/org/opensuse/Network/Interface/3, handle=0x2339910)
Jul 10 15:29:42 hammer7 wickedd[739]: ni_objectmodel_netif_destroy(object=/org/opensuse/Network/Interface/3, dev=0x2339910)
Jul 10 15:29:42 hammer7 wickedd[739]: ni_dbus_object_free: deferring deletion of active object /org/opensuse/Network/Interface/3
Jul 10 15:29:42 hammer7 wickedd[739]: unregistered interface eth1
Jul 10 15:29:42 hammer7 wickedd[739]: sending device event "deviceDown" for /org/opensuse/Network/Interface/3
Jul 10 15:29:42 hammer7 wickedd[739]: sending device event "deviceDelete" for /org/opensuse/Network/Interface/3
Jul 10 15:29:42 hammer7 wickedd[739]: ni_dbus_object_free: deferring deletion of active object /org/opensuse/Network/Interface/3
Jul 10 15:29:42 hammer7 wickedd[739]: ni_dbus_objects_garbage_collect()
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_message(path=/org/opensuse/Network/Interface/7, interface=org.opensuse.Network.Bond, method=shutdownDevice) called
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_objectmodel_shutdown_bond(dev=bond3)
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for eth1 with ifindex 3
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_netdev_event(eth1, idx=3, device-create)
Jul 10 15:29:42 hammer7 wickedd[739]: ni_dbus_server_register_object(path=Interface/3, handle=0x2339910)
Jul 10 15:29:42 hammer7 wickedd[739]: created /org/opensuse/Network/Interface/3 as child of /org/opensuse/Network/Interface, class netif-ethernet
Jul 10 15:29:42 hammer7 wickedd[739]: ni_objectmodel_bind_compatible_interfaces(object=/org/opensuse/Network/Interface/3, class=netif-ethernet)
Jul 10 15:29:42 hammer7 wickedd[739]: sending device event "deviceCreate" for /org/opensuse/Network/Interface/3
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_message(path=/org/opensuse/Network/Interface/3, interface=org.opensuse.Network.Interface, method=setClientInfo) called
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for br1 with ifindex 6
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for br1 with ifindex 6
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_message(path=/org/opensuse/Network/Interface/3, interface=org.freedesktop.DBus.ObjectManager, method=GetManagedObjects) called
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_manager_get_managed_objects(path=/org/opensuse/Network/Interface/3, method=GetManagedObjects)
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_message(path=/org/opensuse/Network/Interface/5, interface=org.opensuse.Network.Interface, method=setClientInfo) called
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for eth3 with ifindex 5
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_message(path=/org/opensuse/Network/Interface/6, interface=org.opensuse.Network.Bridge, method=deleteDevice) called
Jul 10 15:29:42 hammer7 wickedd[739]: ni_objectmodel_delete_bridge(dev=br1)
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for eth3 with ifindex 5
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for eth3 with ifindex 5
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for bond3 with ifindex 7
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for bond3 with ifindex 7
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_message(path=/org/opensuse/Network/Interface/7, interface=org.opensuse.Network.Bond, method=deleteDevice) called
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_objectmodel_delete_bond(dev=bond3)
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_newlink:173 for eth3 with ifindex 5
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_dellink:279 for br1 with ifindex 6
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_netdev_event(br1, idx=6, device-delete)
Jul 10 15:29:42 hammer7 wickedd[739]: dbus_connection_unregister_object_path(/org/opensuse/Network/Interface/6)
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_unregister(path=/org/opensuse/Network/Interface/6, handle=0x238bd90)
Jul 10 15:29:42 hammer7 wickedd[739]: ni_objectmodel_netif_destroy(object=/org/opensuse/Network/Interface/6, dev=0x238bd90)
Jul 10 15:29:42 hammer7 wickedd[739]: ni_dbus_object_free: deferring deletion of active object /org/opensuse/Network/Interface/6
Jul 10 15:29:42 hammer7 wickedd[739]: unregistered interface br1
Jul 10 15:29:42 hammer7 wickedd[739]: sending device event "deviceDown" for /org/opensuse/Network/Interface/6
Jul 10 15:29:42 hammer7 wickedd[739]: sending device event "deviceDelete" for /org/opensuse/Network/Interface/6
Jul 10 15:29:42 hammer7 wickedd[739]: ni_dbus_object_free: deferring deletion of active object /org/opensuse/Network/Interface/6
Jul 10 15:29:42 hammer7 wickedd[739]: ni_dbus_objects_garbage_collect()
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_rtevent_dellink:279 for bond3 with ifindex 7
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_netdev_event(bond3, idx=7, device-delete)
Jul 10 15:29:42 hammer7 wickedd[739]: dbus_connection_unregister_object_path(/org/opensuse/Network/Interface/7)
Jul 10 15:29:42 hammer7 wickedd[739]: __ni_dbus_object_unregister(path=/org/opensuse/Network/Interface/7, handle=0x23a2860)
Jul 10 15:29:42 hammer7 wickedd[739]: ni_objectmodel_netif_destroy(object=/org/opensuse/Network/Interface/7, dev=0x23a2860)
Jul 10 15:29:42 hammer7 wickedd[739]: ni_dbus_object_free: deferring deletion of active object /org/opensuse/Network/Interface/7
Jul 10 15:29:42 hammer7 wickedd[739]: unregistered interface bond3
Jul 10 15:29:42 hammer7 wickedd[739]: sending device event "deviceDown" for /org/opensuse/Network/Interface/7
Jul 10 15:29:42 hammer7 wickedd[739]: sending device event "deviceDelete" for /org/opensuse/Network/Interface/7
Jul 10 15:29:42 hammer7 wickedd[739]: ni_dbus_object_free: deferring deletion of active object /org/opensuse/Network/Interface/7
Jul 10 15:29:42 hammer7 wickedd[739]: ni_dbus_objects_garbage_collect()