Skip to content

Commit

Permalink
Allow posting daemon service actions on the local daemon
Browse files Browse the repository at this point in the history
'svcmgr --node <node>' was entering the cluster-wide logic when the
specified node is the local node, whereas it entered the crm logic for
other nodes.

Align behaviour to always enter the crm logic when --node is specified.

Example:

$ hostname
aubergine

$ sudo svcmgr -s ha1 stop --node aubergine
            INFO    request action 'stop --daemon' on node aubergine
 ip#1       INFO    skip 'stop' on standby resource (--force to override)
 ip#0       INFO    128.0.0.2 is already down on lo
  • Loading branch information
cvaroqui committed Jul 6, 2017
1 parent ef917cb commit c7b772f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/svc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2181,7 +2181,7 @@ def print_config_mtime(self):
print(mtime)

def async_action(self, action, wait=None, timeout=None):
if self.options.node and self.options.node != rcEnv.nodename:
if self.options.node is not None and self.options.node != "":
cmd = sys.argv[1:]
cmd = drop_option("--node", cmd, drop_value=True)
cmd = drop_option("-s", cmd, drop_value=True)
Expand Down

0 comments on commit c7b772f

Please sign in to comment.