Bug 78667 - RHCM bug fixes related to APCMasterSwitch and redundant power supplies
Summary: RHCM bug fixes related to APCMasterSwitch and redundant power supplies
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: clumanager
Version: 2.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Lon Hohberger
QA Contact:
Depends On:
Blocks: 87937
TreeView+ depends on / blocked
Reported: 2002-11-27 14:25 UTC by Tom "spot" Callaway
Modified: 2007-11-30 22:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2003-12-10 20:47:29 UTC
Target Upstream Version:

Attachments (Terms of Use)
patch (4.53 KB, patch)
2002-11-27 14:26 UTC, Tom "spot" Callaway
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2003:330 0 normal SHIPPED_LIVE New clumanager package fixes various bugs 2003-12-19 05:00:00 UTC

Description Tom "spot" Callaway 2002-11-27 14:25:39 UTC
Attached to this bugzilla is a patch:

* it modifies apcmaster so that it is possible to control an outlet
  with a non administrative user;
* it modifies apcmaster to allow "ALL Accessible Outlets" as a
  port switch name;
* it modifies cluconfig to allow spaces within port switch names;
* it modifies power_stonith to use portSwitchName and not
  node name during a reset.

With this patchset, it is possible to configure an APC MasterSwitch
to reset a redundant power supply in the following mode:

1) create two Outlet User on APC Master Switch (User_1 and User_2)
2) Give to User_1 the acces just the outlets connected to Node_1 (say
   Outlet 1 and Outlet 2)
3) Give to User_2 the acces just the outlets connected to Node_2 (say
   Outlet 5 and Outlet 6)
4) Rename Outlet 1 and 2 to the name of Node_1
5) Rename Outlet 5 and 6 to the name of Node_2 (this steps are required
   since clupowerd still uses node name to check if the power switch
  can reset a node).
6) Add to file /etc/hosts two aliases for the IP address of the APC MasterSwitch
   (Switch_1 and Switch_2). This is neede since cluconfig doesn't accept
   two definition for a power swithc with the same IP but different user.
7) In cluconfig specify Switch_1, User_1 and ALL Accessible Outlets as
   IP address of the power switch, login name for the power switch and
  name of the outlet that power cycles member Node_1
8) In cluconfig specify Switch_2, User_2 and ALL Accessible Outlets as
   IP address of the power switch, login name for the power switch and
  name of the outlet that power cycles member Node_2 (this step may give an
  error in cluconfig, you may need to edit /etc/cluster.conf and rerun cluconfig).

After this, cluster manager should be able to reset the other node (I tested it
by killing cluquorumd).

All the credit for this patch should go to Marco Lusini <m.lusini@palazzochigi.it>.

Comment 1 Tom "spot" Callaway 2002-11-27 14:26:19 UTC
Created attachment 86704 [details]

Comment 2 Tom "spot" Callaway 2002-11-27 14:26:59 UTC
whoops. wrong component. sorry.

Comment 3 Lon Hohberger 2002-12-02 15:44:08 UTC
Patch looks clean.

Comment 4 Lon Hohberger 2002-12-16 22:03:09 UTC
The setup requirements of this patch are kind of strange: use of this patch
requires multiple host name aliases for the power switch.  I'm going to evaluate
the possibility of cleanly having multiple user accounts supported (ie, what
user controls what port) as a feature enhancement, but not right away.

For now, I'm going to leave this on the enhancement list.

Comment 5 Marco Lusini 2003-01-23 16:01:47 UTC
Please note that my patches mostly fixes a couple of bugs in Cluster manager.
A side effect of this is the ability to use the admittedly strange 
configuration proposed.
With an APC master it should be possible to use any user to control the PS, but 
your version only works with administrative users (and it is not documented): 
my patch allows any user to control his outlets.
The ability to use "ALL Accessible Outlets" as a port switch name is a side 
effect of a bug fix in NametoOutlet which assumes that socketname is at least 
23 chars, blank padded, while it is not necessary (this looks like a 
cut'n'paste from WTI NPS code). The changes in cluconfig also allows for a 
blank space in port names, which is not explicitly prohibited.

If you think that my fixes are correct, you could just include them and don't
say anything on the double alias trick until you manage to properly support 
multiple users.

Comment 6 Lon Hohberger 2003-01-27 15:32:25 UTC
There is currently a pending erratum addressing more critical issues; I'll try
to get it into the next one.

I'll test it to ensure that the change to power_stonith.c doesn't break other
power controller drivers (it shouldn't).

For the next major release, I believe the current intent is to fix the STONITH
module(s)/config. utility so that no extra trickery with /etc/hosts is required
for proper operation...  IE, multiple port names on a single controller can be
associated with multiple host names.

Comment 7 Lon Hohberger 2003-04-15 20:35:19 UTC
Patch applied to pool.  Waiting for next erratum.

Comment 8 Lon Hohberger 2003-08-18 21:55:36 UTC
*** Bug 102447 has been marked as a duplicate of this bug. ***

Comment 13 Suzanne Hillman 2003-10-09 13:28:59 UTC
Adding to U3 blocker bug list.

Note You need to log in before you can comment on or make changes to this bug.