1834626 Members
3019 Online
110069 Solutions
New Discussion

cmclconfig-How to edit?

 
SOLVED
Go to solution
joe_91
Super Advisor

cmclconfig-How to edit?

Team:

I need to know how i could edit and make changes to /etc/cmcluster/cmclconfig file 'coz when i do a strings cmclconfig|more i see some lines commented out there? Please advise.

Cheers
Joe.
12 REPLIES 12
Charles McCary
Valued Contributor

Re: cmclconfig-How to edit?

Joe,
the cmclconfig file is a binary file created when you run the command cmapplyconf. You should check into the ramifications of running this command before doing so.

thanks,

c
John Poff
Honored Contributor

Re: cmclconfig-How to edit?

Hi Joe,

The cmclconfig file is the cluster binary file that gets created when you create or update your cluster with cmapplyconf. I don't think you can edit it.

What strings are you seeing that are commented out? Is your cluster configured like you want it and is it running ok? If so, I wouldn't worry too much about it.

JP
BFA6
Respected Contributor

Re: cmclconfig-How to edit?

Hi,

cmclconfig is the cluster binary file. I wouldn't advise trying to edit this.

Have alook at cmclconf.ascii - this is the ascii file with cluster configuration information in it.

regards,

Hilary
joe_91
Super Advisor

Re: cmclconfig-How to edit?

Team:
There are some lines commented out for /networks/ip/subnets/ip-address. What does that mean?

Thanks
Joe.
Charles McCary
Valued Contributor

Re: cmclconfig-How to edit?

Joe,

could mean that you're not monitoring a subnet for every package that you're running and this could be ok.

If you look in the .conf file for each package you will see the subnet monitoring info.

tx,

c
John Poff
Honored Contributor

Re: cmclconfig-How to edit?

Joe,

The cmclconfig file is a binary file, so viewing it with 'strings' may show you a '#' at the start of a line, but I wouldn't take that to mean that the line is commented out. The only real way to know the data in the file would be to know the layout of the file, and that is proprietary to HP. If your cluster runs good and is configured like you want it, I wouldn't worry about it.

Here is what I see for the same entries from my cmclconfig file:

/networks
/networks/ip
/networks/ip/subnets
/networks/ip/subnets/10.100.13.0
8\/networks/ip/subnets/10.100.13.0/ips
1/nodes/fduxdb03/networks/ip/address/10.100.13.30
1/nodes/fduxdb2r/networks/ip/address/10.100.13.24
/networks/ip/subnets/192.168.1.0
9l/networks/ip/subnets/192.168.1.0/ips
1/nodes/fduxdb03/networks/ip/address/192.168.1.57
1/nodes/fduxdb2r/networks/ip/address/192.168.1.50


The entries at the start of the lines are binary fields that the 'strings' program is trying to translate to ASCII so that it can show it. If you really want to see the cmclconfig file you might need a hex editor.

JP


Carsten Krege
Honored Contributor

Re: cmclconfig-How to edit?

To view the contents of the cmclconfig binary, use cmviewconf. To change the contents of the cmclconfig binary edit the cluster ascii file and run cmapplyconf.

Anything else is not supported, error prone and can lead to unpredictable results.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Elif Gius
Valued Contributor

Re: cmclconfig-How to edit?

Hi Joe,

cmclconfig ist the binary file which the cluster daemons is using. If you want to check how the actual settings looks, use either cmviewconf, cmgetconf or cmscancl.

Don't edit the binary file!!!
FOr changing the binary file, you have to edit the Control or Config-Files and then use cmcheckconf and after that cmapplyconf.

Bye
Elif
Stephen Doud
Honored Contributor
Solution

Re: cmclconfig-How to edit?

Hello Joe,

I did a strings on my cmclconfig file and saw a "#" in front of a line designating an IP. Not to worry though, since cmclconfig is a binary, ServiceGuard doesn't interpret the "#" as a comment.

The binary is created using cmapplyconf with the cluster configuration file and each package's configuration file. Example:

# cmapplyconf -C CONF -P ./pkg1/conf -P ./pkg2/conf ...

CONF = filename of cluster ASCII configuration file
conf = filename a package configuration file

If you wish to inspect the source files that were used to create the binary, use the following processes:

- Recreate a cluster configuration file using cmclconfig as the source:
# cmgetconf

- Recreate a package configuration file using cmclconfig as the source:
# cmgetconf -p

-s.
joe_91
Super Advisor

Re: cmclconfig-How to edit?

Hi Stephen:

