Mailing List Archive

[PATCH] Power control
I have put together a patch that adds power control to conserver. I
have to say that I'm not really a C programmer and I'm sure this will
need to be cleaned up before its accepted. But I had an itch and wanted
to contribute.

I've implemented the following commands for Default and Console:
powerreset, poweroff, and powersubst.

Here is an example from my Default Global section...

powerreset /usr/sbin/power-reset --system C;
poweroff /usr/sbin/power-off --system C;
powersubst C=cs;


a snippit from the help section:

e change escape sequence f force attach read/write
g group info i information dump
k0 iniate power off k1 iniate power reset
L toggle logging on/off l? break sequence list


I'd appreciate any feedback and if anyone else finds this useful.

Obviously this doesn't handle the configuring of the command that does
the actual work. But I think thats outside the scope of conserver.
Re: [PATCH] Power control [ In reply to ]
I did this a while back with our version of 7.X. Instead of it
executing an external power command it send a message to a daemon that
was responsible for chatting with various power strips. The problem
with supporting different vendors of strips is that they each have their
own access method. The powerd daemon was responsible for knowing what
strip was on what serial power and would char with the strip to execute
the power command. To the user it was off,on,and reboot. Regardless if
you were using APC, Baytech, etc. As long as powerd had support for
that model of strip then you could control it via conserver.

I did add a feature that would make sure that the user had R/W on the
console and power control capability on the console. If not they were
sent a message from conserver that they did not have sufficient rights
to control power on that device.

Being able to control power from console is an amazing benefit. I've
used it many times to rescue systems in trouble.


On Fri, 2007-06-29 at 14:44 -0400, Bill Peck wrote:
> I have put together a patch that adds power control to conserver. I
> have to say that I'm not really a C programmer and I'm sure this will
> need to be cleaned up before its accepted. But I had an itch and wanted
> to contribute.
>
> I've implemented the following commands for Default and Console:
> powerreset, poweroff, and powersubst.
>
> Here is an example from my Default Global section...
>
> powerreset /usr/sbin/power-reset --system C;
> poweroff /usr/sbin/power-off --system C;
> powersubst C=cs;
>
>
> a snippit from the help section:
>
> e change escape sequence f force attach read/write
> g group info i information dump
> k0 iniate power off k1 iniate power reset
> L toggle logging on/off l? break sequence list
>
>
> I'd appreciate any feedback and if anyone else finds this useful.
>
> Obviously this doesn't handle the configuring of the command that does
> the actual work. But I think thats outside the scope of conserver.
> _______________________________________________
> users mailing list
> users@conserver.com
> https://www.conserver.com/mailman/listinfo/users

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: [PATCH] Power control [ In reply to ]
Christopher Fowler wrote:
> I did this a while back with our version of 7.X. Instead of it
> executing an external power command it send a message to a daemon that
> was responsible for chatting with various power strips. The problem
> with supporting different vendors of strips is that they each have their
> own access method.
Yes, I'm using our fence scripts from our cluster product to do the work
of talking to the different power strips. Did you ever post your
patches for inclusion? I just want power control from conserver and to
not have to maintain a patch going forward. :-)

> The powerd daemon was responsible for knowing what
> strip was on what serial power and would char with the strip to execute
> the power command. To the user it was off,on,and reboot. Regardless if
> you were using APC, Baytech, etc. As long as powerd had support for
> that model of strip then you could control it via conserver.
>
> I did add a feature that would make sure that the user had R/W on the
> console and power control capability on the console. If not they were
> sent a message from conserver that they did not have sufficient rights
> to control power on that device.
>
> Being able to control power from console is an amazing benefit. I've
> used it many times to rescue systems in trouble.
>
>
>

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: [PATCH] Power control [ In reply to ]
On Fri, 2007-06-29 at 16:30 -0400, Bill Peck wrote:
> Yes, I'm using our fence scripts from our cluster product to do the
> work
> of talking to the different power strips. Did you ever post your
> patches for inclusion? I just want power control from conserver and
> to
> not have to maintain a patch going forward. :-)

Yours is actually a good patch. It uses an external program instead of
IPC internal to conserver. I would just add a way to provide ACLs for
power control.


_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
RE: [PATCH] Power control [ In reply to ]
Somewhat off topic, but has anyone modded a power strip so it's outlets
could be remotely controlled, or are you all using pre-purchased power
strips with serial interfaces? The ones I've looked at are way too
expensive for home use....I'd like something I could use to remote-reboot my
systems with at home when I'm traveling, but it's not worth $1k or more. :)

Rich Holland
Principal Consultant
Guidance Technologies, Inc.
Cell: 913-645-1950
Fax: 913-273-0675


-----Original Message-----
From: users-bounces@conserver.com [mailto:users-bounces@conserver.com] On
Behalf Of Bill Peck
Sent: Friday, June 29, 2007 4:31 PM
To: Christopher Fowler
Cc: users@conserver.com
Subject: Re: [PATCH] Power control

