Depracated blowfish cipher is causing errors in auto_lint.py
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
charm-juju-lint |
Invalid
|
Undecided
|
Mert Kirpici |
Bug Description
Charm juju-lint depends on Paramiko library for SSH connections; this library recently deprecated the Blowfish cypher that the charm currently uses, leading to the charm being stuck in the `error: config-changed hook`.
Stack trace:
unit-juju-lint-0: 23:00:03 ERROR unit.juju-
/var/lib/
warnings.
/var/lib/
"class": algorithms.
/tmp/auto_lint.pid already exists, exiting
unit-juju-lint-0: 23:00:03 ERROR unit.juju-
Traceback (most recent call last):
File "./src/charm.py", line 125, in <module>
main(
File "/var/lib/
_emit_
File "/var/lib/
event_
File "/var/lib/
framework.
File "/var/lib/
self.
File "/var/lib/
custom_
File "./src/charm.py", line 91, in on_config_changed
self.
File "/var/lib/
raise error
File "/var/lib/
subprocess.
File "/usr/lib/
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/
raise CalledProcessEr
subprocess.
unit-juju-lint-0: 23:00:04 ERROR juju.worker.
Relevant run:
https:/
Run artifacts:
https:/
tags: | added: bseng-437 |
I think this particular exception is not caused by the Blowfish cipher deprecation output(which was probably a warning). The line that carries the fatal information is:
> /tmp/auto_lint.pid already exists, exiting
Which is coming from the code block that ensures there's only one instance of the `auto_lint.py` process executing at any given moment. Usually this script is run on a cronjob, which is installed to the system during the install hook of the juju-lint charm. I said "usually" because there are two instances where this script is run as a subprocess by the charm itself:
1 - during install: after the cronjob installation is completed, the script is run once.
2 - during config-changed.
Since we are seeing this as an exception in the charm logs, I think one of the above event handlers were running while the cronjob had already been triggered before and it was still running.