Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Mandriva

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-27-2008, 11:12 PM
David Mathog
 
Posts: n/a
2008.1, configuration issues

Setting up some new machines with 2008.1, current issues are:

1. /etc/hosts is being rewritten by something, sometimes, at reboot.
Whatever moron process is doing this makes it:

127.0.0.1 node01.bio.caltech.edu node01 localhost

when it was previously (real address instead of aaa.bbb.ccc.ddd):

127.0.0.1 localhost
aaa.bbb.ccc.ddd node01.bio.caltech.edu

Ah, thank you Mandriva, the write (or rather two of them, in the same
second) was logged in /var/log/messages. The process that did this was
drakconnect and it did this during the boot sequence. So, what is
drakconnect and how do I make it behave? Specifically tell it to keep
its paws off my /etc/hosts file!

Oh crud, drakconnect also rewrote

/etc/sysconfig/network-scripts/ifcfg-eth0

Somebody may like juggling chainsaws, but it isn't me.

2. NIS is broken in some odd way. The passwd map works ok

% ypcat passwd | grep mathog
(expected result)

This is a hard mount, not an automount, and it is properly mounted. I
know I have seen this problem before somewhere but have not yet found it
in my notes. The problem is:

% cd ~mathog
-bash: cd: ~mathog: No such file or directory

but

% cd /ulhhmi/mathog
(works)

Hmm /etc/nsswitch.conf is:
passwd files compat
Put NIS in there after files, nope.


3. Machine won't reboot reliably. This is almost certainly due to a
race condition in the multithreaded init. Sometimes ypbind is coming up
before shorewall, sometimes after, and it only works if it comes up
before. Somebody please remind me how to make the init single threaded
again? It may also be a side effect of (1) above, since if the name
isn't resolved properly the network is pretty much guaranteed to have
issues.


Thanks,

David Mathog
Reply With Quote
  #2 (permalink)  
Old 06-28-2008, 12:06 AM
Aragorn
 
Posts: n/a
Re: 2008.1, configuration issues

On Saturday 28 June 2008 01:12, someone who identifies as *David Mathog*
wrote in /alt.os.linux.mandriva:/

> Setting up some new machines with 2008.1, current issues are:
>
> 1. /etc/hosts is being rewritten by something, sometimes, at reboot.
> Whatever moron process is doing this makes it:
>
> 127.0.0.1 node01.bio.caltech.edu node01 localhost
>
> when it was previously (real address instead of aaa.bbb.ccc.ddd):
>
> 127.0.0.1 localhost
> aaa.bbb.ccc.ddd node01.bio.caltech.edu
>
> Ah, thank you Mandriva, the write (or rather two of them, in the same
> second) was logged in /var/log/messages. The process that did this was
> drakconnect and it did this during the boot sequence. So, what is
> drakconnect and how do I make it behave? Specifically tell it to keep
> its paws off my /etc/hosts file!


The name /drakconnect/ suggests that it's Mandriva-typical. I presume it's
one of those "do it all automagically and keep the user dumb"-kind of
things that may have purpose on a laptop but shouldn't be used on a desktop
or server.

I would suggest trying to disable it from starting at boot time and seeing
what gives. If it's a script rather than a binary, then it would live
under */etc/init.d* and then you can examine its contents and see what it
invokes.

> Oh crud, drakconnect also rewrote
>
> /etc/sysconfig/network-scripts/ifcfg-eth0
>
> Somebody may like juggling chainsaws, but it isn't me.


I share your conviction in this one. ;-)

> 2. NIS is broken in some odd way. The passwd map works ok
>
> % ypcat passwd | grep mathog
> (expected result)
>
> This is a hard mount, not an automount, and it is properly mounted. I
> know I have seen this problem before somewhere but have not yet found it
> in my notes. The problem is:
>
> % cd ~mathog
> -bash: cd: ~mathog: No such file or directory


I'm not sure but it is possible that only the root user can do that.
Does...

cd ~

.... or...

cd

.... work? Both should take you to your home directory.

> but
>
> % cd /ulhhmi/mathog
> (works)