Christopher Fowler wrote:
> I did this a while back with our version of 7.X. Instead of it
> executing an external power command it send a message to a daemon that
> was responsible for chatting with various power strips. The problem
> with supporting different vendors of strips is that they each have their
> own access method.
Yes, I'm using our fence scripts from our cluster product to do the work
of talking to the different power strips. Did you ever post your
patches for inclusion? I just want power control from conserver and to
not have to maintain a patch going forward. :-)

> The powerd daemon was responsible for knowing what
> strip was on what serial power and would char with the strip to execute
> the power command. To the user it was off,on,and reboot. Regardless if
> you were using APC, Baytech, etc. As long as powerd had support for
> that model of strip then you could control it via conserver.
>
> I did add a feature that would make sure that the user had R/W on the
> console and power control capability on the console. If not they were
> sent a message from conserver that they did not have sufficient rights
> to control power on that device.
>
> Being able to control power from console is an amazing benefit. I've
> used it many times to rescue systems in trouble.
>
>
>

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
RE: [PATCH] Power control [ In reply to ]
Hi Rich,
If you do a search on your favorite search engine for " remote
controlled power" you will find a large array or such creatures for
prices in the hundreds to thousands. For example these guys have them
for a few hundred
http://www.dataprobe.com/products/power/iboot/ibootac/index.html. If you
want anything less expensive you'll have to go to Radio Shack to find it
or possibly solder up the components yourself. I recall that the circuit
you are looking for can be found online too, just don't recall where.
Regards,
Michael

> -----Original Message-----
> From: users-bounces@conserver.com
> [mailto:users-bounces@conserver.com] On Behalf Of Rich Holland
> Sent: Friday, June 29, 2007 1:36 PM
> To: users@conserver.com
> Subject: RE: [PATCH] Power control
>
> Somewhat off topic, but has anyone modded a power strip so
> it's outlets could be remotely controlled, or are you all
> using pre-purchased power strips with serial interfaces? The
> ones I've looked at are way too expensive for home use....I'd
> like something I could use to remote-reboot my systems with
> at home when I'm traveling, but it's not worth $1k or more. :)
>
> Rich Holland
> Principal Consultant
> Guidance Technologies, Inc.
> Cell: 913-645-1950
> Fax: 913-273-0675
>
>
> -----Original Message-----
> From: users-bounces@conserver.com
> [mailto:users-bounces@conserver.com] On Behalf Of Bill Peck
> Sent: Friday, June 29, 2007 4:31 PM
> To: Christopher Fowler
> Cc: users@conserver.com
> Subject: Re: [PATCH] Power control
>
> Christopher Fowler wrote:
> > I did this a while back with our version of 7.X. Instead of it
> > executing an external power command it send a message to a
> daemon that
> > was responsible for chatting with various power strips.
> The problem
> > with supporting different vendors of strips is that they each have
> > their own access method.
> Yes, I'm using our fence scripts from our cluster product to
> do the work of talking to the different power strips. Did
> you ever post your patches for inclusion? I just want power
> control from conserver and to not have to maintain a patch
> going forward. :-)
>
> > The powerd daemon was responsible for knowing what strip
> was on what
> > serial power and would char with the strip to execute the power
> > command. To the user it was off,on,and reboot. Regardless if you
> > were using APC, Baytech, etc. As long as powerd had
> support for that
> > model of strip then you could control it via conserver.
> >
> > I did add a feature that would make sure that the user had
> R/W on the
> > console and power control capability on the console. If
> not they were
> > sent a message from conserver that they did not have
> sufficient rights
> > to control power on that device.
> >
> > Being able to control power from console is an amazing
> benefit. I've
> > used it many times to rescue systems in trouble.
> >
> >
> >
>
> _______________________________________________
> users mailing list
> users@conserver.com
> https://www.conserver.com/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> users@conserver.com
> https://www.conserver.com/mailman/listinfo/users
>
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
RE: [PATCH] Power control [ In reply to ]
On Fri, 29 Jun 2007 16:35:35 -0400, "Rich Holland"
<holland@guidancetech.com> said:
> Somewhat off topic, but has anyone modded a power strip so it's outlets
> could be remotely controlled, or are you all using pre-purchased power
> strips with serial interfaces?

I use the remote control power units that you talk about at home, but I
bought them used on eBay from sellers with decent feedback. You're
looking more around the $50-$200 range for working units that aren't the
latest models.

For some specific examples, search for "rpc-3", "baytech" (the vendor
that makes the RPC-3), "remote power control", etc..


- djg
--
DJ Gregor
dj@gregor.com

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
RE: [PATCH] Power control [ In reply to ]
I've also used a Sentry with much success. I think the 8port is around
$600. I've got one installed in a rack at our co-lo and I've used it to
save on gas many times.


