gsss charm cronjob script doesn't set an appropriate status when sync wasn't started
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Glance-Simplestreams-Sync Charm |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
While investigating LP: #1938069 I've found an inconsistency between the charm status and the real state of things:
<show-status-log>
26 Jul 2021 16:17:02Z juju-unit executing running commands
26 Jul 2021 16:17:02Z workload maintenance Synchronising images
26 Jul 2021 16:17:02Z juju-unit idle
<gsss.log>
INFO * 07-26 16:16:02 [PID:706977] * root * ps_service_
INFO * 07-26 16:16:02 [PID:706977] * root * Not updating product streams service.
INFO * 07-26 16:16:02 [PID:706977] * root * Beginning image sync
INFO * 07-26 16:16:02 [PID:706977] * root * Executing command: ['juju-run', 'glance-
INFO * 07-26 16:16:02 [PID:706977] * root * Configuring sync for url {'url': 'http://
INFO * 07-26 16:16:02 [PID:706977] * root * Executing command: ['juju-run', 'glance-
ERROR * 07-26 16:16:02 [PID:706977] * root * could not retrieve any object-store endpoints
INFO * 07-26 16:16:02 [PID:706977] * root * sync done..
The problem here is that despite of the charm-invoked script has failed (e.g sync didn't even start), the charm status wasn't reflecting this.