Hi guys,
Maybe you can help with something:
My devices use the Python SDK to set the environment variables they need themselves. After downloading their individual configuration from our backend they use the “resin.models.environment_variables.device.create” function to create the needed variables.
Now, that works fine. But somehow, updating and removing env vars results in errors:
When updating a variable via “resin.models.environment_variables.device.update()” I get this:
15.03.18 21:57:55 (+0100) Now updating config_var 'RESIN_HOST_CONFIG_disable_splash' on device to value '0'
15.03.18 21:57:56 (+0100) Exception in thread Thread-3:
15.03.18 21:57:56 (+0100) Traceback (most recent call last):
15.03.18 21:57:56 (+0100) File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner
15.03.18 21:57:56 (+0100) self.run()
15.03.18 21:57:56 (+0100) File "/usr/local/lib/python2.7/threading.py", line 754, in run
15.03.18 21:57:56 (+0100) self.__target(*self.__args, **self.__kwargs)
15.03.18 21:57:56 (+0100) File "ResinManager.py", line 142, in set_device_environment_variables_thread
15.03.18 21:57:56 (+0100) config_var_dict[entry])
15.03.18 21:57:56 (+0100) File "/usr/local/lib/python2.7/site-packages/resin/models/environment_variables.py", line 128, in update
15.03.18 21:57:56 (+0100) endpoint=self.settings.get('pine_endpoint')
15.03.18 21:57:56 (+0100) File "/usr/local/lib/python2.7/site-packages/resin/base_request.py", line 175, in request
15.03.18 21:57:56 (+0100) raise exceptions.RequestError(response._content)
15.03.18 21:57:56 (+0100) RequestError
And when removing a variable via “resin.models.environment_variables.device.remove()” I get this:
15.03.18 22:04:06 (+0100) Now removing config_var 'RESIN_HOST_CONFIG_gpu_mem' on device with value '16' and id '131778'
15.03.18 22:04:07 (+0100) Exception in thread Thread-3:
15.03.18 22:04:07 (+0100) Traceback (most recent call last):
15.03.18 22:04:07 (+0100) File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner
15.03.18 22:04:07 (+0100) self.run()
15.03.18 22:04:07 (+0100) File "/usr/local/lib/python2.7/threading.py", line 754, in run
15.03.18 22:04:07 (+0100) self.__target(*self.__args, **self.__kwargs)
15.03.18 22:04:07 (+0100) File "ResinManager.py", line 154, in set_device_environment_variables_thread
15.03.18 22:04:07 (+0100) resin.models.environment_variables.device.remove(current_vars_on_device_dict[entry][0])
15.03.18 22:04:07 (+0100) File "/usr/local/lib/python2.7/site-packages/resin/models/environment_variables.py", line 150, in remove
15.03.18 22:04:07 (+0100) endpoint=self.settings.get('pine_endpoint')
15.03.18 22:04:07 (+0100) File "/usr/local/lib/python2.7/site-packages/resin/base_request.py", line 175, in request
15.03.18 22:04:07 (+0100) raise exceptions.RequestError(response._content)
15.03.18 22:04:07 (+0100) RequestError
This can’t be expected behaviour right?
Thanks!
Frans