Bug 19013

Summary: pump never returns ip in script arguments
Product: [Retired] Red Hat Linux Reporter: Need Real Name <larson>
Component: pumpAssignee: Elliot Lee <sopwith>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: chris, dr
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-11-03 20:43:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2000-10-13 01:39:13 UTC
when calling a script with pump.conf's script directive I never get a
useful IP as the third argument as per the man page.

It's always something like up eth1 0.0.0.0

Comment 1 Erik Troan 2000-10-23 14:30:54 UTC
I've managed to replicate this only by letting pump fail on eth1, in which case
it does exactly what you described. It shouldn't be running the script at all in
this case (which I've fixed), but I have a feeling you're seeing something else?

Is pump working otherwise? What script are you using? How do you know what the
parameters look like? Is the script actually being run properly? Does
/var/log/messages have anything useful in it? Does the script work properly on
eth0 (can you test that?).


Comment 2 chris 2000-10-24 11:15:46 UTC
For what it's worth, there seem to be pretty weird things going on with the
script on my system too (RH7.0, pump-0.8.3-2).  With the following script:

#!/bin/sh
#
# Script to modify /etc/hosts when pump gains a new IP address.
#

echo "pump-script running with arguments ($1) ($2) ($3)..." >/tmp/pumpscr.txt

if [ "$1" = up -a "$2" = eth0 -a "$3" != 0.0.0.0 ]; then
  echo "pump-script doing its thing" >>/tmp/pumpscr.txt
  ( /bin/cp -fp /etc/hosts /etc/hosts.bak && \
  echo "$3	`/bin/hostname -s`	`/bin/hostname`" >/etc/hosts && \
  /bin/grep -v "`/bin/hostname | sed 's/\./\\\./g'`" /etc/hosts.bak >>/etc/hosts
) 2>>/tmp/pumpscr.txt
  # Bring up the firewall.
  /etc/sysconfig/network-scripts/firewall $2 $3
else
  echo "pump-script failed with arguments ($1) ($2) ($3)" >>/tmp/pumpscr.txt
fi

I get the "pump-script running" and "pump-script doing its thing" messages in
/tmp/pumpscr.txt, followed by "/bin/cp: write error: Bad file descriptor".  And
if I change those "echo >/tmp/pumpscr.txt" lines to invocations of
/usr/bin/logger, nothing at all gets logged to syslog.

Anything else I can try?

Thanks,
Chris.

Comment 3 Need Real Name 2000-11-11 21:30:25 UTC
My setup eth1 as an interface to a cable modem, so your fix addresses my bug
report. It is reporting the IP correctly now.




Comment 4 chris 2000-11-13 13:11:26 UTC
Hmm...upgrading to pump-0.8.4-1 and then downgrading back to 0.8.3-2 seems to
have fixed the above: no more "Bad file descriptor" errors, and logging to
syslog now seems to work fine.

Very peculiar...

Comment 5 Elliot Lee 2003-11-03 20:43:31 UTC
Old, dead bug.