-
Notifications
You must be signed in to change notification settings - Fork 21
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
testutils/iotlab.py: Randomize the selected node #298
base: master
Are you sure you want to change the base?
Conversation
Running |
This doesn't actually seem to trigger in all tests at least... It would appear that def _submit(self, site, duration):
"""Submit an experiment with required nodes"""
api = Api(*self.user_credentials())
resources = []
for ctrl in self.ctrls:
if ctrl.env.get('IOTLAB_NODE') is not None:
resources.append(exp_resources([ctrl.env.get('IOTLAB_NODE')]))
elif ctrl.board() is not None:
board = IoTLABExperiment._archi_from_board(ctrl.board())
alias = AliasNodes(1, site, board)
resources.append(exp_resources(alias))
else:
raise ValueError("neither BOARD or IOTLAB_NODE are set")
return submit_experiment(api, self.name, duration, resources)['id'] Is responsible for selecting the nodes. |
6e6db29
to
d5f9a46
Compare
So it must have previously just had the bad nodes blocked... I force pushed and update that gets a list of all available nodes that fit our requirements, then randomly selects them... Maybe we would want to add a flag to use this on not... |
hmmm I still have to adjust some tests |
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.
This might complicate things, but since you are getting the node information anyway from the site (which IIRC also include the position of the node), would it make sense to have some kind of distance heuristic in the random selection?
Yes, I can look into that but I imagine it would already complicate an complicated process. Maybe a simpler solution would be to only randomize boards that don't report error conditions (such as Also if it randomly selects a poor choice we can rerun anyways. |
d5f9a46
to
573406f
Compare
I made the change to only randomize non-m3 nodes... Also IoTlabs fixed the samrs so it is hard for me to reproduce the failure but easy to show it selects random nodes. |
8090f2a
to
1d7f4ef
Compare
I think we should have this in @Teufelchen1 Currently contiki is always selecting the same nodes and they are not working... |
As soon as I posted that, the nodes started working. |
Maybe @mguetschow would be interested in looking at this? |
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.
LGTM, did not run it though.
When I run this locally with
Edit: does not happen on |
00fed41
to
d9ef3b4
Compare
Good thing we test. This was introduced in the attempt to not randomize |
It seems there have been some failures mainly due to infrastructure. Specifically the samr21-xpro failing to flash will cause many reruns with the same faulty hardware. Previously it would just take the first available node in the list, which is deterministic but doesn't help with flakey test reruns. This may cause an issue with distance to other nodes, but if random selection of nodes becomes a problem we would have to introduce node pairing lists... Which is a bit more work. This is at least a first step.
d9ef3b4
to
fc5280d
Compare
probably would be good to rerun a subset of tests (maybe |
It seems there have been some failures mainly due to infrastructure. Specifically the samr21-xpro failing to flash will cause many reruns with the same faulty hardware.
Previously it would just take the first available node in the list, which is deterministic but doesn't help with flakey test reruns. This may cause an issue with distance to other nodes, but if random selection of nodes becomes a problem we would have to introduce node pairing lists... Which is a bit more work.
This is at least a first step.