1829904 Members
2424 Online
109993 Solutions
New Discussion

modular package config

 
SOLVED
Go to solution
yash123
Regular Advisor

modular package config

Hello,
Kindly provide some sample modular package configuration examples.
11 REPLIES 11
Steven E. Protter
Exalted Contributor

Re: modular package config

Shalom,

You certainly provide a lot of information to go on. Nothing about the OS, hardware or even SG version.

http://h21007.www2.hp.com/portal/download/files/unprot/hpux/serviceguardciconfig.pdf

http://h30499.www3.hp.com/t5/System-Administration/Example-MC-Serviceguard-script-for-IPLANET/m-p/3380768#M197490

Note that current versions of SG do provide you the ability to impact package start up order and set up dependencies.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
yash123
Regular Advisor

Re: modular package config

Thanks for the reply SEP.
I am experienced in legacy configuration.
Now I want to learn modular package configuration.
I could see lot of modular package configuration in cmcluster/modules/sg
I am much confused here.
I appreciate expert help here.
Guarantied rewards!
Stephen Doud
Honored Contributor
Solution

Re: modular package config

A standard modular package configuration file is created using:
cmmakepkg -p [-n package_name] [output_file_name]

If you wish to include special toolkit or Metrocluster modules, you must specify them using the -m option during cmmakepkg. Note that you must follow toolkit/metrocluster manual instructions for implementing them. Some may not actually function (such as the HA-NFS SNFS and CNFS parameters).

The resulting outfile contains parameters similar to those you would see and customize in both the legacy package configuration file and package control script.

You edit/customize these parameters (including VG, lvol and mount points and mount options etc) in the modular config file.

Any special external script calls from the legacy customer_defined_run_cmds can be identified in the modular config file using one or more external_script parameter. You then have to copy a external_script template and customize it with the application run/stop commands.

cmapplyconf loads your customized parameters into the cluster binary file, and any node authorized to run the package uses the standard package start/stop functionality in /etc/cmcluster/scripts/sg* to operate the package.
yash123
Regular Advisor

Re: modular package config

thanks Stephen,
I am in the impression that need to mention cmmakepge -m sg/failover -n pk1 pkg1.conf for a normal failover packgae.
But in the failover modules I coudn't see vg,lvol, mount points options. So no need to specify -m option.
My final conclusion
to create modular failover package
cmmakepkg -p -n pk1 $SGCONF/pkg1/pkg1.conf
edit pkg1.conf and apply
Please clarify.
Please explain in which senario need to mention modules (-m option) like filesystem,basic, etc
yash123
Regular Advisor

Re: modular package config

I apologies my ignorance in this area. Kindly excuse and provide your valuable thoughts and experience

g3jza
Esteemed Contributor

Re: modular package config

Hi,
you can specify the module "sg/all" , which includes all of the attributes / parameters you can define in SG. It's useful, when you first started using modular style packages and don't know, in which module is the legacy attribute located. You can also look in the directory /etc/cmcluster/modules/sg to see all the available modules and what attributes/parameters are in each module.
g3jza
Esteemed Contributor

Re: modular package config

For example all the parameters you can define in module filesystem are:

# grep attribute_name filesystem
attribute_name concurrent_fsck_operations
attribute_name concurrent_mount_and_umount_operations
attribute_name fs_mount_retry_count
attribute_name fs_umount_retry_count
attribute_name fs_name
attribute_name fs_directory
attribute_name fs_type
attribute_name fs_mount_opt
attribute_name fs_umount_opt
attribute_name fs_fsck_opt

so you can compare these parameters with old legacy style packages and decide, which module/modules you need and which you don't need.
Stephen Doud
Honored Contributor

Re: modular package config

Oops - my mistake. In my original post, I include a -p option with the cmmakepkg command. That's the legacy method (muscle memory!).

If you drop the -p, it _will_ create a modular package configuration file with the following modules automatically loaded:
sg/basic
sg/all
sg/failover
sg/priority
sg/dependency
sg/weight
sg/monitor_subnet
sg/package_ip
sg/service
sg/resource
sg/volume_group
sg/filesystem
sg/pev
sg/external_pre
sg/external
sg/acp

I used: 'cmmakepkg -n testpkg testpkg.conf'
yash123
Regular Advisor

Re: modular package config

Thanks all
cmmakepkg -m sg/all -n pkg1 /etc/cmcluster/pkk1/pkg1.conf command will create pkg1.conf file and edit the the file

one doubt do I need to comment attribute_name
eg:
#attribute_name node_name
node_name node1
node_name node2

#attribute_name auto_run
auto_run yes

Is the above is correct or no need to comment attribute_name line.
g3jza
Esteemed Contributor

Re: modular package config

the "attribute_name" line should not be in the package configuration file, unless it is commented.

yash123
Regular Advisor

Re: modular package config

Ok this means in the package configuration file contains only required informationâ s compared to the template.
package_name pkg-nu-2
module_name sg/all
module_version 1
package_type FAILOVER
run_script_timeout 340
halt_script_timeout 340
successor_halt_timeout NO_TIMEOUT
Please can you provide some sample configuration.