Thanks Dave for taking an interest.

I am wondering what is populating the SI_DHCP_CACHE value in
the kernel cache (that is the one that sysinfo in dhcpagent/dhcp_adopt()
is asking for) Do you know?


For Sparc this seems to be populated from the netdev-path
eeprom variable, but for x64 there is no such thing (I am using
x64 nevada b159 here, but had the same problems with other
builds, e.g. b151a, too).

As far as I found this is where SI_DHCP_CACHE is populated in the
kernel?

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/os/swapgeneric.c
    461 		/*
    462 		 * Fetch the "netdev-path" boot property (if it exists), and
    463 		 * stash it for later use by sysinfo(SI_DHCP_CACHE, ...).
    464 		 */
    465 		proplen = BOP_GETPROPLEN(bootops, "netdev-path");
    466 		if (proplen > 0) {
    467 			netdev_path = kmem_zalloc(proplen, KM_SLEEP);
    468 			if (BOP_GETPROP(bootops, "netdev-path",
    469 			    (uchar_t *)netdev_path) == -1) {
    470 				cmn_err(CE_WARN, "BOP_GETPROP of  "
    471 				    "\"netdev-path\" failed\n");
    472 				kmem_free(netdev_path, proplen);
    473 				goto out;
    474 			}
    475 		}

I am not very good with all the kernel source code. If you
have any insight how this is supposed to work that would be super.

Right now, I am wondering if this is even a bug. There are not
that many people doing diskless netboots that rely on "dhcpagent -a"
to hold the network address it seems.

On my sparc miniroot this all works fine, but on my x64 miniroot
the "dhcpagent -a" run (from /lib/svc/method/net-physical) will *try* 
to adopt the interface (for 15 seconds or so) and then just die -
with an exit status of 0!!! 

Running dhcpagent without the -a flag will work though and this
is my workaround for now. Note however, that the net-physical
SMF service will only start it with the -a flag, so this is
unrealiable. And because of the clean 0 exit status SMF won't
pick it up as a failure either, I guess.


[email protected]:/etc/dhcp# /sbin/dhcpagent -a
Mar 15 04:00:58 192.168.4.107 /sbin/dhcpagent[1237]: dhcp_adopt: cannot fetch kernel cache
<15 or so seconds later>

[email protected]:/etc/dhcp# echo $?  
0                <--- NOTE the 0 exit status even though it failed
             
[email protected]:/etc/dhcp# ps -ef | grep dhcpagent | grep -v grep    

[email protected]:/etc/dhcp# /sbin/dhcpagent
[email protected]:/etc/dhcp# ps -ef | grep dhcpagent | grep -v grep
    root  1248     1   0 04:05:28 ?           0:00 /sbin/dhcpagent


I think I would already be happy if somebody could confirm that
in a recent nevada build the "dhcpagent -a" does REALLY work with a netboot
for them and not just die with this 0 exit status like it does for
me. At least then I would know for sure the problem has to do somewhat 
with my customizations.

I appreciate any insight you might have - or even if you can point
me to an engineer who works the dhcpagent side of the kernel source

Thanks so much for replying at all,

 --Marcus




Dave Miner wrote on 03/14/11 19:59:
On 03/11/11 10:18 AM, Marcus Heine wrote:

Hi everybody,

I am working on a customized x64 miniroot for install/network boot and
with it get
a dhcpagent error like this when the net-physical SMF service starts up:

# /sbin/dhcpagent -a -d 9
Mar 11 08:06:03 192.168.4.107 /sbin/dhcpagent[1394]: dhcp_adopt: cannot
fetch kernel cache

The DHCP interface gets DHCP-configured correctly though:

e1000g1: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4>  mtu
1500 index 5
          inet 192.168.4.107 netmask ffffff00 broadcast 192.168.4.255
          ether 0:14:4f:49:d6:1b

I looked far and wide, but cannot figure out why dhcp_adopt should not be
able to fetch its parameter from the kernel cache.

Any good ideas how to debug this further or what could be the cause of this?


Pretty unusual, that really shouldn't ever fail.  I can only speculate maybe there's an enumeration mismatch that's confusing the sysinfo() call that dhcpagent uses to retrieve the cache.

Dave
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to