Status: Accepted
Owner: [email protected]
Labels: Type-Defect Milestone-Release2.10 Priority-High

New issue 685 by [email protected]: daemon-util start-master/stop-master always fail if confd is disabled
http://code.google.com/p/ganeti/issues/detail?id=685

In 'daemons/daemon-util.in', these functions are supposed to return 0 if everything succeeds and non-0 otherwise. However, with confd disabled, the 'and' expression (&&) always fails and, as a result, it always returns non-0, which is wrong and breaks commands, such as, 'gnt-cluster renew-crypto':

  # Starts the master role
  start_master() {
    start ganeti-masterd
    start ganeti-rapi
    _confd_enabled && start ganeti-luxid
  }

  # Stops the master role
  stop_master() {
    stop ganeti-rapi
    stop ganeti-masterd
    _confd_enabled && stop ganeti-luxid
  }

To reproduce the problem, disable confd and execute, for example:

  gnt-cluster renew-crypto

Also, the 'daemons/daemon-util.in' says that daemons are started in one order and stopped in the reverse order. This is not being honored and needs to be fixed as well.

Finally, I don't think we need to stop each daemon and test whether they failed (and so, bail out of the function) because the script defines 'set -e' at the top.

Fix in attachment in the next comment, after creating the issue, because I need the issue number for the commit message in the patch -_-

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

Reply via email to