DRD-Safe Concepts for HP-UX 11i v2 and Later
• if [[ $SW_SESSION_IS_UPDATE -ne 1 && $SW_SESSION_IS_DRD -ne 1 ]]
then
vxdctl stop >/dev/null 2>&1
fi
• kill_named_procs wlmcomd SIGTERM > /dev/null 2>&1
4.2 Commands that Communicate with Other Processes
Look for commands that communicate with other process—for example, communications through
sockets, RPC calls, or named pipes.
Unsafe Examples:
• vxdg bootdg
The vxdg command attempts to contact the vxconfigd daemon, which was
started on the booted system.
Suggested Resolutions:
Follow the steps below to make the logic DRD-safe:
1. First, determine if the communication is DRD-safe (or not):
a. If the communication occurs with a process started within the runcmd environment,
the communication is DRD-safe and no action is needed. A process has been started
within the runcmd environment if the environment variable SW_SESSION_IS_DRD is
set to 1 inside that process.
b. If the communication occurs with a process on a different system (that is, remote
communication), the communication is DRD-safe and no action is needed. Remote
communication is considered safe because the information obtained from a remote
system is unlikely to differ based on whether it was obtained on behalf of the booted
system image or the inactive system image.
c. If the communication occurs with a process started outside of the runcmd
environment, the communication may not be DRD-safe. Whether or not the
communication is DRD-safe depends on the results of the communication. For
example, if the communication is just to establish if a process is currently running, the
result is DRD-safe. If the communication is to retrieve information from the running
process and that information is not relevant to the inactive system image, the result is
not DRD-safe. The owner of the logic must examine the information returned and
how it is used to determine if the result will adversely affect the inactive system
image. While making this examination, it is important to remember that the inactive
system image could have an entirely different software configuration than the booted
system image. If the logic is not safe, it may be necessary to detect that this is a
runcmd environment (that is, SW_SESSION_IS_DRD=1), and modify the logic to
retrieve the information from the inactive system image instead of the running system
image.
2. If the logic is unsafe, use the SW_SESSION_IS_DRD environment variable to determine that
the command is executing in a runcmd environment and either skip the unsafe logic or re-
write the logic in a safe manner. For example, a command may have a “DRD mode” that
can be activated by a command-line option. In this case, the unsafe logic could be modified
to detect the runcmd environment and add the “DRD mode” option to the command line, thus
making the execution of the command DRD-safe.