DuplicateJobError when running inside Grid'5000
Symptom: When I use an already existing job_name of another user from inside Grid'5000, EnOSlib is reloading is reloading it
This is unexpected since we filter on the username when requesting the API. except that, when running from inside Grid'5000 the API username isn't specified so the filter is ignored.
·> python run.py
/home/msimonin/workspace/enoslib-tutorials/exercices/venv/lib/python3.7/site-packages/grid5000/__init__.py:96: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
conf = yaml.load(f)
WARNING:grid5000:Unverified HTTPS request is being made. Make sure to do this on purpose or set verify_ssl in the configuration file
INFO:enoslib.infra.enos_g5k.g5k_api_utils:Reloading flopsworker from grenoble
INFO:enoslib.infra.enos_g5k.g5k_api_utils:Reloading flopsworker from lille
INFO:enoslib.infra.enos_g5k.g5k_api_utils:Reloading flopsworker from luxembourg
INFO:enoslib.infra.enos_g5k.g5k_api_utils:Reloading flopsworker from lyon
Traceback (most recent call last):
File "run.py", line 33, in <module>
roles, networks = provider.init()
File "/home/msimonin/workspace/enoslib-tutorials/exercices/venv/lib/python3.7/site-packages/enoslib/infra/enos_g5k/provider.py", line 73, in init
r.launch()
File "/home/msimonin/workspace/enoslib-tutorials/exercices/venv/lib/python3.7/site-packages/enoslib/infra/enos_g5k/api.py", line 99, in launch
self.reserve()
File "/home/msimonin/workspace/enoslib-tutorials/exercices/venv/lib/python3.7/site-packages/enoslib/infra/enos_g5k/api.py", line 107, in reserve
nodes, networks = self.driver.reserve()
File "/home/msimonin/workspace/enoslib-tutorials/exercices/venv/lib/python3.7/site-packages/enoslib/infra/enos_g5k/driver.py", line 131, in reserve
self.networks,
File "/home/msimonin/workspace/enoslib-tutorials/exercices/venv/lib/python3.7/site-packages/enoslib/infra/enos_g5k/utils.py", line 53, in grid_get_or_create_job
jobs = g5k_api_utils.grid_reload_from_name(job_name)
File "/home/msimonin/workspace/enoslib-tutorials/exercices/venv/lib/python3.7/site-packages/enoslib/infra/enos_g5k/g5k_api_utils.py", line 289, in grid_reload_from_name
raise EnosG5kDuplicateJobsError(site, job_name)
enoslib.infra.enos_g5k.error.EnosG5kDuplicateJobsError: Duplicate jobs on <class 'grid5000.objects.Site'> =>