On Fri, 2007-06-29 at 17:38 -0400, DJ Gregor wrote:
> On Fri, 29 Jun 2007 16:35:35 -0400, "Rich Holland"
> <holland@guidancetech.com> said:
> > Somewhat off topic, but has anyone modded a power strip so it's outlets
> > could be remotely controlled, or are you all using pre-purchased power
> > strips with serial interfaces?
>
> I use the remote control power units that you talk about at home, but I
> bought them used on eBay from sellers with decent feedback. You're
> looking more around the $50-$200 range for working units that aren't the
> latest models.
>
> For some specific examples, search for "rpc-3", "baytech" (the vendor
> that makes the RPC-3), "remote power control", etc..
>
>
> - djg

_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: [PATCH] Power control [ In reply to ]
The apc7900 is reasonable at about $420us for 8 ports; has a serial and
ethernet ports, and a reasonable (scriptable) CLI avilable via the
serial line or telnet (ssh too, I think) and a digital current readout.
I like 'em.

For home use, if you have the time to make it work, search for X10. Way
cheaper.

For modern, server class PCs, try ipmi.

Cheers,
Brian


Rich Holland <holland@guidancetech.com> wrote:

> Somewhat off topic, but has anyone modded a power strip so it's outlets
> could be remotely controlled, or are you all using pre-purchased power
> strips with serial interfaces? The ones I've looked at are way too
> expensive for home use....I'd like something I could use to remote-reboot my
> systems with at home when I'm traveling, but it's not worth $1k or more. :)
>
> Rich Holland
> Principal Consultant
> Guidance Technologies, Inc.
> Cell: 913-645-1950
> Fax: 913-273-0675
>
>
> -----Original Message-----
> From: users-bounces@conserver.com [mailto:users-bounces@conserver.com] On
> Behalf Of Bill Peck
> Sent: Friday, June 29, 2007 4:31 PM
> To: Christopher Fowler
> Cc: users@conserver.com
> Subject: Re: [PATCH] Power control
>
> Christopher Fowler wrote:
> > I did this a while back with our version of 7.X. Instead of it
> > executing an external power command it send a message to a daemon that
> > was responsible for chatting with various power strips. The problem
> > with supporting different vendors of strips is that they each have their
> > own access method.
> Yes, I'm using our fence scripts from our cluster product to do the work
> of talking to the different power strips. Did you ever post your
> patches for inclusion? I just want power control from conserver and to
> not have to maintain a patch going forward. :-)
>
> > The powerd daemon was responsible for knowing what
> > strip was on what serial power and would char with the strip to execute
> > the power command. To the user it was off,on,and reboot. Regardless if
> > you were using APC, Baytech, etc. As long as powerd had support for
> > that model of strip then you could control it via conserver.
> >
> > I did add a feature that would make sure that the user had R/W on the
> > console and power control capability on the console. If not they were
> > sent a message from conserver that they did not have sufficient rights
> > to control power on that device.
> >
> > Being able to control power from console is an amazing benefit. I've
> > used it many times to rescue systems in trouble.
> >
> >
> >
>
> _______________________________________________
> users mailing list
> users@conserver.com
> https://www.conserver.com/mailman/listinfo/users
>
> _______________________________________________
> users mailing list
> users@conserver.com
> https://www.conserver.com/mailman/listinfo/users
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: [PATCH] Power control [ In reply to ]
On Fri, 2007-06-29 at 22:24 -0700, Brian Matheson wrote:
> The apc7900 is reasonable at about $420us for 8 ports

That is a great price for intelligent power. Especially network or
serial.


_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users
Re: [PATCH] Power control [ In reply to ]
> Direct IPMI / iLO support in conserver would be a huge plus. About half
> of my consoles now are iLO VSPs glued together with expect scripts.

I'm using IPMI with conserver via a wrapper script that hides the
passwords (because users can apparently dump conserver.cf :) and
incorporates a few Black Magic Workaround Tricks (tm) to get the IPMI
connection working.

Here's a patch vs. 8.1.17, including the 'conserver-exec' script and its
config file, plus some packaging changes to better fit the
RedHat+kerberos5 environment over here. (The same script can also run
telnet or, with a little modification, anything else, but we don't have
iLO so no support for that at the moment.)

https://cern.ch/ahorvath/rpms/conserver/8.1.17/cern.6/conserver-8.1.17-cern.6.diff

Since we're also using IPMI for remote power control of nodes it would
be cool to see that integrated into conserver. (But we also have some
remote-controlled power bars, and other things, so a generic executable
hook would be best.)

Andras

ps. I'm actually writing up what we're doing and how and, if you guys
are interested, I can post the link once done.

--
Andras HORVATH
Systems engineer, CERN CF FPP
Tel: +41 22 767 4290 // Fax: +41 22 766 9154
_______________________________________________
users mailing list
users@conserver.com
https://www.conserver.com/mailman/listinfo/users