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

Make libvirt notice network device disconnection when backend domain is shut down #1426

Open
marmarek opened this Issue Nov 14, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@marmarek
Member

marmarek commented Nov 14, 2015

Xen toolstack used in R3.0 (libxl + libvirt) does not have any device monitoring mechanisms. If the device is detached by the VM itself (for any reason), or some external tool (like xl), the toolstack will still think the device is present and connected (also some settings of xen network frontend and backend will not be cleaned up because of that). The only way to tell the toolstack that device is no longer connected, is to detach it from VM (action initiated by the user, through qubes manager or qvm-prefs, not by backend driver in response to shutting down the domain). But if the device is no longer there, such detach action would fail. And more importantly trying to attach it again (after starting backend domain again) would also fail, because libvirt still thinks the device is already there (detach action failed, right?).

This is the main reason why NetVM restart isn't working.
This is similar issue as #1082 (which is about block devices).

@marmarek marmarek added this to the Release 3.2 milestone Nov 14, 2015

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Nov 15, 2015

core: detach connected VMs when shutting down NetVM
This is workaround for missing libxl/libvirt functionality: QubesOS/qubes-issues#1426

Also it should improve system shutdown time, as this is the situation
where all the VMs are shutting down simultaneously.

Fixes QubesOS/qubes-issues#1425

marmarek added a commit to QubesOS/qubes-core-admin that referenced this issue Nov 15, 2015

core: detach connected VMs when shutting down NetVM
This is workaround for missing libxl/libvirt functionality: QubesOS/qubes-issues#1426

Also it should improve system shutdown time, as this is the situation
where all the VMs are shutting down simultaneously.

Fixes QubesOS/qubes-issues#1425

(cherry picked from commit 7359e39)

andrewdavidwong added a commit that referenced this issue May 31, 2016

marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Jun 6, 2017

vm/mix/net: remove cleanup_vifs
With libvirt in place, this isn't enough - libvirt also keep VM
configuration in its memory and adjusting xenstore doesn't change that.
In fact changing xenstore behind it back make it even worse in some
situations.

QubesOS/qubes-issues#1426

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status Jul 4, 2017

Closed

core-admin v4.0.1 (r4.0) #100

marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Dec 14, 2017

vm/mix/net: fill QubesDB for already connected VMs
There may be cases when VM providing the network to other VMs is started
later - for example VM restart. While this is rare case (and currently
broken because of QubesOS/qubes-issues#1426), do not assume it will
always be the case.

marmarek added a commit to marmarek/qubes-core-admin that referenced this issue Dec 14, 2017

vm/mix/net: fill QubesDB for already connected VMs
There may be cases when VM providing the network to other VMs is started
later - for example VM restart. While this is rare case (and currently
broken because of QubesOS/qubes-issues#1426), do not assume it will
always be the case.

@qubesos-bot qubesos-bot referenced this issue in QubesOS/updates-status Dec 22, 2017

Closed

core-admin v4.0.15 (r4.0) #327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment