Re: dhclient keeps sending old hostname [solved]



On Tue, 2011-06-21 at 12:59 -0700, Ross Boylan wrote:
I have a kvm virtual machine whose disk was initially a copy of another
virtual machine. The original machine's hostname was vm-lenny00. I
changed the new machine to vm-migrate07
in /etc/hostname, /etc/hosts, /etc/dhcp3/dhclient.conf (send host-name
"vm-migrate07";), /etc/dhcp/dhclient.conf, and other places (e.g., mail
and backup system). I tried several reboots of the vm, although it is
possible I have only edited some of those files since the last reboot.
In particular, /etc/dhcp/dhclient.conf is a recent change.

I was able to get the name right by doing
nmcli con down id "Auto eth0"
and then the corresponding con up command. This got me anew dhclient,
which did use the current, correct, host-name in dhcp.conf.

I speculate that my previous efforts failed because I had not changed
the (correct) dhclient.conf before reboot. Presumably before upgrade
there was only one such file (under dhcp3/).

NetworkManager, not ifupdown, is managing my network connection. Using
the latter produced
# ifdown eth0
Ignoring unknown interface eth0=eth0.

It remains unclear to me exactly how dhclient was invoked, or whether I
could have restarted it outside the networkmanager machinery.

I guess dhclient3 is still running because it was running before the
upgrade.

Ross

P.S. I used VNC to keep connected while the interface went down. Maybe
someone brave could get away with
nmcli con down id "Auto eth0"; nmcli con up id "Auto eth0"
The new vm has had a distinct MAC address from the start.

dnsmasq on my host (lenny) system continues to report
Jun 20 23:46:48 markov dnsmasq[4243]: DHCPREQUEST(tap0) 192.168.8.88 52:54:a0:12:07:01
Jun 20 23:46:48 markov dnsmasq[4243]: DHCPACK(tap0) 192.168.8.88 52:54:a0:12:07:01 vm-lenny00
This is a mess, since the real vm-lenny00 is also talking (below is from
a reboot of that vm):
Jun 20 23:30:32 markov dnsmasq[4243]: DHCPRELEASE(tap0) 192.168.8.140 52:54:a0:12:01:01
Jun 20 23:30:53 markov dnsmasq[4243]: DHCPDISCOVER(tap0) 192.168.8.140 52:54:a0:12:01:01
Jun 20 23:30:53 markov dnsmasq[4243]: DHCPOFFER(tap0) 192.168.8.140 52:54:a0:12:01:01
Jun 20 23:30:53 markov dnsmasq[4243]: DHCPREQUEST(tap0) 192.168.8.140 52:54:a0:12:01:01
Jun 20 23:30:53 markov dnsmasq[4243]: DHCPACK(tap0) 192.168.8.140 52:54:a0:12:01:01 vm-lenny00

/var/lib/dhcp/dhclient-xxxxx-eth0.lease (on vm-migrate07) shows only
entries on with
option host-name "vm-lenny00";

Since I'm accessing the vm via ssh I'm reluctant to bring networking
down. I do have vnc setup if necessary. Since I'm in the middle of an
upgrade, I'm also reluctant to restart the vm. At one point after the
upgrade the disk filled.

I used the vm to test upgrade to squeeze, and so it is now basically
running squeeze. I tried to reset the name (and did reboots) before the
upgrade. vm-migrate07 has network-manager installed, and it appears the
both the old (dhcp3) and new (dhcp) clients are running:
# ps -Alc | grep dhc
5 S 0 1052 1 TS 19 - 1593 - ? 00:00:00 dhclient3
4 S 0 12286 12276 TS 19 - 1687 - ? 00:00:00 dhclient

# netstat -nlp | grep dhc
udp 0 0 0.0.0.0:68 0.0.0.0:* 12286/dhclient
udp 0 0 0.0.0.0:68 0.0.0.0:* 1052/dhclient3

So I'm not entirely sure who is in control. I assume the vm-lenny00
name in the dnsmasq exchanges is coming from the client, but perhaps
it's not.

I tried using omshell on the vm to talk to dhclient, but it says
"dhcpctl_connect: no more" when I try to connect. The docs don't
indicate any way to signal it to re-read its configuration file.

How can I fix the name of the system?

Thanks for any assistance.
Ross






--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/1308699264.25874.46.camel@xxxxxxxxxxxxxxxxxxx



Relevant Pages

  • Re: upgrading Gutsy to Hardy, remotely .... advice and precautions?
    ... the upgrade should proceed with some possible package removals. ... a reboot will be required. ... system via remote. ... I'd make sure that ssh is installed and working before you start. ...
    (Ubuntu)
  • Trouble upgrading Squeeze
    ... I have Sqeeze on my laptop and have not done an upgrade in quite some ... Sometimes I have needed to remove the lock file, ... Now I am afraid to power down and reboot, ...
    (Debian-User)
  • MCE2005 Upgrade Oddity, maybe will help someone
    ... My upgrade went horribly, ... infinite reboot loop (I couldn't even go into safe mode ... telling Windows not to reboot on fatal error, ... has DMA disabled." ...
    (microsoft.public.windows.mediacenter)
  • RE: Jump Drive not recognized as drive on laptop, using XP Pro
    ... where others offered assistance, and somebody found the solution for me. ... then "saw" the devices and asked me to reboot again afterwhich everything ... Yesterday, I asked a question on how to upgrade XP Home to XP Pro, because ...
    (microsoft.public.windowsxp.hardware)
  • Re: WMP 11 with Windows XP crashes when I connect my mp3 player
    ... I had to reboot and go back to the link for the "Upgrade" to be available. ... ....Take note that you have to rename the directory ... As you can tell, I'm running Vista x64. ...
    (microsoft.public.windowsmedia.player)