gsss charm cronjob script doesn't set an appropriate status when sync wasn't started

Bug #1938071 reported by Vladimir Grevtsev
6
This bug affects 1 person
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_exists=True, charm_conf['use_swift']=False, swift_exists=False
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-simplestreams-sync/0', 'status-set maintenance "Synchronising images"']
INFO * 07-26 16:16:02 [PID:706977] * root * Configuring sync for url {'url': 'http://cloud-images.ubuntu.com/releases/', 'name_prefix': 'ubuntu:released', 'path': 'streams/v1/index.sjson', 'max': 1, 'item_filters': ['release~(bionic|focal)', 'arch~(x86_64|amd64)', 'ftype~(disk1.img|disk.img)']}
INFO * 07-26 16:16:02 [PID:706977] * root * Executing command: ['juju-run', 'glance-simplestreams-sync/0', 'env']
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.

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.