MONROE-PROJECT / Experiments

11 stars 5 forks source link

Problem gathering metadata through the script #20

Closed atxutegi closed 7 years ago

atxutegi commented 8 years ago

Happening in line 282 in experiment.py ifname = meta_info['modem']['InternalInterface']

The log file looks like the following: 2016-09-05T14:00:02.940164719Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940188819Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940212293Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940235440Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940258537Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940281594Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940305031Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940328304Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940351298Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940374546Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940397523Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940420620Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940444066Z Trying to get metadata for Telenor SE 2016-09-05T14:00:02.940503069Z Traceback (most recent call last): 2016-09-05T14:00:02.940530246Z File "/opt/monroe/experiment.py", line 282, in 2016-09-05T14:00:02.940561162Z ifname = meta_info['modem']['InternalInterface'] 2016-09-05T14:00:02.940585285Z File "", line 2, in getitem 2016-09-05T14:00:02.940611383Z File "/usr/lib/python2.7/multiprocessing/managers.py", line 774, in _callmethod 2016-09-05T14:00:02.941327531Z raise convert_to_error(kind, result) 2016-09-05T14:00:02.941966044Z KeyError: 'InternalInterface'

The script seems to look for a specific operator (Telenor SE). Jonas suggested that if it cannot find it, it should exit the script.

jonakarl commented 8 years ago

Hmm, the expected behaviour is that it should look for an specific operator and exit the script if it does not find "InternalInterface" (the if statement just above the code that throws this exception).

Not sure why it reaches this point.

atxutegi commented 8 years ago

Is there any list mapping nodeIDs and operators. It is just to check whether with another operator label (one that actually is running), the script is able to gather the metadata. Any hint?

relet commented 8 years ago

Yes, you can check https://scheduler.monroe-system.eu/v1/resources Or for a given node https://scheduler.monroe-system.eu/v1/resources/66

atxutegi commented 8 years ago

Great. Thank you.

relet commented 8 years ago

Ok, there is a catch you should be aware of, since it sounds like you are comparing the name strings.

The operator string reported by the subscription is not necessarily the same as we use in the inventory. Telenor Sweden has reported in with strings like "TelenorS" and "Telenor SE", in the inventory we use "Telenor (Vodafone)". A better check is to match the MCC/MNC number.

If you first retrieve the name from the metadata on the node, it should stay relatively consistent, but not always. An intuitive but not very common example is if the node moves into an area where the subscription is roaming with another operator - in Spain that is the case for (IIRC) Yoigo and Movistar.

jonakarl commented 7 years ago

I am closing this issue due to no activity in 4 months. Please open a new issue if the problem still exists.