Operating System - HP-UX
1834935 Members
2490 Online
110071 Solutions
New Discussion

Re: difference between autorun and switching

 
deepantest
New Member

difference between autorun and switching

Hi

 

What is the difference between executing

cmmodpkg -e pkgname and cmmodpkg -e -n nodename pkgname

 

cmmodpkg -d pkgname and cmmodpkg -d -n nodename pkgname

 

regards

 

Deepan

4 REPLIES 4
rariasn
Honored Contributor

Re: difference between autorun and switching

Hi:

 

           -e        Enables package switching.  This may cause a currently down package to be started on a running node (according to its failover policy).  If the -n option is given, package switching will be enabled only for the specified node(s); otherwise, switching will be enabled globally.  This will not cause the package to move if the package is currently running elsewhere.

           -d        Disables package switching.  This will not cause a package to be halted, but it will keep the package from  being switched to a new node should the current node fail.  If the -n option is given, package switching  will be disabled only for the specified node(s); otherwise, switching will be disabled globally.

 

man cmmodpkg

 

rgs

deepantest
New Member

Re: difference between autorun and switching

when i give cmviewcl -v -p pkgname i can see node switching parameter.

 

both node switching parameter and autorun are same

rariasn
Honored Contributor

Re: difference between autorun and switching

Hi:

 

No.

 

AUTO_RUN. Possible values are YES and NO.


# The default for AUTO_RUN is YES. When the cluster is started the
# package will be automatically started. In the event of a failure the
# package will be started on an adoptive node. Adjust as necessary.

 

Enabled simply means that switching is allowed for that package on   that node.  Disabled means that switching is not allowed for that  package on that node.

 

Sample cmviewcl -v -p pkg_TEST "output":

 

  PACKAGE      STATUS       STATE        AUTO_RUN     NODE
    pkg_TEST    up           running      disabled     node1

      Policy_Parameters:
      POLICY_NAME     CONFIGURED_VALUE
      Failover        configured_node
      Failback        manual

      Script_Parameters:
      ITEM       STATUS   MAX_RESTARTS  RESTARTS   NAME
      Subnet     up                                172.17.0.0

      Node_Switching_Parameters:
      NODE_TYPE    STATUS       SWITCHING    NAME
      Primary      up           enabled      node1 (current)
      Alternate    up           enabled      node2

 

rgs,

 

 

Rgs

Matti_Kurkela
Honored Contributor

Re: difference between autorun and switching

AUTO_RUN has two meanings:

  • in the package configuration ASCII file, it determines whether the package will auto-start when the cluster is started using the cmruncl command, or not.
  • as an attribute that can be seen with "cmviewcl" and modified with "cmmodpkg -e <package>", it determines whether the package will automatically failover when there is trouble, or not.

When you halt a package with the cmhaltpkg command, Serviceguard will automatically disable AUTO_RUN. When you start the package again, you must use "cmmodpkg -e" to re-enable AUTO_RUN. Currently supported version of Serviceguard will remind you of this when you run the cmhaltpkg command.

 

"Switching" is a per-node setting. It determines whether the package is allowed to start on a particular node or not. Normally it is enabled on all nodes the package has been configured to be runnable on, but if Serviceguard tries to failover the package and fails to start it on some node, it will disable "switching" for that particular node for that package.

 

For Serviceguard, the disabled "switching" bit means "I already tried this package on this node once and it failed; I won't try again on this node until the sysadmin tells me the problem is fixed." It prevents Serviceguard from getting stuck into trying to move the package endlessly back and forth, when a package is not startable because of e.g. a configuration error.

 

To re-enable switching for a particular node, the command is "cmmodpkg -e -n <node> <package>". Yes, this looks very similar to the cmmodpkg syntax for AUTO_RUN. But it is different, and Serviceguard administrators need to understand this difference.

MK