Re: Silly Q about eth0 going down during boot of Morphix

2005-07-03 Thread Eli Marmor
Baruch, thank you for your great tips, although they didn't help me in
this case.

But after a long investigation, I found the criminal: pump!

Although there is no DHCP server, and although a static IP is defined,
it insists on turning off eth0.

Since it is running as a daemon, the fact that my commands which setup
eth0 are running AFTER the launcher of pump doesn't help.

So the only workarounds:

1. Add the flag nodhcp to the boot params (but this workaround
   requires booting it manually, which is not a real option usually).
2. Run pump -k before setting up eth0.

-- 
Eli Marmor
[EMAIL PROTECTED]
Netmask (El-Mar) Internet Technologies Ltd.
__
Tel.:   +972-9-766-1020  8 Yad-Harutzim St.
Fax.:   +972-9-766-1314  P.O.B. 7004
Mobile: +972-50-5237338  Kfar-Saba 44641, Israel

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Silly Q about eth0 going down during boot of Morphix

2005-07-01 Thread Eli Marmor
Hi,

I forward a message that I sent to Morphix mailing list, maybe somebody
here will be faster to answer:
---
I've always used Morphix (0.5pre5) with a running DHCPD in the LAN, and
its networking has worked perfectly.

Yesterday I tried with no DHCP server. When I did it manually, either
by the ifconfig command, or by editing /etc/network/interfaces +
running /etc/init.d/networking restart, it worked perfectly.

Then I tried to do it through a mini-module boot command (I don't know
the exact terminology, but I'm talking about the commands that Morphix
executes when it is loading a mini-module, which were defined by option
#2 of minimod-gen).

It didn't work by either of the ways (neither by the same ifconfig
command which worked manually, nor by changing /etc/network/interfaces
and restarting /etc/init.d/networking).

I went on, checked the interface, and found out that everything was
defined correctly, but somebody turned off eth0, so its definitions
were correct, but it was not active.

I checked further, by inserting logging into my script (the script that
was called in the initialization of my mini-module. This script had 2
versions: one with ifconfig, and the other with modifications to
/etc/network/interfaces + restarting of /etc/init.d/networking). I
logged the output of basic networking commands such as ping, to a
temporary file.

In both of the versions of the script, the output of the logging was
perfect.

So the clear conclusion is that somebody screws it up (or, actually,
down...) after my script (i.e. my mini-module) is called.

