-
Notifications
You must be signed in to change notification settings - Fork 939
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
client: Pass a flag into queryOperation
to skip event listener setup if not required.
#12349
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this change be pushed down in to ExecInstance itself?
It's tricky because |
2ca90c9
to
e2398fd
Compare
queryOperation
to skip event listener setup if not required.
@tomponline I've changed this to roughly what we discussed on IRC (unless I've misunderstood). I have only skipped the event listener setup for |
looks like tests are sad |
e2398fd
to
4ef7b14
Compare
Signed-off-by: Mark Laing <[email protected]>
4ef7b14
to
f0ff3f0
Compare
@tomponline tests should pass now if you have time to re-review. As a side note, I think a long-term solution to this problem might be to have a |
f0ff3f0
to
c19f041
Compare
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
Signed-off-by: Mark Laing <[email protected]>
c19f041
to
d812961
Compare
After recent changes to the client in canonical#12349, when calling ExecInstance we wait for the operation to complete by directly calling the operation wait endpoint instead of listening for the event. When calling exec on a VM, the client is used to connect with the LXD agent over the devlxd socket. This was failing with a 404 because the endpoint didn't exist. Signed-off-by: Mark Laing <[email protected]>
After recent changes to the client in canonical#12349, when calling ExecInstance we wait for the operation to complete by directly calling the operation wait endpoint instead of listening for the event. When calling exec on a VM, the client is used to connect with the LXD agent via vsock. This was failing with a 404 because the endpoint didn't exist. Signed-off-by: Mark Laing <[email protected]>
After recent changes to the client in canonical#12349, when calling ExecInstance we wait for the operation to complete by directly calling the operation wait endpoint instead of listening for the event. When calling exec on a VM, the client is used to connect with the LXD agent via vsock. This was failing with a 404 because the endpoint didn't exist. Signed-off-by: Mark Laing <[email protected]>
After recent changes to the client in canonical#12349, when calling ExecInstance we wait for the operation to complete by directly calling the operation wait endpoint instead of listening for the event. When calling exec on a VM, the client is used to connect with the LXD agent via vsock. This was failing with a 404 because the endpoint didn't exist. Signed-off-by: Mark Laing <[email protected]>
Is it not always necessary to set up an event listener when interacting with operations via the client. For example, many client methods call
queryOperation
and then callWait
on the returned operation. Instead of receiving all events, filtering by operation, then filtering by the ID of the operation, and checking the status code for "success" or "failure", we can just use/1.0/operations/wait
.