Depracated blowfish cipher is causing errors in auto_lint.py

Bug #1990992 reported by Moises Emilio Benzan Mora
8
This bug affects 1 person
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-lint/0.juju-log auto_lint.py failed with this output:
/var/lib/juju/agents/unit-juju-lint-0/charm/venv/juju/loop.py:4: UserWarning: juju.loop module is being deprecated by 3.0, use juju.jasyncio instead
  warnings.warn('juju.loop module is being deprecated by 3.0, use juju.jasyncio instead')
/var/lib/juju/agents/unit-juju-lint-0/charm/venv/paramiko/transport.py:236: CryptographyDeprecationWarning: Blowfish has been deprecated
  "class": algorithms.Blowfish,
/tmp/auto_lint.pid already exists, exiting

unit-juju-lint-0: 23:00:03 ERROR unit.juju-lint/0.juju-log Uncaught exception while in charm code:
Traceback (most recent call last):
  File "./src/charm.py", line 125, in <module>
    main(JujuLintCharm)
  File "/var/lib/juju/agents/unit-juju-lint-0/charm/venv/ops/main.py", line 431, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-juju-lint-0/charm/venv/ops/main.py", line 142, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-juju-lint-0/charm/venv/ops/framework.py", line 283, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-juju-lint-0/charm/venv/ops/framework.py", line 743, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-juju-lint-0/charm/venv/ops/framework.py", line 790, in _reemit
    custom_handler(event)
  File "./src/charm.py", line 91, in on_config_changed
    self.helper.run_auto_lint()
  File "/var/lib/juju/agents/unit-juju-lint-0/charm/lib/lib_jujulint.py", line 183, in run_auto_lint
    raise error
  File "/var/lib/juju/agents/unit-juju-lint-0/charm/lib/lib_jujulint.py", line 173, in run_auto_lint
    subprocess.check_output([lint_script], stderr=subprocess.STDOUT).decode(
  File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/usr/local/bin/auto_lint.py']' returned non-zero exit status 1.
unit-juju-lint-0: 23:00:04 ERROR juju.worker.uniter.operation hook "config-changed" (via hook dispatching script: dispatch) failed: exit status 1

Relevant run:
https://solutions.qa.canonical.com/v2/testruns/dfe263fb-7501-4288-99c3-d3e4bd6ab5fe/

Run artifacts:
https://oil-jenkins.canonical.com/artifacts/dfe263fb-7501-4288-99c3-d3e4bd6ab5fe/index.html

Eric Chen (eric-chen)
tags: added: bseng-437
Revision history for this message
Mert Kirpici (mertkirpici) wrote :

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.

Changed in charm-juju-lint:
assignee: nobody → Mert Kirpici (mertkirpici)
Revision history for this message
Mert Kirpici (mertkirpici) wrote :

Created LP #1991897
https://bugs.launchpad.net/charm-juju-lint/+bug/1991897

Marking this as invalid since the issue is not related to the Blowfish cipher warning.

Changed in charm-juju-lint:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.