Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 513600 - app-emulation/ganeti-2.11-2-r1: gnt-cluster upgrade/renew-crypto doesn't work
Summary: app-emulation/ganeti-2.11-2-r1: gnt-cluster upgrade/renew-crypto doesn't work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-17 17:39 UTC by Zentoo
Modified: 2014-06-18 18:53 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
daemon-util patch (daemon-util.patch,1.00 KB, patch)
2014-06-18 10:56 UTC, Zentoo
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zentoo 2014-06-17 17:39:20 UTC
If you upgrade a ganeti cluster to ganeti-2.11-2, you have to use gnt-cluster upgrade that execute gnt-cluster renew-crypto or use gnt-cluster renew-crypto manually. I suppose that will prevent too to install a fresh cluster.

The problem is:
gnt-cluster renew-crypto stop with an error 1 as it's using "daemon-util start-all" script to start all daemons on a no-master node of the cluster when trying to launch ganeti-masterd.

I suppose that "daemon-util start-all" shouldn't start all daemon on a no-master node as /etc/init.d/ganeti does by excluding ganeti-masterd/ganeti-rapi/ganeti-luxid when it's run on a no-master node.




Reproducible: Always

Steps to Reproduce:
gnt-cluster renew-crypto --new-node-certificates

Actual Results:  
# gnt-cluster renew-crypto --new-node-certificates 
This requires all daemons on all nodes to be restarted and may take
some time. Continue?
y/[n]/?: y
Gathering cluster information
Blocking watcher
Stopping master daemons
Stopping daemons on node01.atanar.net
Stopping daemons on node02.atanar.net
Updating certificates and keys
Starting daemons on node01.atanar.net
Failure: command execution error:
Failed to run command ssh -oEscapeChar=none -oHashKnownHosts=no -oGlobalKnownHostsFile=/var/lib/ganeti/known_hosts -oUserKnownHostsFile=/dev/null -oCheckHostIp=no -oHostKeyAlias=cloud.atanar.net -q -oPort=22 -oBatchMode=yes -oStrictHostKeyChecking=yes -4 root@node01.atanar.net '/usr/lib64/ganeti/daemon-util start-all' on node node01.atanar.net : exitcode 1 and error  * start-stop-daemon: failed to start `/usr/sbin/ganeti-masterd'
exit code 1


Expected Results:  
 # gnt-cluster renew-crypto --new-node-certificates 
This requires all daemons on all nodes to be restarted and may take
some time. Continue?
y/[n]/?: y
Gathering cluster information
Blocking watcher
Stopping master daemons
Stopping daemons on node01.atanar.net
Stopping daemons on node02.atanar.net
Updating certificates and keys
Starting daemons on node01.atanar.net
Starting daemons on node02.atanar.net
All requested certificates and keys have been replaced. Running "gnt-cluster verify" now is recommended.


Very dirty workaround for people that upgrade their cluster:
create a daemon-util script wrapper that launch "/etc/init.d/ganeti restart" when the script is called with "start-all" argument.
Comment 1 Zentoo 2014-06-17 17:41:07 UTC
Problem and initial debug:
https://groups.google.com/forum/#!topic/ganeti/Dg3-rpqpM9U%5B1-25-false%5D
Comment 2 Patrick McLean gentoo-dev 2014-06-17 21:32:06 UTC
Hmm, start-stop-daemon on gentoo is different than on debian (which I presume the default daemon-util was written for). For one, it does not support the --oknodo option, and various other options have different names.

I suppose I could patch the daemon-util to call the init script, but that does seem kind of ugly as well.

It would be very nice if the upstream daemon-util script could be aware of which daemons to start where and handle that rather than just blindly trying to start everything and ignoring certain types of failure.
Comment 3 Zentoo 2014-06-17 21:49:18 UTC
Why not only list daemons that need to be launched for a no-master node in daemon-util script as it's done in gentoo init.d.

It will be less ugly than a call to the init.d script isn't it ?
Comment 4 Zentoo 2014-06-18 10:56:51 UTC
Created attachment 379188 [details, diff]
daemon-util patch

manage the list of ganeti daemon depending on master node condition
Comment 5 Zentoo 2014-06-18 10:57:24 UTC
I've attached a patch that don't use init.d script.
Comment 6 Patrick McLean gentoo-dev 2014-06-18 18:53:40 UTC
Fixed in app-emulation/ganeti-2.11-2-r2, thanks for the patch.