[cobbler] Cobbler Power commands

David Leach davidl at image-engine.com
Mon Mar 18 16:58:10 UTC 2013


Fencing agents run sweet, tested this on the command line. We're running 
2.2.3 Fencing agents are the latest as of about a month ago.

The problem occurs when a host fails because it's ipmi interface is 
down, a hardware failure or the management module on the blade server 
doesn't respond or someone has made a typo with the password or 
something. Instead of the cobbler wrapper just going OK, bad return code 
let's try the next host on the list it bails out.

EG. When this happens on a list of multiple hosts it stops at that point 
instead of continuing with the next host.

Sat Mar 16 11:09:30 2013 - INFO | cobbler power configuration is:
Sat Mar 16 11:09:30 2013 - INFO |       type   : ipmilan
Sat Mar 16 11:09:30 2013 - INFO |       address: 11.11.11.11
Sat Mar 16 11:09:30 2013 - INFO |       user   : admin
Sat Mar 16 11:09:30 2013 - INFO |       id     :
Sat Mar 16 11:09:30 2013 - INFO | running: /usr/sbin/fence_ipmilan
Sat Mar 16 11:09:49 2013 - INFO | received on stdout: Powering on 
machine @ IPMI:11.11.11.11...Failed

Sat Mar 16 11:09:49 2013 - DEBUG | received on stderr:
Sat Mar 16 11:09:51 2013 - INFO | running: /usr/sbin/fence_ipmilan
Sat Mar 16 11:10:11 2013 - INFO | received on stdout: Powering on 
machine @ IPMI:11.11.11.11...Failed

Sat Mar 16 11:10:11 2013 - DEBUG | received on stderr:
Sat Mar 16 11:10:13 2013 - INFO | running: /usr/sbin/fence_ipmilan
Sat Mar 16 11:10:32 2013 - INFO | received on stdout: Powering on 
machine @ IPMI:11.11.11.11...Failed

Sat Mar 16 11:10:32 2013 - DEBUG | received on stderr:
Sat Mar 16 11:10:34 2013 - INFO | running: /usr/sbin/fence_ipmilan
Sat Mar 16 11:10:53 2013 - INFO | received on stdout: Powering on 
machine @ IPMI:11.11.11.11...Failed

Sat Mar 16 11:10:53 2013 - DEBUG | received on stderr:
Sat Mar 16 11:10:55 2013 - INFO | running: /usr/sbin/fence_ipmilan
Sat Mar 16 11:11:14 2013 - INFO | received on stdout: Powering on 
machine @ IPMI:11.11.11.11...Failed

Sat Mar 16 11:11:14 2013 - DEBUG | received on stderr:
Sat Mar 16 11:11:16 2013 - INFO | Exception occured: <class 
'cobbler.cexceptions.CX'>
Sat Mar 16 11:11:16 2013 - INFO | Exception value: 'command failed 
(rc=1), please validate the physical setup and cobbler config'
Sat Mar 16 11:11:16 2013 - INFO | Exception Info:
   File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 126, 
in die
     raise CX(msg)

Sat Mar 16 11:11:16 2013 - INFO | Exception occured: <class 
'cobbler.cexceptions.CX'>
Sat Mar 16 11:11:16 2013 - INFO | Exception value: 'command failed 
(rc=1), please validate the physical setup and cobbler config'
Sat Mar 16 11:11:16 2013 - INFO | Exception Info:
   File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 89, 
in run
     rc = self._run(self)
    File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 259, 
in runner
self.remote.power_system(object_id,self.options.get("power",""),token,logger=self.logger)
    File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 
1915, in power_system
     rc=self.api.power_on(obj, user=None, password=None, logger=logger)
    File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 1019, 
in power_on
     return 
action_power.PowerTool(self._config,system,self,user,password,logger=logger).power("on")
    File "/usr/lib/python2.6/site-packages/cobbler/action_power.py", 
line 123, in power
     utils.die(self.logger,"command failed (rc=%s), please validate the 
physical setup and cobbler config" % rc)
    File "/usr/lib/python2.6/site-packages/cobbler/utils.py", line 134, 
in die
     raise CX(msg)

Sat Mar 16 11:11:16 2013 - ERROR | ### TASK FAILED ###



On 03/18/2013 09:47 AM, James Clendenan wrote:
> Hi David
>
> Which power plugins are you using as fence scripts?  I know a few of 
> them can occasionally cause problems as well. Also which version are 
> you running at the moment for cobbler?
>
> Do you have any logs you can share?
>
> Thanks,
>
> James
>
> --
> Sent from my phone.
>
> On 2013-03-18, at 9:11 AM, David Leach <davidl at image-engine.com 
> <mailto:davidl at image-engine.com>> wrote:
>
>> Yeah, I was thinking in my head, wouldn't a simple bash loop not have 
>> this problem?
>>
>> It was me putting in the update ;) I would really appreciate it being 
>> worked on as it's not always tech savvy people using this (excellent) 
>> feature.
>>
>> Cheers
>> On 03/18/2013 09:06 AM, James Cammarata wrote:
>>> On Mon, Mar 18, 2013 at 10:59 AM, David Leach 
>>> <davidl at image-engine.com <mailto:davidl at image-engine.com>> wrote:
>>>
>>>     Hi,
>>>
>>>     We're trying to use cobbler as a tool to power down hosts and
>>>     power them up in mass whenever we need to do an image update or
>>>     just for a downtime.
>>>
>>>     One issue which is a little frustrating is if you run a power
>>>     command on a bunch of hosts and one fails, the command fails at
>>>     that point. I know there was a feature request made 6 months ago
>>>     to fix this, but I was wondering if there was a work around for
>>>     this.
>>>
>>>
>>> Yes, I saw a recent update on that issue (not sure if it was you). I 
>>> can work on that if it is problematic, otherwise one work-around 
>>> would be to use a shell script from the command line in a for loop. 
>>> That way, and individual failure wouldn't stop the others from working.
>>>
>>>
>>> _______________________________________________
>>> cobbler mailing list
>>> cobbler at lists.fedorahosted.org
>>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>
>> _______________________________________________
>> cobbler mailing list
>> cobbler at lists.fedorahosted.org <mailto:cobbler at lists.fedorahosted.org>
>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>
>
> _______________________________________________
> cobbler mailing list
> cobbler at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/cobbler

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/cobbler/attachments/20130318/bd40b879/attachment-0001.html>


More information about the cobbler mailing list