OpenSolaris

Printable Version Enter a New Search
Bug ID 6662001
Synopsis sczbt fails to configure HA IP address in zone in "de" (and maybe other) locale
State 10-Fix Delivered (Fix available in build)
Category:Subcategory suncluster:ha-zones
Keywords opensolaris
Responsible Engineer Thorsten Frueauf
Reported Against snv_01
Duplicate Of
Introduced In
Commit to Fix 3.2u2_03
Fixed In 3.2u2_03
Release Fixed 3.2u2_fcs(3.2u2_03) , osc(osc_20) (Bug ID:2161466) 3.2_patch(Bug ID:2161503,)
Related Bugs
Submit Date 12-February-2008
Last Update Date 9-April-2008
Description
Category
   suncluster
Sub-Category
   ha-zones
Description
   With system locale set to "de" a zone IP address configured as a SUNW.logicalhostname resource fails to be moved to the zone.
Frequency
   Always
Regression
   No
Steps to Reproduce
   (1) set system wide locale to "de". Edit /etc/default/init, change
      LC_MESSAGES=de
(2) reboot (to make /etc/default/init changes permanent)
(3) create a SUNW.logicalhostname resource:
      clrslh create -g XXX-rg -h ZONEIP XXX-ip
(4) create a configuration file for zone registration:
      [...]
      SC_NETWORK=true
      SC_LH=XXX-ip
      [...]
(5) register zone in Cluster
      /opt/SUNWsczone/sczbt/util/sczbt_register -f <configuration file>
(6) additional cluster zone configuration
(7) bring rg online
      clrg online -M XXX-rg
(8) log into zone. Inspect IP configuration with ifconfig. zone IP address
    still part of global zone
Expected Result
   IP address of SUNW.logicalhostname resource should be configured into the
zone (via ifconfig <interface> <ip-address> zone <zonename>)
ifconfig -a
[...]
nge0:2 flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2
        zone ZONENAME
        inet A.B.C.D netmask XXXXXXXX broadcast A.B.C.D
Actual Result
   IP address not configured into zone but still in global zone
ifconfig -a
[...]
nge0:2 flags=1040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4> mtu 1500 index 2
        inet A.B.C.D netmask XXXXXXXX broadcast A.B.C.D
ifconfig -a in zone only shows loopback interface:
lo0:1 flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
Error Message(s)
   N/A
Test Case
   Problem is in /opt/SUNWsczone/sczbt/bin/functions
The output of scstat is different depending on locale:
# env LC_ALL=de scstat -i -h sx1scl01p 
-- IPMP-Gruppen --
              Knotenname          Gruppe  Status         Adapter   Status
              ----------          ------  ------         -------   ------
  IPMP-Gruppe: sx1scl01p           sc_ipmp0 Online         nge0      Online
# env LC_ALL=C scstat -i -h sx1scl01p
-- IPMP Groups --
              Node Name           Group   Status         Adapter   Status
              ---------           -----   ------         -------   ------
  IPMP Group: sx1scl01p           sc_ipmp0 Online         nge0      Online
notice the missing dash in the "C" locale. The remaining arguments get numbered differently.
/opt/SUNWsczone/sczbt/bin/functions uses relative addressing to locate the adapter name (function get_ipmp_state):
       ADAPTER_LIST=`${SCSTAT} -i -h ${LOCALNODENAME} | grep " ${IPMP_GROUP} " | \
               grep Online | awk '{print $6}'`
with "de" locale the right parameter will be $5!
Workaround
   (1) set LC_MESSAGES to POSIX locale
(2) correct /opt/SUNWsczone/sczbt/bin.
    Two possible fixes:
    (a) use relative addressing for awk (second last parameter)
        LOCALNODENAME=`${SCHA_CLUSTER_GET} -O NODENAME_LOCAL`
 
