- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Package interdependencies
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 09:06 AM
08-26-2004 09:06 AM
Package interdependencies
I remember someone mentioning this in the SG level 1 class I attended, but we didn't cover how to do it.
Any/all assistance would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 09:18 AM
08-26-2004 09:18 AM
Re: Package interdependencies
here is one version
Define the SERVICE_CMD in both the packages.
In PKG1
SERVICE_CMD=/etc/cmcluster/bin/monitor.sh pkg1/pkg1.conf
in PKG2
SERVICE_CMD=/etc/cmcluster/bin/monitor.sh pkg2/pkg2.conf
The monitor.sh loads the configuraion file for each of the packages from their directories (pkg1.conf and pkg2.conf).
In the pkg1.conf file, define the processes started by PKG1 AND PKG2.
In the pkg2.conf file define the processes started by PKG1 AND PKG2.
the monitor.sh should be written to be in a loop checking for the processes defined in the pkg1.conf and pkg2.conf files.
If any of the processes defined in the pkg1.conf or pkg2.conf fails then the script should exit with an error code of 1.
When the script that is defined as the SERVICE_CMD fails with the exit code of 1, the package manager automatically halt the package.
sounds good ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 10:39 AM
08-26-2004 10:39 AM
Re: Package interdependencies
Another possible way to do this would be to make both packages depend upon the same EMS resource.
Chapter 6 of the "Managing Serviceguard Version A.11.16" manual, found here:
http://docs.hp.com/hpux/onlinedocs/B3936-90079/B3936-90079.html
contains a section called "Creating the Package Configuration". It talks about the configuration script used by the packages and how to specify Monitored Resources, that when become unavailable will cause a package to fail/migrate.
There is also a section called "Writing the Package Control Script" that talks about the "Customer Defined Functions" section of the scripts. You can use this customer defined section to control other packages in the cluster. The manual also has a section that details things to watch out for when you attempt to control one package from inside another package:
__________________________________
Adding Serviceguard Commands in Customer Defined Functions
You can add Serviceguard commands (such as cmmodpkg) in the Customer Defined Functions section of a package control script. However, these commands must not interact with the package itself. Additionally, if a Serviceguard command interacts with another package, then you need to check all packages with Serviceguard commands for the possibility of a command loop.
For instance, a command loop might occur under the following circumstances. Suppose Pkg1 does a cmmodpkg -d of Pkg2, and Pkg2 does a cmmodpkg -d of Pkg1. If both Pkg1 and Pkg2 start at the same time, Pkg1 tries to cmmodpkg Pkg2. However, that cmmodpkg command has to wait for Pkg2 startup to complete. Pkg2 tries to cmmodpkg Pkg1, but Pkg2 has to wait for Pkg1 startup to complete, thereby causing a command loop.
To avoid this situation, it is a good idea to always specify a RUN_SCRIPT_TIMEOUT and a HALT_SCRIPT_TIMEOUT for all packages, especially packages that use Serviceguard commands in their control scripts. If a timeout is not specified and your configuration has a command loop as described above, inconsistent results can occur, including a hung cluster.
______________________________________
Hope this gives you some ideas of how to do this.
Regards,
Dave
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 05:20 PM
08-26-2004 05:20 PM
Re: Package interdependencies
I wouldn't use EMS resources to define package dependencies. pkgmond resources are obtained through querying an SNMP MIB and SNMP uses the UDP protocol. I don't think it is a good idea to make your HA package dependent on the retrieval of a UDP message.
Defining a service script that executes "cmviewcl -p
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2004 11:46 PM
08-26-2004 11:46 PM
Re: Package interdependencies
I do this via the customer_defined_run_commands
For development:
customer_defined_run_commands includes this:
CURRENT_PROD_NODE=$(${CMVIEWCL} | ${GREP}
${ECHO} "Current
CURRENT_HOST=$(${HOSTNAME})
${ECHO} "Current HOST is ${CURRENT_HOST}"
if [ "${CURRENT_PROD_NODE}" = "${CURRENT_HOST}" ]
then
${ECHO} "Cannot start package
${ECHO} "already running on this host"
${SLEEP} 10
$? = 1
test_return 8
fi
For production package:
customer_defined_run_commands includes:
CURRENT_DEV_NODE=$(${CMVIEWCL} | ${GREP}
${ECHO} "Current
CURRENT_HOST=$(${HOSTNAME})
${ECHO} "Current HOST is ${CURRENT_HOST}"
if [ "${CURRENT_DEV_NODE}" = "${CURRENT_HOST}" ]
then
${ECHO}
${ECHO} "Shutting down
${ECHO}
${CMHALTPKG}
${SLEEP} 10
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2004 12:02 AM
08-27-2004 12:02 AM
Re: Package interdependencies
Best regards,
Kent M. Ostby