HP-UX Containers (SRP) A.03.00 Administrator's Guide
64
Serviceguard access the container. You must prepend the srp_su command to the command that
requires execution within a container.
In the following example, the representative Serviceguard package was modified to control
myContainer, a package executing in the container. The service_cmd value is the only value
that changed in the script:
Before:
service_name service_ping
service_cmd "/usr/sbin/ping node_a"
service_restart unlimited
service_fail_fast_enabled no
service_halt_timeout 300
After:
service_name service_ping
service_cmd "/opt/hpsrp/bin/srp_su myContainer root –c
‘/usr/sbin/ping node_a’"
service_restart unlimited
service_fail_fast_enabled no
service_halt_timeout 300
Either HP-UX Containers or Serviceguard can manage the network interfaces. If Serviceguard is
managing the network interfaces, HP recommends that the package is configured to create the default
route for any container IP address. In the following example, the representative Serviceguard
package was modified to add a default route, external_script:
Before:
# SG ip address
ip_subnet 192.10.25.0
ip_address 192.10.25.12
After:
# SG ip address
ip_subnet 192.10.25.0
ip_address 192.10.25.12
# srp_route_script configures the required source based routing entries for
# the SG managed IP addresses
external_script /etc/cmcluster/pkg1/srp_route_script
See Appendix A: Container default route script for Serviceguard for an example of the
srp_route_script script.
13.4 Creating Serviceguard scripts for the container package model
The container package model manages the container as a Serviceguard package. At package start
time, Serviceguard launches the package, which starts the container and relies on the container
initialization process to mount any application specific file systems and start the applications.
Similarly, at stop time, the package initiates the container stop request, relying on HP-UX Containers
to perform any application shutdown and file system unmounting.
Monitoring of the package is accomplished using the same method as described for the classic
model.
With workload containers, the container package model allows you to share the entire container
home directory between primary and secondary containers. If you choose to share a common home