Ah, but maybe the problem is that */ulhhmi/mathog* was not defined as being
your home directory? Normally, the /$HOME/ is typically set to
*/home/$LOGIN,* and unless you've deliberately changed that, the command...

cd ~mathog

.... will attempt to /cd/ into */home/mathog.*

> Hmm /etc/nsswitch.conf is:
> passwd files compat
> Put NIS in there after files, nope.


Well, this is out of my league, I'm afraid... :-/

> 3. Machine won't reboot reliably. This is almost certainly due to a
> race condition in the multithreaded init. Sometimes ypbind is coming up
> before shorewall, sometimes after, and it only works if it comes up
> before. Somebody please remind me how to make the init single threaded
> again? It may also be a side effect of (1) above, since if the name
> isn't resolved properly the network is pretty much guaranteed to have
> issues.


Add /nopinit/ to the kernel's append line if you're using LILO, or as a
kernel parameter in GRUB. /nopinit/ = no parallel /init./

--
*Aragorn*
(registered GNU/Linux user #223157)
Reply With Quote
  #3 (permalink)  
Old 06-28-2008, 12:37 AM
David W. Hodgins
 
Posts: n/a
Re: 2008.1, configuration issues

On Fri, 27 Jun 2008 19:12:18 -0400, David Mathog <mathog@caltech.edu> wrote:

> Setting up some new machines with 2008.1, current issues are:
>
> 1. /etc/hosts is being rewritten by something, sometimes, at reboot.
> Whatever moron process is doing this makes it:
> 127.0.0.1 node01.bio.caltech.edu node01 localhost
> when it was previously (real address instead of aaa.bbb.ccc.ddd):
> 127.0.0.1 localhost
> aaa.bbb.ccc.ddd node01.bio.caltech.edu


I can't recreate this problem. I tried having /etc/hosts with ...
# cat /etc/hosts
127.0.0.1 hodgins.homeip.net hodgins localhost localhost.localdomain
192.168.1 fred.homeip.net

Running drakconnect did not change it.

There is a known bug where all names with the same ip address will be put on
the same line. See https://qa.mandriva.com/show_bug.cgi?id=30168 which I've
just updated to include 2008.1. I first reported it for 2007.0.

> Ah, thank you Mandriva, the write (or rather two of them, in the same
> second) was logged in /var/log/messages. The process that did this was
> drakconnect and it did this during the boot sequence. So, what is


I don't have drakconnect running during startup. Checking /usr/bin/mdkapplet,
I see it can call drakconnect. Try disabling mdkapplet (right click on the
icon, and disable it). That will set AUTOSTART=FALSE in ~/.MdkOnline/mdkonline.
Note that this will turn off auto checking for updates.

> 2. NIS is broken in some odd way. The passwd map works ok
> % ypcat passwd | grep mathog
> (expected result)
> This is a hard mount, not an automount, and it is properly mounted. I
> know I have seen this problem before somewhere but have not yet found it
> in my notes. The problem is:


I've never used NIS, so can't help there.

> % cd ~mathog
> -bash: cd: ~mathog: No such file or directory


Shouldn't that be cd ~/mathog ?

> 3. Machine won't reboot reliably. This is almost certainly due to a
> race condition in the multithreaded init. Sometimes ypbind is coming up
> before shorewall, sometimes after, and it only works if it comes up
> before. Somebody please remind me how to make the init single threaded
> again? It may also be a side effect of (1) above, since if the name
> isn't resolved properly the network is pretty much guaranteed to have
> issues.


Add nopinit as if it were a kernel parameter.

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
Reply With Quote
  #4 (permalink)  
Old 06-28-2008, 03:16 AM
Bit Twister
 
Posts: n/a
Re: 2008.1, configuration issues

On Fri, 27 Jun 2008 16:12:18 -0700, David Mathog wrote:
> Setting up some new machines with 2008.1, current issues are:
>
> 1. /etc/hosts is being rewritten by something, sometimes, at reboot.
> Whatever moron process is doing this makes it:
>
> 127.0.0.1 node01.bio.caltech.edu node01 localhost


I find that "feature" anytime I play in MCC's network wizard.

I have not noticed /etc/sysconfig/network-scripts/ifcfg-eth0
mods outside of MCC.

Then again, I set everything static, NOPEERDNS=yes, NEEDHOSTHAME=no

Wizard does not like trailing comments on lines in /etc/sysconfig/network

locate /sysconfig.txt
returns the Rosetta Stone file location which shows where you can set
what variables with what values for a bit more control on your setup.

As usual, MCC will overwrite custom settings in config files by
creating a new file with wizard inputs and defaulting/removing other
variables.
Reply With Quote
  #5 (permalink)  
Old 06-30-2008, 08:05 PM
David Mathog
 
Posts: n/a
Re: 2008.1, configuration issues

Some progress on the network issues, but DAMN they made it difficult
this time. My first goal was to get resolvconf to stop stomping on my
/etc/resolv.conf file. These machines have static IP addresses and
static names and there is just no reason to ever rewrite that file.

0. chkconfig --del resolvconf
reboot, it still stomped it.

1. Try to remove resolvconf:

rpm -e resolvconf

can't be done, it is a prerequisite for initscripts

2. Try to disable it everywhere it might be called:
in /etc/init.d/

% diff resolvconf resolvconf.dist
24,45d23
< #######################
< # MATHOG 30-JUN-2008.
< # Add a method for disabling resolvconf, by putting DISABLE_RESOLVCONF
in network.
< # Also modified /etc/sysconfig/network-scripts/init-functions to look
for this and do NOTHING
< # when it sees it. Note that it says "success" no matter what the
command was that called
< # this script. The variable must be an uppercase YES, nothing else
will work.
<
< if [ -f /etc/sysconfig/network ]; then
< . /etc/sysconfig/network
< if [ "$DISABLE_RESOLVCONF" = "YES" ]
< then
< rm -f "$ENABLE_UPDATES_FLAGFILE"
< gprintf "resolvconf (disabled by sysconfig/network)"
< success
< echo
< exit 0
< fi
< fi
< #################################################
<
<
<

Added this line to /etc/sysconfig/network
DISABLE_RESOLVCONF=YES

Made this change:

% diff network-functions network-functions.dist
425,426d424
< if [ "$DISABLE_RESOLVCONF" != "YES" ]
< then
468d465
< fi
473,474d469
< if [ "$DISABLE_RESOLVCONF" != "YES" ]
< then
481d475
< fi

As far as I could tell that should have kept /sbin/resolvconf from ever
being called by the init scripts. Restored /etc/resolv.conf and
rebooted, and, it was STILL stomped, but this time by something that
didn't bother to log the change in /var/log/messages!

3. Reboot safe mode, really pull the beast's teeth:

% cp /sbin/resolvconf /sbin/resolvconf.dist
% cat >/sbin/resolvconf <<EOF
#!/bin/bash
echo "resolvconf was called and is being ignored"
EOF

Restore /etc/resolv.conf.

Reboot, and, you guessed it, something stomped on the file again, again
with no log. The #$&#(&W GHOST of /sbin/resolvconf perhaps???

Choice words were uttered.

4. Reboot to safe mode.

Try using mcc to configure a static interface. It trashed /etc/hosts,
merging the

127.0.0.1 localhost
aaa.bbb.ccc.ddd node1.bio.caltech.edu node1.caltech.edu node1

lines, moving some from the second onto the first. It did NOT touch
resolv.conf, which was still empty at this point. Tried this:

service network stop
service network start
cp spare_resolv.conf /etc/resolv.conf
cp spare_hosts /etc/hosts
service network stop
service network start

and finally, at this point whatever it was left both files alone.
Rebooted twice and it came up both times. (This is with pinit, to avoid
the race issues in the multithreaded init.)

My distinct impression is that Mandriva 2008.1 is pretty darn hostile
for for static network configurations.

Now to figure out why the tilde expansion isn't working for names pulled
from the YP passwd map.

Thanks,

David Mathog

Reply With Quote
  #6 (permalink)  
Old 06-30-2008, 08:14 PM
David W. Hodgins
 
Posts: n/a
Re: 2008.1, configuration issues

On Mon, 30 Jun 2008 16:05:31 -0400, David Mathog <mathog@caltech.edu> wrote:

> Some progress on the network issues, but DAMN they made it difficult
> this time. My first goal was to get resolvconf to stop stomping on my
> /etc/resolv.conf file. These machines have static IP addresses and
> static names and there is just no reason to ever rewrite that file.


I find it much easier, to just put the name servers you want in
/etc/resolvconf/resolv.conf.d/head.

> Try using mcc to configure a static interface. It trashed /etc/hosts,
> merging the
> 127.0.0.1 localhost
> aaa.bbb.ccc.ddd node1.bio.caltech.edu node1.caltech.edu node1


I'll post here when/if https://qa.mandriva.com/show_bug.cgi?id=30168
gets fixed.

> Now to figure out why the tilde expansion isn't working for names pulled
> from the YP passwd map.


Can't help there. Never used YP. What is it used for?

Regards, Dave Hodgins

--
Change nomail.afraid.org to ody.ca to reply by email.
(nomail.afraid.org has been set up specifically for
use in usenet. Feel free to use it yourself.)
Reply With Quote
  #7 (permalink)  
Old 06-30-2008, 08:30 PM
David Mathog
 
Posts: n/a
Re: 2008.1, configuration issues

David Mathog wrote:


> % cd ~mathog
> -bash: cd: ~mathog: No such file or directory


There were two issues here:

1. my "regular" mathog account uses tcsh, and that was not installed,
so in the above example the "No such file or directory" was referring to
tcsh, not ~mathog.

2. /etc/nsswitch.conf, as supplied, is broken. More specifically
"compat" seems not to work fully with NIS. This happens:

% cd ~mathog
(works, after tcsh was installed, but...)
% su - mathog
su: user mathog does not exist

% ypcat passwd | grep mathog
(shows the right thing)

Changed /etc/nsswitch.conf from:

passwd: files compat
shadow: files
group: files compat
hosts: files nis dns

to

passwd: files nis nisplus
shadow: files nis nisplus
group: files nis nisplus
hosts: files nis dns nisplus

and it fixed the "su - mathog" problem.

Regards,

David Mathog
Reply With Quote
  #8 (permalink)  
Old 07-01-2008, 12:54 AM
Aragorn
 
Posts: n/a
Re: 2008.1, configuration issues

On Monday 30 June 2008 22:05, someone who identifies as *David Mathog* wrote
in /alt.os.linux.mandriva:/

> Some progress on the network issues, but DAMN they made it difficult
> this time. My first goal was to get resolvconf to stop stomping on my
> /etc/resolv.conf file. These machines have static IP addresses and
> static names and there is just no reason to ever rewrite that file.
>
> 0. chkconfig --del resolvconf
> reboot, it still stomped it.
>
> 1. Try to remove resolvconf:
>
> rpm -e resolvconf
>
> can't be done, it is a prerequisite for initscripts
>
> 2. Try to disable it everywhere it might be called:
> in /etc/init.d/
> [...]


If I'm not mistaken, then the process rewriting */etc/resolv.conf* is your
DHCP client daemon. You should look into its configuration and start it
with a switch that makes it leave the file alone.

On a second thought, why use a DHCP client in the first place if you have
static IP addresses? Just hard-code your network set-up and kick the DHCP
client out of your runlevel.

Hope this helps... ;-)

--
*Aragorn*
(registered GNU/Linux user #223157)
Reply With Quote
  #9 (permalink)  
Old 07-01-2008, 03:38 PM
David Mathog
 
Posts: n/a
Re: 2008.1, configuration issues

Aragorn wrote:

>
> If I'm not mistaken, then the process rewriting */etc/resolv.conf* is your
> DHCP client daemon. You should look into its configuration and start it
> with a switch that makes it leave the file alone.


Nope. dhcp isn't running.

/etc/sysconfig/network-scripts/ifcfg-eth0

has

BOOTPROTO=static
with hardwired IPADDR, NETMASK, and GATEWAY. ps doesn't show it
running, and there is nothing in /var/log/messages to indicate it was
active when the file was rewritten.

Mandriva 2008.1 is better than previous versions in logging what is
changing configuration files, sadly , it is not yet perfect. If it was
this wouldn't be a mystery.

Regards,

David Mathog
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Linux > Mandriva


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:47 PM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109