How can I find the criminal scipt?  (or isn't it a script?)

Thanks,
-- 
Eli Marmor
[EMAIL PROTECTED]
Netmask (El-Mar) Internet Technologies Ltd.
__
Tel.:   +972-9-766-1020  8 Yad-Harutzim St.
Fax.:   +972-9-766-1314  P.O.B. 7004
Mobile: +972-50-5237338  Kfar-Saba 44641, Israel

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Silly Q about eth0 going down during boot of Morphix

2005-07-01 Thread Tzafrir Cohen
On Fri, Jul 01, 2005 at 10:47:55AM +0300, Eli Marmor wrote:
 Hi,
 
 I forward a message that I sent to Morphix mailing list, maybe somebody
 here will be faster to answer:
 ---
 I've always used Morphix (0.5pre5) with a running DHCPD in the LAN, and
 its networking has worked perfectly.

dhcp cliet, not dhcpd, right?

 
 Yesterday I tried with no DHCP server. When I did it manually, either
 by the ifconfig command, or by editing /etc/network/interfaces +
 running /etc/init.d/networking restart, it worked perfectly.
 
 Then I tried to do it through a mini-module boot command (I don't know
 the exact terminology, but I'm talking about the commands that Morphix
 executes when it is loading a mini-module, which were defined by option
 #2 of minimod-gen).
 
 It didn't work by either of the ways (neither by the same ifconfig
 command which worked manually, nor by changing /etc/network/interfaces
 and restarting /etc/init.d/networking).
 
 I went on, checked the interface, and found out that everything was
 defined correctly, but somebody turned off eth0, so its definitions
 were correct, but it was not active.
 
 I checked further, by inserting logging into my script (the script that
 was called in the initialization of my mini-module. This script had 2
 versions: one with ifconfig, and the other with modifications to
 /etc/network/interfaces + restarting of /etc/init.d/networking). I
 logged the output of basic networking commands such as ping, to a
 temporary file.
 
 In both of the versions of the script, the output of the logging was
 perfect.
 
 So the clear conclusion is that somebody screws it up (or, actually,
 down...) after my script (i.e. my mini-module) is called.
 
 How can I find the criminal scipt?  (or isn't it a script?)

strace -f? There are simply too many scriptlets there.

-- 
Tzafrir Cohen | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il |   | a Mutt's  
[EMAIL PROTECTED] |   |  best
ICQ# 16849755 |   | friend

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Silly Q about eth0 going down during boot of Morphix

2005-07-01 Thread Eli Marmor
Tzafrir Cohenwrote:

 On Fri, Jul 01, 2005 at 10:47:55AM +0300, Eli Marmor wrote:
  ...
  I've always used Morphix (0.5pre5) with a running DHCPD in the LAN, and
  its networking has worked perfectly.
 
 dhcp cliet, not dhcpd, right?

I mentioned a DHCPD running in the LAN (i.e. under another computer),
so it's clear that this is a DHCP server (=DHCPD) and not a client.

Of course, there is always a client too, in this case the Morphix runs
a client.

Let me summarize my question in a way that will make the connection to
DHCP clearer:

In the beginning, the Morphix inherited its IP/routing from a DHCP
server, and everything went right.

In the second phase, I turned off the DHCPD, booted the Morphix, and
configured the IP/routing by ifconfig and route. It still went
perfectly. I also tried it by modifying /etc/network/interfaces and
then restarting /etc/init.d/networking: perfect.

In the third phase, I wrote a script that executed exactly the same
commands, and asked Morphix to run it as an init command of a mini-
module. The script was ran, the definitions were defined, but the
interface was off.

I even inserted checks in the scripts, and found out that immediately
after the ifconfig/route (or the 2nd way), everything was perfect, so
there was a later process that screwed everything up.

  Yesterday I tried with no DHCP server. When I did it manually, either
  by the ifconfig command, or by editing /etc/network/interfaces +
  running /etc/init.d/networking restart, it worked perfectly.
  
  Then I tried to do it through a mini-module boot command (I don't know
  the exact terminology, but I'm talking about the commands that Morphix
  executes when it is loading a mini-module, which were defined by option
  #2 of minimod-gen).
  
  It didn't work by either of the ways (neither by the same ifconfig
  command which worked manually, nor by changing /etc/network/interfaces
  and restarting /etc/init.d/networking).
  
  I went on, checked the interface, and found out that everything was
  defined correctly, but somebody turned off eth0, so its definitions
  were correct, but it was not active.
  
  I checked further, by inserting logging into my script (the script that
  was called in the initialization of my mini-module. This script had 2
  versions: one with ifconfig, and the other with modifications to
  /etc/network/interfaces + restarting of /etc/init.d/networking). I
  logged the output of basic networking commands such as ping, to a
  temporary file.
  
  In both of the versions of the script, the output of the logging was
  perfect.
  
  So the clear conclusion is that somebody screws it up (or, actually,
  down...) after my script (i.e. my mini-module) is called.
  
 How can I find the criminal scipt?  (or isn't it a script?)
 
 strace -f? There are simply too many scriptlets there.

strace is great when you know the criminal, but don't know what this
criminal does exactly that screws up.

My case is the opposite: I know exactly what it does (ifdown), but
don't have any idea who the criminal is. I even can't strace, because I
don't know who should be straced.

Thanks,
-- 
Eli Marmor
[EMAIL PROTECTED]
Netmask (El-Mar) Internet Technologies Ltd.
__
Tel.:   +972-9-766-1020  8 Yad-Harutzim St.
Fax.:   +972-9-766-1314  P.O.B. 7004
Mobile: +972-50-5237338  Kfar-Saba 44641, Israel

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]



Re: Silly Q about eth0 going down during boot of Morphix

2005-07-01 Thread Baruch Even
Eli Marmor wrote:
 Tzafrir Cohenwrote:
 
 
On Fri, Jul 01, 2005 at 10:47:55AM +0300, Eli Marmor wrote:

...
I've always used Morphix (0.5pre5) with a running DHCPD in the LAN, and
its networking has worked perfectly.

dhcp cliet, not dhcpd, right?
 
 
 I mentioned a DHCPD running in the LAN (i.e. under another computer),
 so it's clear that this is a DHCP server (=DHCPD) and not a client.
 
 Of course, there is always a client too, in this case the Morphix runs
 a client.
 
 Let me summarize my question in a way that will make the connection to
 DHCP clearer:
 
 In the beginning, the Morphix inherited its IP/routing from a DHCP
 server, and everything went right.
 
 In the second phase, I turned off the DHCPD, booted the Morphix, and
 configured the IP/routing by ifconfig and route. It still went
 perfectly. I also tried it by modifying /etc/network/interfaces and
 then restarting /etc/init.d/networking: perfect.
 
 In the third phase, I wrote a script that executed exactly the same
 commands, and asked Morphix to run it as an init command of a mini-
 module. The script was ran, the definitions were defined, but the
 interface was off.
 
 I even inserted checks in the scripts, and found out that immediately
 after the ifconfig/route (or the 2nd way), everything was perfect, so
 there was a later process that screwed everything up.

You can try to use some system wide tracing such as syscalltrack, if the
kernel is newish enough (2.6.11 and above) you can use kprobes to write
a small kernel module to trace the system and find who calls exec and
runs ifdown.

A simple solution though would be to replace the ifdown program with
another one that would print its parent-pid and then run ifdown.

That is assuming someone actually calls ifdown to down the interface, a
program like a dhcp client might take the interface down on its own
without using ifdown.

Baruch

=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]