Re: [Vserver] using djbdns (tinydns & dnscache) from within vserver

From: Benedict Verheyen <linux4bene_at_telenet.be>
Date: Thu 13 Apr 2006 - 09:14:32 BST
Message-ID: <4241.212.123.8.34.1144916072.squirrel@bifrost.homelinux.net>

Hi,

> you could alternatively use the 'plain' init style
> and have a real init inside the guest, just as on
> uml :)

Herbert, would using the plain init style have advantages over what
i'm doing now?

>> Even from within the vserver doing for instance a dnsip doesn't work.
>
> how does it fail?

As for the dnsip failing, it doesn't do anything as in not returning a
value. When it works, it immediately returns the correct value.

>> ccapabilities
>> icmp
>> ping
> those are synonyms, so one of them should
> be enough, IIRC raw_icmp

i tried specifying the raw_icmp option in the file ccapabilities and this is
what i got:
===========================
Unknown ccap 'raw_icmp'

An error occured while executing the vserver startup sequence; when
there are no other messages, it is very likely that the init-script
(/etc/init.d/rc 2) failed.

Common causes are:
* /etc/rc.d/rc on Fedora Core 1 and RH9 fails always; the 'apt-rpm' build
  method knows how to deal with this, but on existing installations,
  appending 'true' to this file will help.

Failed to start vserver 'thor'
===========================

If i remove it then it works again.

> probably the only thing really required to be changed
> is the way you handle the networking, aside from that
> djbdns should not have any issues, maybe you can
> elaborate a little on your network setup, and how
> you test?

(ipconfig & route are way below)
As for what kind of error, well it doesn't actually give a certain error
but pinging the hosts or doing an dnsipq on a machine in the dns records
doesn't work.
After further testing, I really think it has to do with networking as you
say.

Some more about my network:
Since i used to run 4 uml's, i wanted to ease the way i did networking and
configured a bridge (br0) and on that bridge 4 tap devices that my uml's
plugged into. Worked great.

I no longer use the 4 uml's as they are now converted to vservers but the
bridging is still on and i want to keep it that way because i might use
the uml's to experiment (as in try things out and destroy it in the
process :)).

Now, sometimes when i start the vserver, the dns stuff works and sometimes
it doesn't. Very weird. I have no clue on how i can track it. Nothing
logged in my iptabels (i get a log when a packet is dropped or rejected)
and i have no firewalling on the bridge.

For instance, sometimes when i start the vserver, when exim comes up, it
takes a looong time to start.
It show this message "Starting MTA: " and then takes several minutes to
go to the next program that needs to be started.
I think this is because of a dns problem, in other words djbdns that isn't
capable of doing what it needs to do.
Then when i enter the vserver, none of the dns utilities work.

I then close the vserver and restart it then and sometimes it then works.
Other times i need to restart it several times and can't get it to work.
Very strange.

Last test i did was bringing the uml and the vserver back on but then use a
different ip (/etc/vserver/thor/interfaces/0/ip) for the vserver.
Previously i always shut down the uml and use the same ip and name for the
vserver. Now i changed these settings.
I changed these to "thor2":
/etc/vservers/thor/uts/nodename
/etc/vservers/thor/name

I also changed the /etc/resolv.conf in this vserver to this:
domain xyz
nameserver 192.168.1.25
nameserver 127.0.0.1

where 192.168.1.25 is the vservers own ip adres (the new one, old one is
.20) Then i restarted the vserver 5 times and all 5 times dns seems to
work like it should.

Thanks,
Benedict

=========================================================================
My wireless router has the ip 192.168.0.1
The wireless bridge attached to eth0 has ip 192.168.0.4
eth0 of the host has ip 192.168.0.2
eth1 of the host has ip 192.168.1.1
(bridge br0 gets this ip when i start teh bridging utils)
The uml with djbdns has ip 192.168.1.20 and the vserver had this ip too
as i never started them both at the same time.
When i did so i changed the ip of the vserver to 192.168.1.25

IFCONFIG HOST
=============
br0 Link encap:Ethernet HWaddr 00:10:B5:40:DD:EE
          inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:2857 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:291940 (285.0 KiB) TX bytes:0 (0.0 b)

eth0 Link encap:Ethernet HWaddr 00:10:B5:40:DE:14
          inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:64372 errors:0 dropped:0 overruns:0 frame:0
          TX packets:68799 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:41328067 (39.4 MiB) TX bytes:7599446 (7.2 MiB)
          Interrupt:10 Base address:0x9400

eth1 Link encap:Ethernet HWaddr 00:10:B5:40:DD:EE
          UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
          RX packets:21119 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17425 errors:0 dropped:0 overruns:0 carrier:0
          collisions:36 txqueuelen:1000
          RX bytes:1956692 (1.8 MiB) TX bytes:17260364 (16.4 MiB)
          Interrupt:11 Base address:0x9000

eth0:frey Link encap:Ethernet HWaddr 00:10:B5:40:DE:14
          inet addr:192.168.1.22 Bcast:192.168.1.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          Interrupt:10 Base address:0x9400

eth0:loki Link encap:Ethernet HWaddr 00:10:B5:40:DE:14
          inet addr:192.168.1.21 Bcast:192.168.1.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          Interrupt:10 Base address:0x9400

eth0:njor Link encap:Ethernet HWaddr 00:10:B5:40:DE:14
          inet addr:192.168.1.23 Bcast:192.168.1.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          Interrupt:10 Base address:0x9400

eth0:thor Link encap:Ethernet HWaddr 00:10:B5:40:DE:14
          inet addr:192.168.1.25 Bcast:192.168.1.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          Interrupt:10 Base address:0x9400

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:130487 errors:0 dropped:0 overruns:0 frame:0
          TX packets:130487 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:38848193 (37.0 MiB) TX bytes:38848193 (37.0 MiB)

tap0 Link encap:Ethernet HWaddr E6:C1:AE:C7:F0:BE
          UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:436 errors:0 dropped:2421 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b) TX bytes:68855 (67.2 KiB)

tap1 Link encap:Ethernet HWaddr DA:2C:22:1B:B5:B0
          UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:2857 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

tap2 Link encap:Ethernet HWaddr 32:AC:ED:CC:CB:E6
          UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:2857 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

tap3 Link encap:Ethernet HWaddr 76:1D:3F:12:F4:E6
          UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:2857 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

IFCONFIG UML
============
eth0 Link encap:Ethernet HWaddr FE:FD:C0:A8:01:14
          inet addr:192.168.1.20 Bcast:192.168.1.255 Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:442 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:63969 (62.4 KiB) TX bytes:0 (0.0 b)
          Interrupt:5

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:1036 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1036 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:106880 (104.3 KiB) TX bytes:106880 (104.3 KiB)

ROUTE HOST
==========
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.1 * 255.255.255.255 UH 0 0 0 eth0
192.168.0.4 * 255.255.255.255 UH 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 br0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Thu Apr 13 09:15:18 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 13 Apr 2006 - 09:15:28 BST by hypermail 2.1.8