MONROE-PROJECT / Scheduler

The MONROE scheduling server, and deployment daemon
https://www.monroe-project.eu/
0 stars 2 forks source link

Force update of monroe namespace with eduroam #32

Closed jonakarl closed 4 years ago

jonakarl commented 4 years ago

After at succesful eduroam login the monroe namespace needs to be updated so that the namespace is consistent with the host before the container starts.

relet commented 4 years ago

I'm not sure you can trust the return value of monroe experiments in this case. I think since set -e is set, it can fail on other unrelated issues.

jonakarl commented 4 years ago

it can fail on other unrelated issues

So it can give false negatives (ie the namespace is updated but the code fails) ? False positives would be disaster but does the false negatives happens often ? How would you go about this ? should we add different exit codes to monroe-experiments ?

I would like to avoid adding to much code into this as it is on the old code base.

relet commented 4 years ago

It's just not designed to provide any given return code to other scripts. If it were designed to have meaningful return values, returning true does not necessarily mean e.g. that the wifi interface has been mapped, just that all interfaces that were found are also mapped.

If you want to ensure the wifi interface is up, you should check for that.

jonakarl commented 4 years ago

The eduroam script will not finish until the interface is up (or a timeout in 30 seconds) && monroe experiment will ensure all interfaces up is mapped .... logically this would miean that the interface is mapped if both of these script succeded .... but I see your point I can add a explicit check to see if wlan0 is up in monroe namespace if that is what you mean

relet commented 4 years ago

In that case you could just run it without checking the exit code maybe?