Certain functions run more than once when upgrading the keystone charm
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Keystone Charm |
Triaged
|
Medium
|
Unassigned |
Bug Description
When upgrading the keystone charm, certain charm functions run more than once. In particular the update_
This update_
The aim of this bug is to see if there's a way we can reduce the number of times certain functions run (specifically update_
I added debug status_set messages after each function in keystone_hooks.py (https:/
$ juju upgrade-charm --path ~/keystone-
$ juju show-status-log -n 100 keystone/0
18 Apr 2019 14:19:58Z juju-unit executing running upgrade-charm hook
18 Apr 2019 14:20:01Z workload maintenance DEBUG Running main
18 Apr 2019 14:20:04Z workload maintenance DEBUG Running upgrade_charm
18 Apr 2019 14:20:04Z workload maintenance Installing apt packages
18 Apr 2019 14:20:14Z workload maintenance DEBUG Running leader_
18 Apr 2019 14:20:14Z workload maintenance DEBUG Running update_
18 Apr 2019 14:20:29Z workload maintenance DEBUG Running identity_changed
18 Apr 2019 14:20:34Z workload maintenance DEBUG Running update_nrpe_config
18 Apr 2019 14:20:35Z workload maintenance DEBUG Running update_
18 Apr 2019 14:20:49Z workload maintenance DEBUG Running identity_changed
18 Apr 2019 14:20:55Z workload active Unit is ready
18 Apr 2019 14:20:57Z juju-unit executing running commands
18 Apr 2019 14:21:02Z juju-unit executing running config-changed hook
18 Apr 2019 14:21:04Z workload maintenance DEBUG Running main
18 Apr 2019 14:21:07Z workload maintenance DEBUG Running config_changed
18 Apr 2019 14:21:08Z workload maintenance DEBUG Running cluster_joined
18 Apr 2019 14:21:09Z workload maintenance DEBUG Running config_
18 Apr 2019 14:21:16Z workload maintenance DEBUG Running configure_https
18 Apr 2019 14:21:22Z workload maintenance DEBUG Running update_nrpe_config
18 Apr 2019 14:21:35Z workload maintenance DEBUG Running update_
18 Apr 2019 14:21:50Z workload maintenance DEBUG Running identity_changed
18 Apr 2019 14:21:55Z workload maintenance DEBUG Running update_
18 Apr 2019 14:21:55Z workload maintenance DEBUG Running update_
18 Apr 2019 14:21:55Z workload maintenance DEBUG Running notify_
18 Apr 2019 14:21:57Z workload active Unit is ready
18 Apr 2019 14:21:58Z juju-unit idle
I use a freshly cloned version of https:/
Changed in charm-keystone: | |
milestone: | none → 19.07 |
importance: | Undecided → Medium |
Changed in charm-keystone: | |
milestone: | 19.07 → 19.10 |
Changed in charm-keystone: | |
milestone: | 19.10 → 20.01 |
tags: | added: charm-upgrade |
Changed in charm-keystone: | |
milestone: | 20.01 → 20.05 |
Changed in charm-keystone: | |
milestone: | 20.05 → 20.08 |
Changed in charm-keystone: | |
milestone: | 20.08 → none |
Looking at your status log above, I only see s little bit of duplication within a single hook:
# Upgrade Charm
- main init_db_ if_ready all_identity_ relation_ units all_identity_ relation_ units
- upgrade_charm
- leader_
- update_
- identity_changed
- update_nrpe_config
- update_
- identity_changed
The only duplicated function calls that I see within a single hook are the update_ all_identity_ relation_ units and identity_changed in the upgrade-charm hook. I suspect that there is a bit of re-organizing that we can do to remove the first pairs of that function, and only run them later.