1833445 Members
3811 Online
110052 Solutions
New Discussion

pre-external script

 
kirvam
New Member

pre-external script

Hi You'all,

I am getting errors in checkconf when trying to use a pre-external script in the package file?

-------------------------
bash-4.0# cmcheckconf -v -P epic.conf
Begin package verification...
Checking existing configuration ... Done
Parsing package file: epic.conf.
Attempting to add package epic.
Attempting to validate epic.
The specified run script timeout is NO_TIMEOUT; using 1200 seconds as timeout value.
cmapplyconf will wait for this amount of time for the
script to complete before giving up.
Failed to validate /etc/cmcluster/scripts/mscripts/master_control_script.sh.

On node dh17 validation failed with:
sg_execute_steps validate
SG_Operation_Sequence array:
[0] /etc/cmcluster/scripts/sg/external_pre.sh
[1] /etc/cmcluster/scripts/sg/volume_group.sh
[2] /etc/cmcluster/scripts/sg/filesystem.sh
[3] /etc/cmcluster/scripts/sg/package_ip.sh
[4] /etc/cmcluster/scripts/sg/external.sh
[5] /etc/cmcluster/scripts/sg/service.sh
[6] /etc/cmcluster/scripts/sg/resource.sh
/etc/cmcluster/scripts/sg/external_pre.sh validate
sg_external_pre_script
Validating External pre Scripts
ERROR: Failed to validate /etc/cmcluster/epic/pre_test_hat_cache_routine.sh
ERROR: Failed to validate /etc/cmcluster/scripts/sg/external_pre.sh
/etc/cmcluster/scripts/sg/volume_group.sh validate
sg_volume_groups
sg_validate_volume_groups
/etc/cmcluster/scripts/sg/filesystem.sh validate
sg_filesystems
sg_validate_filesystems
/etc/cmcluster/scripts/sg/package_ip.sh validate
sg_ip_addresses
sg_validate_ip_address
Verifying if the IP addresses could be added to corresponding subnets
create_ip_subnet_list
add_to_ip_subnet_array
Checking IP address 130.189.240.152 to subnet 130.189.240.0
cmmodnet: Use the "cmrunnode" command to start the daemon on this node.
/etc/cmcluster/scripts/sg/external.sh validate
sg_external_script
sg_validate_external_script
customer defined script
validate_command
/etc/cmcluster/scripts/sg/service.sh validate
sg_services
sg_validate_services
/etc/cmcluster/scripts/sg/resource.sh validate
sg_deferred_resources
sg_validate_deferred_resources

On node dh6 validation failed with:
sg_execute_steps validate
SG_Operation_Sequence array:
[0] /etc/cmcluster/scripts/sg/external_pre.sh
[1] /etc/cmcluster/scripts/sg/volume_group.sh
[2] /etc/cmcluster/scripts/sg/filesystem.sh
[3] /etc/cmcluster/scripts/sg/package_ip.sh
[4] /etc/cmcluster/scripts/sg/external.sh
[5] /etc/cmcluster/scripts/sg/service.sh
[6] /etc/cmcluster/scripts/sg/resource.sh
/etc/cmcluster/scripts/sg/external_pre.sh validate
sg_external_pre_script
Validating External pre Scripts
ERROR: Failed to validate /etc/cmcluster/epic/pre_test_hat_cache_routine.sh
ERROR: Failed to validate /etc/cmcluster/scripts/sg/external_pre.sh
/etc/cmcluster/scripts/sg/volume_group.sh validate
sg_volume_groups
sg_validate_volume_groups
/etc/cmcluster/scripts/sg/filesystem.sh validate
sg_filesystems
sg_validate_filesystems
/etc/cmcluster/scripts/sg/package_ip.sh validate
sg_ip_addresses
sg_validate_ip_address
Verifying if the IP addresses could be added to corresponding subnets
create_ip_subnet_list
add_to_ip_subnet_array
Checking IP address 130.189.240.152 to subnet 130.189.240.0
cmmodnet: Use the "cmrunnode" command to start the daemon on this node.
/etc/cmcluster/scripts/sg/external.sh validate
sg_external_script
sg_validate_external_script
customer defined script
validate_command
/etc/cmcluster/scripts/sg/service.sh validate
sg_services
sg_validate_services
/etc/cmcluster/scripts/sg/resource.sh validate
sg_deferred_resources
sg_validate_deferred_resources


cmcheckconf: Error found in package file: epic.conf.
-------------------------

The entry in the package file looks like this:
external_pre_script /etc/cmcluster/epic/pre_test_hat_cache_routine.sh

Has anyone seen this?
The error message is not very clear (at least to me), what does it mean?
I see no errors in syslog. Is there any other place I should look?

Any assistance would be appreciated.


Thanks!

-paul
2 REPLIES 2
kirvam
New Member

Re: pre-external script

I have figured it out.

Thanks!

-paul
S. Ney
Trusted Contributor

Re: pre-external script

I am not an expert but did you do something similar in your package configuration?
1. Use /etc/cmcluster/examples/external-script.template as a template for your pre_external script? Your external & pre_external scripts should have a stop,start,validate which should exit with 0,1, or 2 for value. (See latest version of managing service guard - package modules and parameters chapter.)
2. make sure your .sh file is executable?
3. add the pre_external script to your package config file? cmmakepkg -i epic.conf -m /sg/external_pre epic.conf
4. If you need more logging and you are still in a test environment you could increase the logging level in the package.conf file.