Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 373581

Summary: app-emulation/ganeti: init script should not try to start/stop masterd and rapi on non-master nodes
Product: Gentoo Linux Reporter: Heiko Baumann <heiko>
Component: Current packagesAssignee: Lance Albertson (RETIRED) <ramereth>
Status: RESOLVED FIXED    
Severity: normal CC: tobias.pal, virtualization
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch to fix service startup on non-master nodes

Description Heiko Baumann 2011-06-30 12:07:34 UTC
the ganeti init script tries to start masterd and rapi on any node, not just on the master node.

Reproducible: Always

Steps to Reproduce:
1. /etc/init.d/ganeti start
2. /etc/init.d/ganeti stop
Actual Results:  

node2 ~ # /etc/init.d/ganeti start
 * Starting ganeti-noded ...                                                                                                                               [ ok ]
 * Starting ganeti-masterd ...                                                                                                                             [ ok ]
 * Starting ganeti-confd ...                                                                                                                               [ ok ]
 * Starting ganeti-rapi ...                                                                                                                                [ ok ]
node2 ~ # /etc/init.d/ganeti stop
 * Stopping ganeti-rapi ...
 * exit code 1                                                                                                                                             [ !! ]
 * Stopping ganeti-confd ...                                                                                                                               [ ok ]
 * Stopping ganeti-masterd ...
 * exit code 1                                                                                                                                             [ !! ]
 * Stopping ganeti-noded ...                                                                                                                               [ ok ]
node2 ~ # gnt-cluster getmaster 
node1.domain.intern


Expected Results:  
node2 ~ # /etc/init.d/ganeti start
 * Starting ganeti-noded ...                                                                                                                               [ ok ]
 * Starting ganeti-confd ...                                                                                                                               [ ok ]
node2 ~ # /etc/init.d/ganeti stop 
 * Stopping ganeti-noded ...                                                                                                                               [ ok ]
 * Stopping ganeti-confd ...                                                                                                                               [ ok ]
node2 ~ # gnt-cluster getmaster 
node1.domain.intern



attached is a patch that should fix the problem.
Comment 1 Heiko Baumann 2011-06-30 12:09:24 UTC
Created attachment 278693 [details]
patch to fix service startup on non-master nodes

check node status via gnt-cluster getmaster and only start masterd and rapi on if executed on master node.
Comment 2 Lance Albertson (RETIRED) gentoo-dev 2012-05-12 08:12:24 UTC
(In reply to comment #1)
> Created attachment 278693 [details]
> patch to fix service startup on non-master nodes
> 
> check node status via gnt-cluster getmaster and only start masterd and rapi
> on if executed on master node.

Thanks for the patch! I took a slightly different approach and fixed it. It's push to portage and sorry it took me so damn long to fix this.