remove-services action could use a '--dry-run'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Cinder Charm |
New
|
Undecided
|
Unassigned |
Bug Description
I ended up having to read through the code of the action to determine if it really would run
cinder-manage service remove cinder-scheduler juju-2a61ce-
cinder-manage service remove cinder-volume juju-2a61ce-
Hints -- in the end it wouldn't have, the 'cinder-volume' host name wasn't an exact match, so it would have only run the first subprocess.
Could you add a dry-run defaults to False on the action so that an operator could see WHAT the action intends to do before it does so?
It would have also been nice to have an action 'show-services' which would list which services are active on this host.
And finally:
please consider changing the action in `remove_services` method
def remove_
host = action_
services = cinder_
if host not in ("unused", "",):
- services = [s for s in services if s.host == host]
+ services = [s for s in services if s.host.
else:
services = [s for s in services if s.host not in DEFAULT_SERVICES]
so that these @LVM hostnames will also be adjusted by this action
workaround issue:
juju run -u cinder/$unit '
cinder-manage service remove cinder-scheduler $(hostname)
cinder-manage service remove cinder-volume $(hostname)@LVM
'