Dominik Klein wrote:
Schmidt, Florian wrote:
Hello list,
I still have problem with my heartbeat-config

I want heartbeat to start AFD. I checked the RA for LSB-compatibility
and think that it's right now.

The log file says, that the bash does not find the command afd.


crmd[2725]: 2008/02/29_11:32:00 info: do_lrm_rsc_op: Performing
op=AFD_start_0 key=5:1:71d7b119-77c3-4e6b-9ac6-6acf20d8cf61)
lrmd[2722]: 2008/02/29_11:32:01 info: rsc:AFD: start
lrmd[2785]: 2008/02/29_11:32:01 WARN: For LSB init script, no additional
parameters are needed.
lrmd[2722]: 2008/02/29_11:32:01 info: RA output: (AFD:start:stdout)
Starting AFD for afdha :
lrmd[2722]: 2008/02/29_11:32:01 info: RA output: (AFD:start:stderr)
bash: afd: command not found

tengine[2773]: 2008/02/29_11:32:01 info: extract_event: Aborting on
transient_attributes changes for 44425bd9-2cba-4d6a-ac62-82a8bb81a23d
lrmd[2722]: 2008/02/29_11:32:01 info: RA output: (AFD:start:stdout)
Failed

tengine[2773]: 2008/02/29_11:32:01 info: update_abort_priority: Abort
priority upgraded to 1000000
crmd[2725]: 2008/02/29_11:32:01 ERROR: process_lrm_event: LRM operation
AFD_start_0 (call=3, rc=1) Error unknown error
tengine[2773]: 2008/02/29_11:32:01 info: update_abort_priority: Abort
action 0 superceeded by 2
tengine[2773]: 2008/02/29_11:32:01 WARN: status_from_rc: Action start on
noderz failed (target: <null> vs. rc: 1): Error
tengine[2773]: 2008/02/29_11:32:01 WARN: update_failcount: Updating
failcount for AFD on 91d062c3-ad0a-4c24-b759-acada7f19101 after failed
start: rc=1

There is an extra user for AFD, called afdha. The afdha-script is
attached.

Switching to to afdha via su afdha I can start AFD, so I don't
understand, where's the problem. (

su $afduser -c "afd -a"

Try
su - $afduser -c "afd -a"
---^

This will make su login as the user (i.e. execute its profile).

Right now, you're running this as root, in the root-environment. If "afd" is not in root's PATH, then it cannot work.

To add some more possibilities:

You could also use
export PATH=$PATH:whatever
at the start of the script, so you have afd in your PATH.

Or use /path/to/afd instead of afd.

Regards
Dominik
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to