-       ADAPTER_LIST=`${SCSTAT} -i -h ${LOCALNODENAME} | grep " ${IPMP_GROUP} " | \
-               grep Online | awk '{print $6}'`
+       ADAPTER_LIST=`${SCSTAT} -i -h ${LOCALNODENAME} | \
+               awk "/ ${IPMP_GROUP} / && /Online/ { print \$(NF-1) }"`
 
         debug_message "Function: get_ipmp_state - End"
 }
        instead of "awk '{print $6}'" we use "awk '{print $(NF-1) }'"
        (second last argument)
    (b) set LC_ALL=C before calling scstat:
 
        LOCALNODENAME=`${SCHA_CLUSTER_GET} -O NODENAME_LOCAL`
 
-       ADAPTER_LIST=`${SCSTAT} -i -h ${LOCALNODENAME} | grep " ${IPMP_GROUP} " | \
+       ADAPTER_LIST=`LC_ALL=C ${SCSTAT} -i -h ${LOCALNODENAME} | grep " ${IPMP_GROUP} " | \
                grep Online | awk '{print $6}'`
 
         debug_message "Function: get_ipmp_state - End"
(3) Change message file so POSIX and de locale have the same output.
Submitter wants to work on bug
   No
Additional configuration information
   Sun Cluster 3.2 for Solaris 10 i386
SUNWscu:       3.2.0,REV=2006.12.05.21.06, 125512-02
SUNWsccomu:    3.2.0,REV=2006.12.05.21.06, 125512-02 126107-03
SUNWsczr:      3.2.0,REV=2006.12.05.21.06, 125512-02
SUNWsccomzu:   3.2.0,REV=2006.12.05.21.06, 125512-02 126107-03
SUNWsczu:      3.2.0,REV=2006.12.05.21.06, 125512-02 126107-03
SUNWscsckr:    3.2.0,REV=2006.12.05.21.06
SUNWscscku:    3.2.0,REV=2006.12.05.21.06
SUNWscr:       3.2.0,REV=2006.12.05.21.06, 125512-02 126107-03
SUNWscrtlh:    3.2.0,REV=2006.12.05.21.06
SUNWscnmr:     3.2.0,REV=2006.12.05.21.06
SUNWscnmu:     3.2.0,REV=2006.12.05.21.06
SUNWscdev:     3.2.0,REV=2006.12.05.21.06, 125512-02
SUNWscgds:     3.2.0,REV=2006.12.05.21.06
SUNWscsmf:     3.2.0,REV=2006.12.05.21.06
SUNWscvm:      3.2.0,REV=2006.12.05.21.06
SUNWscman:     3.2.0,REV=2006.09.26.13.45
SUNWscsal:     3.2.0,REV=2006.12.05.21.06
SUNWscsam:     3.2.0,REV=2006.12.05.21.06
SUNWmdmr:      3.2.0,REV=2006.12.05.21.06
SUNWmdmu:      3.2.0,REV=2006.12.05.21.06, 125515-01
SUNWscmasa:    3.2.0,REV=2006.12.05.21.06
SUNWscmasar:   3.2.0,REV=2006.12.05.21.06
SUNWscmasasen: 3.2.0,REV=2006.12.05.21.06
SUNWscmasau:   3.2.0,REV=2006.12.05.21.06, 125512-02 126107-03
SUNWscmautil:  3.2.0,REV=2006.12.05.21.06
SUNWscmautilr: 3.2.0,REV=2006.12.05.21.06
SUNWjfreechart: 3.2.0,REV=2006.12.05.21.06
SUNWscspmr:    3.2.0,REV=2006.12.05.21.06
SUNWscspmu:    3.2.0,REV=2006.12.05.21.06, 125509-03
SUNWscderby:   3.2.0,REV=2006.12.05.21.06
SUNWsctelemetry: 3.2.0,REV=2006.12.05.21.06, 125512-02
SUNWdsc:       3.2.0,REV=2006.10.26.13.10, 126096-01
SUNWdscspmu:   3.2.0,REV=2006.10.26.13.10, 126096-01
SUNWscims:     6.1,REV=2004.04.28
SUNWsczone:    3.2.0,REV=2006.12.06.18.33
Work Around
N/A
Comments
N/A