>
> 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.
Hello,
I wrote the following lines on top of the script code:
export PATH=$PATH:/home/afdha
export AFD_WORK_DIR=/usr/afd
AFD needs one environment-variable named AFD_WORK_DIR to know, where to
work....
I also did chown afdha:501 /usr/afd and chown /home/afdha
How far does this work, because the heartbeat still does not start AFD,
but logs errors:
crmd[3541]: 2008/02/29_13:58:26 info: do_lrm_rsc_op: Performing
op=AFD_start_0 key=4:1:151fabd8-d44a-40b1-b946-38480dbd8c8f)
lrmd[3538]: 2008/02/29_13:58:26 info: rsc:AFD: start
lrmd[3583]: 2008/02/29_13:58:26 WARN: For LSB init script, no additional
parameters are needed.
lrmd[3538]: 2008/02/29_13:58:26 info: RA output: (AFD:start:stdout)
Starting AFD for afdha :
lrmd[3538]: 2008/02/29_13:58:26 info: RA output: (AFD:start:stderr)
ERROR : Failed to determine AFD working directory!
lrmd[3538]: 2008/02/29_13:58:26 info: RA output: (AFD:start:stderr)
No option -w or environment variable AFD_WORK_DIR set.
lrmd[3538]: 2008/02/29_13:58:26 info: RA output: (AFD:start:stdout)
Failed.
crmd[3541]: 2008/02/29_13:58:26 info: process_lrm_event: LRM operation
AFD_start_0 (call=3, rc=0) complete
tengine[3556]: 2008/02/29_13:58:26 info: match_graph_event: Action
AFD_start_0 (4) confirmed on noderz (rc=0)
tengine[3556]: 2008/02/29_13:58:26 info: send_rsc_command: Initiating
action 5: AFD_monitor_30000 on noderz
crmd[3541]: 2008/02/29_13:58:26 info: do_lrm_rsc_op: Performing
op=AFD_monitor_30000 key=5:1:151fabd8-d44a-40b1-b946-38480dbd8c8f)
lrmd[3538]: 2008/02/29_13:58:27 info: RA output: (AFD:monitor:stderr)
ERROR : Failed to determine AFD working directory!
No option -w or environment variable AFD_WORK_DIR set.
How can I set this environment-variable AFD_WORK_DIR globally
I have it in ~/.bash_profile, but this doesn't work for the afdha-user
:-(
I'm working with linux only since 4 or 5 weeks (since I started building
that heartbeat/drbd-cluster)...so my skills are not that good, but I try
to improve ;)
Thanks
Florian
> Or use /path/to/afd instead of afd.
>
> Regards
> Dominik
> _______________________________________________
> Linux-HA mailing list
> [email protected]
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems