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

events handlers defined in mixin are not called #1816

Closed
marmarek opened this Issue Mar 6, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@marmarek
Member

marmarek commented Mar 6, 2016

For example this one:
https://github.com/woju/qubes-core-admin/blob/core3-devel/qubes/vm/mix/net.py#L138-L144

I've tried also with manual vm.fire_event('domain-loaded') and this function isn't called.
Some further debugging reveals that NetVMMixin class have no __handlers__ attribute (while both AppVM and QubesVM have). But the function itself has ha_events set.
Should NetVMMixin have metaclass set to EmiterMeta? Or maybe the order of base classes in QubesVM definition should be reversed?

@marmarek marmarek added this to the Release 4.0 milestone Mar 6, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue Mar 7, 2016

vm/mix/net: create vm.connected_vms dynamically
It is much less error-prone way. Previous approach didn't worked because
VMs weren't added here at 'domain-init'/'domain-loaded' event. And even
after adding such handlers it wasn't working because of
QubesOS/qubes-issues#1816.

It may be a little slower, but since it isn't used so often
(starting/stopping VM and reloading firewall), shouldn't be a problem.

woju added a commit to woju/qubes-core-admin that referenced this issue Mar 11, 2016

vm/mix/net: create vm.connected_vms dynamically
It is much less error-prone way. Previous approach didn't worked because
VMs weren't added here at 'domain-init'/'domain-loaded' event. And even
after adding such handlers it wasn't working because of
QubesOS/qubes-issues#1816.

It may be a little slower, but since it isn't used so often
(starting/stopping VM and reloading firewall), shouldn't be a problem.

woju added a commit to woju/qubes-core-admin that referenced this issue Mar 21, 2016

vm/mix/net: create vm.connected_vms dynamically
It is much less error-prone way. Previous approach didn't worked because
VMs weren't added here at 'domain-init'/'domain-loaded' event. And even
after adding such handlers it wasn't working because of
QubesOS/qubes-issues#1816.

It may be a little slower, but since it isn't used so often
(starting/stopping VM and reloading firewall), shouldn't be a problem.
@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 4, 2016

Member

@woju close?

Member

marmarek commented May 4, 2016

@woju close?

@woju woju closed this May 5, 2016

woju added a commit to woju/qubes-core-admin that referenced this issue May 19, 2016

marmarek added a commit to marmarek/old-qubes-core-admin that referenced this issue May 20, 2016

qubes/app: do not enable domain events when loading XML
Event should be enabled only after all the domains are loaded (and
domain-load event if fired).

QubesOS/qubes-issues#1816

woju added a commit to woju/qubes-core-admin that referenced this issue Jun 2, 2016

qubes/app: do not enable domain events when loading XML
Event should be enabled only after all the domains are loaded (and
domain-load event if fired).

QubesOS/qubes-issues#1816
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment