Red Hat Bugzilla – Bug 172310
Pass service name to script resource invocation to let the script know which service is being controlled
Last modified: 2009-04-16 16:18:30 EDT
Description of problem:
I have a custom <script> resource that needs to do some setup work specific to
the cluster <service> being started. Update script.sh (patch attached) to pass
service name as environment variable. The patch will let the script see service
name as OCF_RESKEY_service_name env var.
Version-Release number of selected component (if applicable):
Created attachment 120649 [details]
Make script.sh set service name in env of script being invoked
Fixes in CVS - the inheritance uses the new-ish "%" delimiter so that we only
inherit the "name" attribute if it is, in fact, from a parent service resource.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.
Hi, I'm reopening this bug because the service name is not passed when the
script resource is not a direct child element of <service>. With the resource
dependency feature implemented in bug 212121, <script> resources can (and
usually will be) one or more levels removed from <service> because the
application being controlled by the script will depend on other resources like
IP address and filesystems.
Like in bug 231521 for rhel5?
I've created a different bug for this:
Yes, it's the same issue. Thanks.