kmddd59 / powerman

Automatically exported from code.google.com/p/powerman
GNU General Public License v2.0
0 stars 0 forks source link

configuration syntax issue #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have the following setup with
# rpm -q powerman
powerman-2.3.5-1.fc14.x86_64

and the config in /etc/powerman/powerman.conf

---
# cat /etc/powerman/powerman.conf | grep -v ^#

tcpwrappers yes

include "/etc/powerman/ipmipower.dev"

device "dl585ipmi" "ipmipower" "/usr/sbin/ipmipower -h mp-cn[5-120] |&"

node "cn[5-120]" "dl585ipmi" "mp-cn[5-120]"

---

But powerman commands seem to be off somewhere:

---
[root@util01 ~]# pm -q
on:
off:
unknown: cn[5-120]

[root@util01 ~]# pm -q cn6
on:
off:
unknown: cn6

[root@util01 ~]# pm -0 cn6
Command completed successfully
[root@util01 ~]# ipmipower -h mp-cn6 -s
mp-cn6: on
[root@util01 ~]# ipmipower -h mp-cn6 -f
mp-cn6: ok
[root@util01 ~]# ipmipower -h mp-cn6 -s
mp-cn6: off

It feels like a syntax thing, but I can't seem to put my finger on it.  Any
ideas?  Is the ipmipower command spawned in powerman.conf reading
/etc/freeipmi.conf when operating?

Thanks,
-cdm

Original issue reported on code.google.com by cdmaes...@gmail.com on 7 Dec 2010 at 11:22

GoogleCodeExporter commented 8 years ago
Hi- you might try running pm with the -T option and view the conversation 
between powerman and ipmipower to see if anything looks amiss...

Original comment by garlick....@gmail.com on 9 Dec 2010 at 3:26

GoogleCodeExporter commented 8 years ago
it does seem to be the case that the ipmipower command spawned in powerman is 
not reading the variables from /etc/freeipmi.conf ...
---
# pm -T cn2 -q
send(dl980ipmi): 'stat\n'
recv(dl980ipmi): 'mp-cn1: username invalid\n'
recv(dl980ipmi): 'mp-cn2: username invalid\n'
recv(dl980ipmi): 'mp-cn3: username invalid\n'
recv(dl980ipmi): 'mp-cn4: username invalid\n'
recv(dl980ipmi): 'ipmipower> '
on:      
off:     
unknown: cn2
---

So after adding -u USERNAME to the ipmipower command things seem to query (not 
not reading the correct state).  I now get:
---
# pm -T -q cn1
send(dl980ipmi): 'stat\n'
recv(dl980ipmi): 'mp-cn1: authentication type unavailable for attempted 
privilege level\n'
recv(dl980ipmi): 'mp-cn2: authentication type unavailable for attempted 
privilege level\n'
recv(dl980ipmi): 'mp-cn4: authentication type unavailable for attempted 
privilege level\n'
recv(dl980ipmi): 'mp-cn3: authentication type unavailable for attempted 
privilege level\n'
---

When I run the ipmipower command (which reads the variables I set in 
freeipmi.conf) it runs the command successfully.

If I ensure the ipmipower command spawns all the options in 
/etc/powerman/powerman.conf .. powerman commands work correctly.  It does feel 
like there's a disconnect between the ipmipower command powerman spawns and it 
reading /etc/freeipmi.conf ....

Original comment by cdmaes...@gmail.com on 10 Dec 2010 at 5:34

GoogleCodeExporter commented 8 years ago
By chance is powermand running as daemon or some non-root uid, and so can't 
read your freeipmi.conf?

Original comment by garlick....@gmail.com on 11 Dec 2010 at 12:37

GoogleCodeExporter commented 8 years ago
that was it!  I'm pretty sure I just run rpmbuilt -tb powermansource.tar.XX and 
then installed it.  I did the same with the freeipmi distribution.  I don't 
know what the correct solution is there, but seems like a good FAQ entry for 
sure.

Original comment by cdmaes...@gmail.com on 11 Dec 2010 at 3:29

GoogleCodeExporter commented 8 years ago
Closing bug report as this is more of a configuration issue than a bug.

Original comment by garlick....@gmail.com on 25 Feb 2011 at 6:06