I thonk i got the issue. We made a change to the service guard where we went from one package to two. When we have two packages on a single node cluster should we have cmclconfig for the both the packages? It seems we have created only one cmclconfig for both the packages. Is it wrong???Please Advise.

Thanks
Joe.
John Poff
Honored Contributor

Re: cmclconfig-How to edit?

Joe,

There is just one cmclconfig binary file per cluster, so no matter how many nodes you have or how many packages you have, you should still just have one cmclconfig file.

JP
P-XX34
Visitor

Re: cmclconfig-How to edit?


@John Poff wrote:
Joe,

There is just one cmclconfig binary file per cluster, so no matter how many nodes you have or how many packages you have, you should still just have one cmclconfig file.

JP

Hello friend, the best process are well describe on this web link on HP look at it.

HP Serviceguard Software - Procedure to Update Cluster When Changing LAN IP Addresses

 

For person who can find the link to access don't worry we have it at work test for at and of my private test.

But in this case the the "cmclconfig" in the repertory /etc/cmcluster/ (/etc/cmcluster/cmclconfig); in your case you will work in yhe repertory you let your "cmclconfig" file.

 

HP “Invent. The computer is personal again. Everybody On”

 

But knowledge is a power

 

------------------------------------------------------------------------------------------------------

THE COMPLETE PROCESS

------------------------------------------------------------------------------------------------------

 

HP Serviceguard Software - Procedure to Update Cluster When Changing LAN IP Addresses

 

Information

What is the procedure to update Serviceguard with new IP addresses?

 

Details

Serviceguard identifies IP addresses in the cluster configuration ASCII file, possibly one or more package configuration ASCII files and each legacy package control scripts where a relocatable IP is assigned. The cluster binary file distributed to all nodes is loaded with IP addresses identified in the configuration files when cmapplyconf completes successfully.

The cluster configuration file references fixed IPs, and the package configuration file references relocatable IPs that may be co-assigned to the same NICs as the fixed IPs. When changing an IP or set of IPs, determine which configuration file(s) must be updated and applied using cmapplyconf . Package control script modifications do not require cmapplyconf .

Note that cmapplyconf will validate the assignment of the new IPs to a NIC on each node, so it must be assigned to a NIC before cmapplyconf will succeed.

Every IP address defined in the cluster ASCII file that was used to create and distribute the cluster binary file (via cmapplyconf ) is stored in the cluster binary file (/etc/cmcluster/cmclconfig). It is necessary to update the cluster binary when its IP addresses are changed.

When a cluster is created, each subnet has at least one fixed IP assigned to each node. Example content of a cluster configuration file:

 

NODE_NAME      eon   NETWORK_INTERFACE lan0     HEARTBEAT_IP    16.113.9.254 ---snipped---

NODE_NAME      ion   NETWORK_INTERFACE lan0     HEARTBEAT_IP    16.113.9.255

 

In this case, subnet 16.113.0.0 has an IP representative on eon (16.113.9.254 ) and a representative on ion (16.113.9.255 ). This document refers to this relationship as an IP set (*).

Changing IP addresses on a LAN NIC on the fly can interrupt transmission.

Although Serviceguard A.11.18-A.11.20 permits online IP reconfiguration, it is necessary to halt the cluster and perform IP changes for older versions of Serviceguard.

Unless the cluster operates as a cross-subnet cluster, changing one subnet/IP usually means changing the IP set*. Therefore, when changing IPs, expect to edit each node section in the cluster configuration ASCII file.

Also, changing a fixed IP may also require a change to a relocatable IP. Any package that relies on a relocatable IP related to a changed fixed IP must be updated with the new relocatable IP after the package is halted.

 

Updating a single subset of IPs across nodes:

Beginning with Serviceguard version A.11.19, it is possible to update an IP set while the cluster is running. (See limitations identified in the "Managing Serviceguard" manual.) Edit the cluster ASCII configuration file with the changes and perform cmapplyconf on the file. Note that any package that has a dependency on the IP/subnet must be modified at the same time, and the package cannot be running when the cmapplyconf is performed.

Beginning with Serviceguard version A.11.18, it is possible to remove an IP set (via editing the cluster ASCII file, and then cmapplyconf) and subsequently add an updated IP set while the cluster is running, assuming related relocatable IPs are not in use (packages are halted).

Earlier versions of Serviceguard require the cluster be halted if the cluster binary will be modified as a result of the change. The process requires 2 cmapplyconf commands. The first to remove the OLD NIC/IP set, and the 2nd to re-add the NETWORK_INTERFACE with its new IP.

If using a Serviceguard version earlier than A.11.18, determine whether downtime is necessary by using the following sort of command:

 

