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

Can not find new domain with qubesadmin - Qubes #3875

Closed
donob4n opened this Issue May 3, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@donob4n

donob4n commented May 3, 2018

Qubes OS version:

R4

Affected component(s):

Potentially all things using import Qubes from qubesadmin


Steps to reproduce the behavior:

Currently I am trying to implement dbus events in Qube Manager. When recieve a 'DomainAdded' signal a callback function is called for handling it. Since it only knows the 'qid' of the domain it loops through qubes_app.domains and gets it. Unfortunately sometimes (maybe when there are some amount of domains) it does not find it. Here is a example log after creating two new domains:

/org/qubes/DomainManager1/domains/36
LOOKING FOR QID 36
21
15
27
13
17
36
36 found!!
/org/qubes/DomainManager1/domains/37
LOOKING FOR QID 37
21
15
27
13
17
36
28
9
20
35
2
33
16
0
29
19
4
10
11
30
34
32
12
31
24
42
40
6
5
7
22
18
14
25
23
26
3
1
8

NOT FOUND

Expected behavior:

If we recieved a 'DomainAdded' signal, that domain should be in Qubes.domains.

Actual behavior:

It is not.

General notes:

Maybe is this due some kind of caching? After restarting qube-manager the new domain appears fine.

Making new Qubes() objects when I need to find a new domain also works fine.


Related issues:

@donob4n donob4n changed the title from Can't find new domain with qubesadmin - Qubes to Can not find new domain with qubesadmin - Qubes May 3, 2018

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek May 4, 2018

Member

Yes, caching, see qubes_app.domains.clear_cache().

Member

marmarek commented May 4, 2018

Yes, caching, see qubes_app.domains.clear_cache().

@donob4n

This comment has been minimized.

Show comment
Hide comment
@donob4n

donob4n May 4, 2018

Ouch, ok thanks :)

donob4n commented May 4, 2018

Ouch, ok thanks :)

@donob4n

This comment has been minimized.

Show comment
Hide comment
@donob4n

donob4n May 6, 2018

Ey @marmarek

Could this cache be handled internally? I mean it gets cleared automatically when needed, otherwise I see a lot of places where it needs to be cleaned and also its pretty error prune.

donob4n commented May 6, 2018

Ey @marmarek

Could this cache be handled internally? I mean it gets cleared automatically when needed, otherwise I see a lot of places where it needs to be cleaned and also its pretty error prune.

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