Novell Cluster Services 'pkill -fx' command in unload script errors out with killing GroupWise .
This document (7013218) is provided subject to the disclaimer at the end of this document.
Novell Open Enterprise Server 11 (OES 11) Linux Support Pack 1
Novell GroupWise 2012
The Cluster Services Unload script is configured as described in the GroupWise 2012 Interoperability guide.
Snippet of the sample Cluster resource unload script :
ignore_error pkill -fx "/opt/novell/groupwise/agents/bin/gwmta @/media/nss/volume_name/groupwise/agents/share/domain_name.mta"
ignore_error pkill -fx "/opt/novell/groupwise/agents/bin/gwpoa @/media/nss/volume_name/groupwise/agents/share/post_office_name.poa"
ignore_error pkill -fx "/opt/novell/groupwise/agents/bin/gwdva @/media/nss/volume_name/groupwise/agents/share/gwdva.dva"
When Off-lining or Migrating the cluster resource running Novell GroupWise, the 'pkill' command from the sample above, which supposedly terminates (SIGTERM) any daemon that does not gracefully shutdown, does not work well.
This is revealed by a closer inspection of the relevant snippet for the particular resource unload.out file as found in /var/opt/novell/log/ncs :
Thu Sep 5 16:20:59 CEST 2013
+ return 0
+ ignore_error pkill -fx '/opt/novell/groupwise/agents/bin/gwmta @/media/nss/VGWISE/groupwise/agents/share/oesdom1.mta'
+ eval pkill -fx /opt/novell/groupwise/agents/bin/gwmta @/media/nss/VGWISE/groupwise/agents/share/oesdom1.mta
++ pkill -fx /opt/novell/groupwise/agents/bin/gwmta @/media/nss/VGWISE/groupwise/agents/share/oesdom1.mta
Usage: pkill [-SIGNAL] [-fvx] [-n|-o] [-P PPIDLIST] [-g PGRPLIST] [-s SIDLIST]
[-u EUIDLIST] [-U UIDLIST] [-G GIDLIST] [-t TERMLIST] [PATTERN]
- The command line as specified above, was listed as valid in an earlier version of the GroupWise 2012 documentation.
- Initiating this command from a terminal windows using the cli works well.
Using 'pkill' used in conjunction with '-f' requires pkill to SIGTERM the exact pattern as specified.
Since the 'ignore_error' command from NCS strips the double quotes from the command line, 'pkill' the pattern does not look correct for pkill, and therefor the pkill command is not executed and errors out .
Example on how the GroupWise resource unload script should look :
ignore_error pkill -fx "'/opt/novell/groupwise/agents/bin/gwmta @/media/nss/volume_name/groupwise/agents/share/domain_name.mta'"
ignore_error pkill -fx "'/opt/novell/groupwise/agents/bin/gwpoa @/media/nss/volume_name/groupwise/agents/share/post_office_name.poa'"
ignore_error pkill -fx "'/opt/novell/groupwise/agents/bin/gwdva @/media/nss/volume_name/groupwise/agents/share/gwdva.dva'"
After escaping the lines in the resource unload script using both a double (") and a single (') quote, and re-testing the resource migration on the cluster again, the relevant snippet for the resource unload.out file now reveals the migration of the GroupWise resource behaves properly :
Inspecting the relevant snippet for the resource unload.out file as found in /var/opt/novell/log/ncs :
Thu Sep 5 18:12:01 CEST 2013
+ return 0
+ ignore_error pkill -fx ''\''/opt/novell/groupwise/agents/bin/gwmta @/media/nss/VGWISE/groupwise/agents/share/oesdom1.mta'\'''
+ eval pkill -fx ''\''/opt/novell/groupwise/agents/bin/gwmta' '@/media/nss/VGWISE/groupwise/agents/share/oesdom1.mta'\'''
++ pkill -fx '/opt/novell/groupwise/agents/bin/gwmta @/media/nss/VGWISE/groupwise/agents/share/oesdom1.mta'
Thu Sep 5 18:12:01 CEST 2
This Support Knowledgebase provides a valuable tool for NetIQ/Novell/SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7013218
- Creation Date:06-SEP-13
- Modified Date:11-SEP-13
- NovellCluster ServicesGroupWiseOpen Enterprise Server
Did this document solve your problem? Provide Feedback