-
Type: Bug
-
Status: Resolved (View Workflow)
-
Priority: Medium
-
Resolution: Fixed
-
Affects Version/s: Next for SEBA 2.0
-
Fix Version/s: None
-
Component/s: NEM
-
Labels:None
-
Story Points:3
-
Epic Link:
xosapi module assumes that convenience methods can be saved in the same location that the module is saved in, but this location changes depending on the distro used.
In Ubuntu and similar distros this is `/usr/local/lib/python2.7/dist-packages/`. Alpine installs python modules in `/usr/lib/python2.7/site-packages/`.
When testing with Alpline as a synchronizer image, this failure arises:
2019-03-14T16:35:07.436915Z [info ] reconnected after_retries=14 2019-03-14T16:35:07.620652Z [info ] Loading convenience methods methods=[u'voltserviceinstance.py', u'voltservice.py', u'rcordsubscriber.py', u'fabric_crossconnect_service.py'] 2019-03-14T16:35:07.623288Z [debug ] Saving convenience method method=u'voltserviceinstance.py' Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/xossynchronizer/modelaccessor.py", line 416, in config_accessor config_accessor_grpcapi() File "/usr/lib/python2.7/site-packages/xossynchronizer/modelaccessor.py", line 377, in config_accessor_grpcapi reactor.run() File "/usr/lib/python2.7/site-packages/twisted/internet/base.py", line 1199, in run self.mainLoop() File "/usr/lib/python2.7/site-packages/twisted/internet/base.py", line 1208, in mainLoop self.runUntilCurrent() --- <exception caught here> --- File "/usr/lib/python2.7/site-packages/twisted/internet/base.py", line 828, in runUntilCurrent call.func(*call.args, **call.kw) File "/usr/lib/python2.7/site-packages/xosapi/xos_grpc_client.py", line 138, in reconnected self.load_convenience_methods() File "/usr/lib/python2.7/site-packages/xosapi/xos_grpc_client.py", line 98, in load_convenience_methods open(save_path, "w").write(cm.contents) exceptions.IOError: [Errno 2] No such file or directory: u'/usr/local/lib/python2.7/dist-packages/xosapi/convenience/voltserviceinstance.py'
Preferably xosapi should use a neutral temp directory for convenience methods, or alternatively determine the path to save convenience methods in at runtime. It's currently hardcoded here:
- blocks
-
SEBA-497 Use alpine as base image for XOS synchronizers
- Resolved
# | Subject | Branch | Project | Status | CR | V |
---|---|---|---|---|---|---|
13331,2 | SEBA-540 Move dynamic convenience methods dir to /var/run/xosapi/convenience | master | xos | Status: MERGED | +2 | +1 |