# cmviewconf | grep 10.X.X.17 (OLD IP)         ip address:                     10.X.X.17

 

If the ip address: line appears, then the IP is embedded in the cluster binary, requiring the cluster binary be updated with the new IP. If the subnet changes along with the IP, packages configuration files and control scripts that use that subnet must be updated as well.

Before proceeding, ensure /etc/cmcluster/cmclnodelist exists on each node, and lists every node in the cluster, much like a .rhosts file. Example:

 

nodeA   root nodeB   root

 

  1. Edit the cluster configuration file replacing the old IP with the new IP.

 

   # cd /etc/cmcluster    # cmgetconf CLUSTER

 

  1. Edit the file, locate the lines containing the old IP(s) and update the IPs.

The lines will look something like this:

 

   NODE1      NETWORK_INTERFACE    lan0

       HEARTBEAT_IP        10.X.X.17

     NETWORK_INTERFACE    lan1

     NETWORK_INTERFACE    lan2

       HEARTBEAT_IP        192.X.X.1  

 

Do the same for the other node's section.

 

  1. If the subnet for that LAN adapter changed, it is necessary to determine if package-related subnet parameters must be updated as well.

 

# cmviewconf | grep -e "package name" -e "package subnet"       package name:                     clk       package subnet:                   10.X.X.0  <--- HERE    A.11.20: cmviewconf no longer exists.     Use 'cmviewcl -v -f line | grep package | grep subnet' to identify whether    packages have a dependency on subnets.  If the subnet will be modified, locate the package configuration file that   references the subnet.  In /etc/cmcluster:   # grep 10.X.X.0 */*   PKG_1/pkg.config:SUBNET                  10.X.X.0   PKG_1/pkg.ctrl:SUBNET[0]="10.X.X.0"  

 

In the above case, only one package was affected and its files will have to be updated to reflect the new subnet. It may also require replacing old relocatable IPs with new ones and registering them on the name server.

 

  1. After updating the affected files, apply the updates to the cluster binary:

 

# cmapplyconf -C CONF [ -P  ]

 

When completed successfully, start the new cluster:

 

# cmruncl

 

Finally, test the package startup and shutdown on each server to be confident the change was performed properly.

 

Procedure to update multiple/all IP addresses in a cluster:

On one node:

 

  1. Use cmgetconf to create an up-to-date cluster configuration ASCII file and package configuration ASCII files.

 

  1. Verify the current configuration is viable:

 

# cmcheckconf -C -P -P ...

 

  1. Halt the cluster: cmhaltcl

 

  1. In the event that a new cluster must be built, decluster any VG used by the cluster:

 

# vgchange -c n (repeat for each clustered VG).

 

On each cluster node:

 

  1. Update /etc/cmcluster/cmclnodelist to identify each node.

 

  1. Edit /etc/rc.config.d/cmcluster , set AUTOSTART_CMCLD=0

 

  1. mv /etc/cmcluster/cmclconfig /etc/cmcluster/cmclconfig.old

 

  1. Update /etc/rc.config.d/netconf with the new IP/subnet mask for each NIC that will change.

 

  1. Edit/update /etc/hosts with the new IP addresses.

 

On one node:

 

  1. Edit/update the cluster ASCII file with the new IP addresses assigned to each node.

 

  1. Edit/update any package configuration file that identifies a relocatable IP or SUBNET value with new values.

 

  1. Edit/update any package control script (legacy format) that identifies an old relocatable IP/SUBNET value with new values.

 

  1. Reboot both systems.

 

On one node:

 

  1. cmapplyconf the cluster and package configuration ASCII files (using the custom command/script).

 

  1. Start the cluster: cmruncl

On each cluster node:

  1. Edit /etc/rc.config.d/cmcluster , set AUTOSTART_CMCLD=1 .

 

Changing a relocatable IP:

Altering a relocatable IP is a simple process but an IP must be selected that matches the new subnet of the LAN card it will be configured on.

 

Find and edit the legacy package control script or modular package configuration file under /etc/cmcluster that references the old relocatable IP.

 

An easy way to locate the script is to "grep" the last few digits of the IP in all files beneath /etc/cmcluster . Use cmviewcl -v -f line | grep to identify the package to update.

 

With the package down (cmhaltpkg ), edit the file with the replacement IP. When saved, copy this script to the other servers which also operate the package when necessary.

 

 

NOTE:

Online alteration of the relocatable IP is not advisable. Also, the relocatable IP must be propagated to the name server, whether /etc/hosts on each server, or DNS.

Again, test the package startup and shutdown on each server to be confident the change was performed properly.