upgrading charm does not trigger upgrade-charm hook properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack RabbitMQ Server Charm |
Fix Committed
|
Undecided
|
DUFOUR Olivier |
Bug Description
It looks like "upgrade-charm" hook points to a bash script to handle python2 to python3 migration.
Within the shell script there is a line with :
```exec ./hooks/
https:/
However as seen in the logs, there is no hook ```upgrade-
2022-10-17 02:32:18 DEBUG juju.worker.uniter agent.go:20 [AGENT-STATUS] executing: running upgrade-charm hook
2022-10-17 02:32:18 DEBUG juju.worker.
2022-10-17 02:32:18 DEBUG unit.rabbit-
2022-10-17 02:32:18 DEBUG unit.rabbit-
2022-10-17 02:32:19 DEBUG unit.rabbit-
2022-10-17 02:32:19 DEBUG unit.rabbit-
2022-10-17 02:32:19 DEBUG unit.rabbit-
2022-10-17 02:32:19 DEBUG unit.rabbit-
2022-10-17 02:32:20 DEBUG unit.rabbit-
2022-10-17 02:32:20 INFO unit.rabbit-
2022-10-17 02:32:20 INFO unit.rabbit-
2022-10-17 02:32:20 INFO unit.rabbit-
2022-10-17 02:32:20 INFO unit.rabbit-
This has been confirmed on my side as happening on 3.9/stable branch and on master branch when working on an unrelated fix in the upgrade-charm path.
I've been able to re-enable that hook by renaming
```@hooks.
https:/
But the hook would go in error with the block of code below.
rabbit.
if not rabbit.
serial = coordinator.
A quick workaround was to simply remove the block since it wasn't executed anyway with the entire hook being skipped so far.
One of the guess that code would fail, is related to the fact that rabbitmq is being stopped as part of the pre_install_hooks()
Changed in charm-rabbitmq-server: | |
assignee: | nobody → DUFOUR Olivier (odufourc) |
status: | New → In Progress |
Fix proposed to branch: master /review. opendev. org/c/openstack /charm- rabbitmq- server/ +/862480
Review: https:/