On 08/23/2016 06:22 AM, Vasiliy Tolstov wrote:
I'm install latest libvir and configure network to assign some ip to
ethernet device.
But after start tap device is down and no addresses assigned.


My investigation:
qemu_interface.c have functions:
qemuInterfaceStartDevice and qemuInterfaceStopDevice
In start device in case of ethernet device no action performed (this
is bug i think).
In stop device i see, that we try to assign ip address to device (why?)

ACCKKK!!! (and I mean that in the "Bill the Cat" manner, not the "Yes, I approve" manner)

That is obviously wrong, and the only reason for it that I can think of is some odd merge problem during one of the final rebases of the patches, since I tested it innumerable times prior to that.


I think we need to move assigning addresses from stop device, to start
device,

Yes, but I wonder if anything else got screwed up at the same time.

also note, that for routes we need device to up (how we deal
in case of user in xml specify device is down and have route element
inside xml for this device?)

Interesting question. I guess the routes should be set whenever the device is ifup'ed, and maybe deleted when it's taken offline (if the tap itself isn't going to be deleted)

In case of stop device i think we does not need anything (in case of
linux) becaue when tap deleted routes and addresses dissapeared from
the kernel.


What do you think?


I think this would have been less likely to happen if I was actually *using* type='ethernet' myself :-)


If you want to send a patch to fix start/stop device I can look at it later today or tomorrow. After that I suppose it would e useful to go through a few tests and see what else is broken.



--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to