Operating System - HP-UX
1833153 Members
3235 Online
110051 Solutions
New Discussion

Modular Vs. Leagacy SG packages

 
SOLVED
Go to solution
meekrob
Super Advisor

Modular Vs. Leagacy SG packages

Hi All,

 

what is the difference between modular and legacy SG package?

can anyone provide some links for documentation on this subject?

 

Thanks in advance

2 REPLIES 2
Matti_Kurkela
Honored Contributor
Solution

Re: Modular Vs. Leagacy SG packages

The difference is mainly in the package configuration format: the new format allows the use of new Serviceguard features and makes updates easier.

 

The legacy package configuration always includes 2 files: the package configuration file and the package control script. The legacy package configuration file is created as an ASCII file, then stored in the binary Serviceguard configuration using the cmapplyconf command.

 

The legacy package control script is used as-is and must be copied to every node that is going to run the package it belongs to. It cannot be within the package filesystem, as it needs to execute before the package filesystems are mounted. (The package filesystems, their mount points and package IP addresses are configured in the control script, not in the legacy package configuration file.)

When creating a new package, you must create a template package control script with "cmmakepkg -s" and then modify the variables and/or the customer_defined_(run|halt)_commands functions in it. The control script will also contain a lot of script functions that you are not supposed to modify.

 

When you upgrade Serviceguard to a newer version, you're supposed to re-create your legacy package control scripts, so that any fixes in the script templates will be effective in your packages. (Sometimes you can get away without doing that, but that is not a good practice.)

 

The modular package configuration file contains all the package filesystem, mount point and service definitions in a single file, which is stored in the binary Serviceguard configuration using the cmapply command. You can optionally add scripts to run at package startup/shutdown time: if you configure the script(s) using the external_script keyword, they behave like the legacy customer_defined_(run|halt)_commands. If you need to run scripts at the package startup time before the package filesystems are mounted, you can do it using the external_pre_script keyword.

 

With modular configuration, your external_scripts will only contain your package-specific scripting, not Serviceguard logic. Therefore, there should usually be no need to modify them when you upgrade Serviceguard.

 

The package configuration is completely documented in the "Managing Serviceguard" book: you can find the book at http://www.hp.com/go/hpux-serviceguard-docs -> HP Serviceguard -> User guide.

 

With the current versions of Serviceguard, the modular format is the recommended one. The information on the legacy package configuration may be reduced in the newer editions of the book, as the legacy configuration format is being deprecated and will be removed at some future version of Serviceguard.

 

If you need information on the legacy package format, you should get the 14th edition of Managing Serviceguard, as that's written for Serviceguard A.11.17, the last version that had only the legacy package configuration style available (= definitely has the full, unabridged documentation of the legacy package configuration). Otherwise, you should always use the edition of the book that matches your version of Serviceguard.

MK
meekrob
Super Advisor

Re: Modular Vs. Leagacy SG packages

Many Thanks for all the info