Checkbox remote master traceback when 2 instances connected to one slave
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Next Generation Checkbox (CLI) |
Fix Released
|
Medium
|
Maciej Kisielewski |
Bug Description
for fun, I kicked off checkbox remote slave on a SUT and then connected from my desktop using checkbox remote master (Connection 1) and started a short testplan.
Then from a different machine (Connection 2) I also connected to the slave to see what would happen.
This seems to have caused the checkbox master on Connection 1 to traceback with an unhandled exception that doesn't provide any helpful info:
-------
Outcome: job passed
-------
---------[ Attaches json dumps of installed dkms package information. ]---------
ID: com.canonical.
Category: Informational tests
-------
Traceback (most recent call last):
File "/usr/lib/
return self._dispatch()
File "/usr/lib/
result = ingredient.
File "/usr/lib/
return self._dispatch(
File "/usr/lib/
return self._dispatch_
File "/usr/lib/
return self._dispatch(
File "/usr/lib/
retval = command.
File "/usr/lib/
self.
File "/usr/lib/
}[state]()
File "/usr/lib/
self.
File "/usr/lib/
self.run_jobs()
File "/usr/lib/
self.
File "/usr/lib/
for interaction in self.sa.
File "/usr/lib/
return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
File "/usr/lib/
return conn.sync_
File "/usr/lib/
return self.async_
File "/usr/lib/
raise self._obj
_get_exception_
========= Remote Traceback (1) =========
Traceback (most recent call last):
File "/usr/lib/
res = self._HANDLERS[
File "/usr/lib/
return obj(*args, **dict(kwargs))
File "/usr/lib/
"expected %s, is %s" % (states, self._state))
AssertionError: expected ('testsselected',), is running
Please report a bug including the information from the paragraph above. To
report the bug visit https:/
We are sorry for the inconvenience!
Meanwhile, the output on Connection 2 continued all the way to the end of testing.
So to recreate this:
1: start checkbox-cli slave on SUT
2: from terminal 1, start a test using checkbox-cli master IP_ADDR /path/to/launcher
3: while test is running, on terminal 2, start checkbox-cli mater IP_ADDR
4: wait for it...
5: wait for it...
6: checkbox-cli in terminal 1 crashes with that assertion error.
I get that you're not supposed to connect from more than one location at a time, so the remedy here is really more about exception handling so that users get a helpful message like:
"Unable to connect at this time, there is another session already active for this remote SUT"
OR, better would be the ability to disconnect the other session (not sure what the mechanics are behind the remote connection, but something like this:
"There is another active connection to the remote agent on $IPADDRESS"
"Shall I disconnect that session and connect this one? [Y/n]"
Related branches
- Sylvain Pineau (community): Approve
- Maciej Kisielewski (community): Needs Resubmitting
-
Diff: 116 lines (+66/-3)2 files modifiedcheckbox_ng/launcher/master.py (+31/-3)
checkbox_ng/launcher/slave.py (+35/-0)
Changed in checkbox-ng: | |
assignee: | nobody → Maciej Kisielewski (kissiel) |
milestone: | none → 1.6.0 |
Changed in checkbox-ng: | |
importance: | Undecided → Medium |
Changed in checkbox-ng: | |
milestone: | 1.6.0 → none |
Changed in checkbox-ng: | |
status: | New → In Progress |
Changed in checkbox-ng: | |
milestone: | none → 1.8.0 |
Changed in checkbox-ng: | |
status: | In Progress → Fix Committed |
Changed in checkbox-ng: | |
status: | Fix Committed → Fix Released |