Deployment of Device component fails when following the tutorial
When running the deploy.sh script, the device component and monitoring service time out while waiting for their conditions to be met.
In case of the device component, it seems to be an issue with paramiko and the cryptography package considering Blowfish to be deprecated (cf. https://github.com/paramiko/paramiko/issues/2038 for a general thread on that issue. Please find the logs / outputs in the following:
stanisll@b5g-2:~/tfs-ctrl$ ./deploy.sh
[...]
Waiting for 'device' component...
error: timed out waiting for the condition on deployments/deviceservice
[...]
stanisll@b5g-2:~/tfs-ctrl$ ./scripts/show_logs_device.sh
/usr/local/lib/python3.9/site-packages/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated
"class": algorithms.Blowfish,
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/var/teraflow/device/service/__main__.py", line 24, in <module>
from .drivers import DRIVERS
File "/var/teraflow/device/service/drivers/__init__.py", line 63, in <module>
FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.OPTICAL_LINE_SYSTEM,
File "/usr/local/lib/python3.9/enum.py", line 429, in __getattr__
raise AttributeError(name) from None
AttributeError: OPTICAL_LINE_SYSTEM
I managed to fix both issues by applying the following fixes:
- Changed
paramiko==2.9.2
toparamiko==2.11.0
insrc/device/requirements.in
- Added
OPTICAL_LINE_SYSTEM = 'optical-line-system'
tosrc/common/DeviceTypes.py