dhcp in Solaris Zones

advertisement
Solaris Zones - dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Back to Forum Feedback About Forums
This topic has 11 replies on 1 page.
E-mail this Topic
latp2006
Posts:86
Registered:
7/28/06
Watch this topic
dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Nov 14, 2007 2:28 AM
hello all,
i have a t2000 with S10 08/07 and want to dedicate a zone to dhcpd
service.
This zone was configured according to:
http://docs.sun.com/app/docs/doc/819-2450/z.config.ov-1?a=view
t2000-root% zonecfg -z dhcp export
...
set ip-type=exclusive
...
add net
set physical=e1000g2
end
...
t2000-root% dladm show-link
e1000g2 type: non-vlan mtu: 1500 device: e1000g2
t2000-root% dladm show-linkprop
LINK PROPERTY VALUE DEFAULT POSSIBLE
e1000g2 zone dhcp -- -but when i launch the service:
/opt/csw/sbin/dhcpd -cf /etc/dhcpd.conf -lf /etc/dhcpd.leases -q e1000g2
i got this error:
Nov 13 17:59:53 mary dhcpd: Can't open DLPI device for e1000g2: No
such file or directory
When i truss the process dhcpd, i notice this error:
"open("/dev/e1000g", O_RDWR) Err#2 ENOENT "
Reply »
these file doesn't exist in the zone.
mary-root% ls -l /dev/e1000g*
crw-rw-rw- 1 root root 83, 3 Nov 14 08:12 /dev/e1000g2
when ISC dhcpd is running into a global zone:
fury-root% pargs 2179
2179: /opt/csw/sbin/dhcpd -cf /etc/dhcpd.conf -lf /etc/dhcpd.leases -q
e1000g0 e1000g
argv[0]: /opt/csw/sbin/dhcpd
argv[1]: -cf
argv[2]: /etc/dhcpd.conf
argv[3]: -lf
argv[4]: /etc/dhcpd.leases
argv[5]: -q
argv[6]: e1000g0
argv[7]: e1000g2
fury-root% pfiles 2179
...
8: S_IFCHR mode:0000 dev:301,0 ino:1079 uid:0 gid:0 rdev:100,1001
O_RDWR FD_CLOEXEC
/devices/pseudo/clone@0:e1000g
9: S_IFCHR mode:0000 dev:301,0 ino:3582 uid:0 gid:0 rdev:100,1060
O_RDWR FD_CLOEXEC
/devices/pseudo/clone@0:e1000g
what's the relation between e1000g0/2 and
/devices/pseudo/clone@0:e1000g?
Finally, i'm trying to install Sun dhcp in this zone, and got this error:
[ Nov 14 11:19:35 Executing start method ("/usr/lib/inet/in.dhcpd") ]
svc.startd could not set context for method: setppriv: Not owner
[ Nov 14 11:19:35 Method "start" exited with status 96 ]
So any chance to have ISC dhcpd in zone? Hacking is necessary?
thanks in advance for help,
gerard
John.Kotches
Posts:347
Registered:
9/14/07
Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Nov 15, 2007 6:27 AM (reply 1 of 11) (In reply to original post )
When you added e1000g2 to the zones configuration you did add IP
address information correct?
Reply »
If not; you might want to add it so that e1000g2 will plumb and come up.
Cheers,
pitz
Posts:2
Registered:
11/24/07
Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Nov 24, 2007 4:06 AM (reply 2 of 11) (In reply to #1 )
I have the same problem.
And it makes no difference if i plumb or unplumb with up or down in the
global zone, befor booting the zone.
Any ideas?
Greetings Pitz
I created a Zone with
set ip-type=exclusive [...]
set physical=nge71000
than i configured the sun-dhcpd. But when starting i get:
maintenance
12:48:38 svc:/network/dhcp-server:default
and
root@wlan-A01:/root> svcs -xv
svc:/network/dhcp-server:default (DHCP server)
State: maintenance since Sat Nov 24 12:48:38 2007
Reason: Start method exited with $SMF_EXIT_ERR_CONFIG.
See: http://sun.com/msg/SMF-8000-KS
See: man -M /usr/share/man -s 1M in.dhcpd
See: /var/svc/log/network-dhcp-server:default.log
Impact: This service is not running.
The log says:
[ Nov 23 17:34:08 Enabled. ]
[ Nov 23 17:34:08 Executing start method
("/usr/lib/inet/in.dhcpd") ]
svc.startd could not set context for method:
owner
[ Nov 23 17:34:08 Method "start" exited with
[ Nov 23 17:35:40 Rereading configuration. ]
[ Nov 24 12:48:36 Enabled. ]
[ Nov 24 12:48:38 Executing start method
("/usr/lib/inet/in.dhcpd") ]
svc.startd could not set context for method:
owner
[ Nov 24 12:48:38 Method "start" exited with
setppriv: Not
status 96 ]
setppriv: Not
status 96 ]
Never the less i can start dhcpd in debug mode:
root@wlan-A01:/root> /usr/lib/inet/in.dhcpd -d -v
Reply »
4748108f: Daemon Version: 3.5
4748108f: Maximum relay hops: 4
4748108f: Run mode is: DHCP Server Mode.
4748108f: Datastore resource: SUNWfiles
4748108f: Location: /var/dhcp
4748108f: DHCP offer TTL: 10
4748108f: ICMP validation timeout: 1000 milliseconds,
Attempts: 1.
4748108f: Maximum concurrent clients: 4096
4748108f: Maximum threads: 1024
4748108f: Read 3 entries from DHCP macro database on Sat
Nov 24 12:52:47 2007
4748108f: Monitor (0003/nge71000) started...
4748108f: Thread Id: 0003 - Monitoring Interface: nge71000
*****
4748108f: MTU: 1500
Type: SOCKET
4748108f: Broadcast: 10.0.3.255
4748108f: Netmask: 255.255.252.0
4748108f: Address: 10.0.0.9
47481106: Datagram received on network device:
nge71000(limited broadcast)
47481106: (Error 0) Client: 01001B9E360944 is trying to
renew 10.0.1.56, an IP address it has not leased.
47481108: Datagram received on network device:
nge71000(limited broadcast)
47481108: Unicasting datagram to 10.0.2.8 address.
pitz
Posts:2
Registered:
11/24/07
Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Nov 24, 2007 7:03 AM (reply 3 of 11) (In reply to #2 )
Hi all,
i have a workaround. I just commented out the method_context part in the
/var/svc/manifest/network/dhcp-server.xml file.
<!-<method_context>
<method_credential
user='root'
group='root'
privileges='all'
/>
</method_context>
-->
As the process runs as root anyway it makes no big difference.
privileges='all' seems to make problems.
With that change is is straight forward to set up a dhcp-Server in an
exclusive IP Zone.
But remember that you have to reimport the manifest after your changes:
Reply »
svccfg verify /var/svc/manifest/network/dhcp-server.xml
svccfg import /var/svc/manifest/network/dhcp-server.xml
Greetings Pitz
latp2006
Posts:86
Registered:
7/28/06
Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Nov 25, 2007 9:52 PM (reply 4 of 11) (In reply to #3 )
Reply »
sorry for my late reply, here is the workaround i used:
first using truss to see exactly what's happen, and discover that ISC
dhcpd tries to open /dev/e1000g that doesn't exist into the zone, and
add it with:
zonecfg:dhcp> add device
zonecfg:dhcp:device> set match=/dev/e1000g
zonecfg:dhcp:device> end
For Sun dhcpd, i have to add this param:
zonecfg:dhcp> set limitpriv="default,net_rawaccess"
if you don't want to be annoyed by this problem:
[ Nov 14 11:19:35 Executing start method ("/usr/lib/inet/in.dhcpd") ]
svc.startd could not set context for method: setppriv: Not owner
bvictor
Posts:1
Registered:
7/14/05
Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Nov 26, 2007 10:20 AM (reply 5 of 11) (In reply to #4 )
I have the same errors in solaris exclusive zone
Can't open DLPI device for e1000g120001: No such file or directory
on ISC dhcpd
my zone config
zonename: echidna
zonepath: /opt/zones/Echidna.zone
brand: native
autoboot: true
bootargs: -m verbose
pool:
limitpriv:
scheduling-class: FSS
ip-type: exclusive
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
Reply »
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
net:
address not specified
physical: e1000g119001
net:
address not specified
physical: e1000g120001
device
match: /dev/e1000g
device
match: /dev/e1000g120001
device
match: /dev/e1000g1
Is dhcp works with vlans?
akk_screen_name Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Posts:9
Apr 9, 2008 12:59 AM (reply 6 of 11) (In reply to #5 )
Registered:
10/12/05
I'm running SUN dhcp-server and
I have the same problem with exclusive IP zone and NIC e1000g0.
dhcp-server is running and working in debugging mode but if I use
svcadm enable network/dhcp-server:default
I'm getting the error message
Apr 9 09:30:32 [...] svc.startd[5074]: network/dhcp-server:default
misconfigured: transitioned to maintenance
and in file /var/svc/log/network-dhcp-server:default.log
[ Apr 9 09:48:08 Executing start method ("/usr/lib/inet/in.dhcpd") ]
svc.startd could not set context for method: setppriv: Not owner
[ Apr 9 09:48:08 Method "start" exited with status 96 ]
But nor the solution of pitz (comments in file
/var/svc/manifest/network/dhcp-server.xm) nor
suggested workaround of latp2006
...
Reply »
zonecfg:dhcp> add device
zonecfg:dhcp:device> set match=/dev/e1000g
zonecfg:dhcp:device> end
For Sun dhcpd, i have to add this param:
zonecfg:dhcp> set limitpriv="default,net_rawaccess"
...
worked in my environment. I running the latest Solaris version with all
available patches applied.
Are there any other solutions or workaround for this problem ?
Please help me.
Thanks, a lot for any solutions.
SolarisGuy
Posts:4
Registered:
4/24/08
Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Apr 24, 2008 6:55 PM (reply 7 of 11) (In reply to #4 )
Reply »
Hi,
I have this exact issue but setting the match=/dev/e1000g doesn't help, I
still get the same error.
Is there anything else that i'm missing? The trick of setting
match=/dev/e1000g is just a work around though, shouldn't it just work.
Is there any patch that fixes this issue?
Any help is appreciated.
Thanks!
ogellert
Posts:2
Registered:
10/2/07
Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Apr 25, 2008 6:21 AM (reply 8 of 11) (In reply to #7 )
I guess just changing the zonecfg does not mean that the changes are
really done in the zone. After telling "zonecfg" to add the match entry
nothing changed in the zone. I manually added the device entry in the
zone like that (we are using "ce" interfaces here, but same thing).
In the global zone, have a look at the devices, in my case "ce*" (in your
Reply »
case e1000g*"):
# ls -l /dev/ce*
lrwxrwxrwx 1 root root 28 Apr 1 10:29 /dev/ce ->
../devices/pseudo/clone@0:ce
lrwxrwxrwx 1 root root 44 Apr 15 14:15 /dev/ce1 ->
../devices/pci@1d,700000/pci@1/network@0:ce1
See the device file for "/dev/ce":
# ls -l /devices/pseudo/clone@0:ce
crw------- 1 root sys 11, 86 Apr 1 10:29
/devices/pseudo/clone@0:ce
So we have a character device, using major device number 11 and minor
86. So I create one on the local "dev"
directory of the zone (while being in the global zone):
# mknod /zones/myzonename/dev/ce c 11 86
And now the device entry exists in the zone and the dhcp server starts
successfully.
Hope this helps... Olaf
Darren_Dunham Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Posts:3,369
Apr 25, 2008 8:29 AM (reply 9 of 11) (In reply to #8 )
Registered:
8/4/06
ogellert wrote:
I guess just changing the zonecfg does not mean that the changes are
really done in the zone.
Reply »
It should, but there is a bug in the released version of Solaris 10 08/07
where this does not work properly. There is a patch available.
-Darren
SolarisGuy
Posts:4
Registered:
4/24/08
Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Apr 25, 2008 8:43 AM (reply 10 of 11) (In reply to #9 )
What's the patch number Im running sol 10 x86
Reply »
Thanks...
Darren_Dunham Re: dhcpd in exclusive-IP zone: Can't open DLPI device for e1000g2
Posts:3,369
Apr 25, 2008 1:58 PM (reply 11 of 11) (In reply to #10 )
Registered:
8/4/06
I haven't verified, but this was posted on an opensolaris forum:
Reply »
Just as a followup to this thread (I sent another mail to
the alias
as well), I wanted to give a status update. It appears that
this defect
can now be corrected by applying 127111-03 (SPARC) or
125914-01 (x86).
And of course, the workaround is to simply create the devices manually
from the global zone.
-Darren
This topic has 11 replies on 1 page.
Back to Forum
Download