[oi-dev] Bug in smf_netstrategy ?

Jim Klimov jimklimov at cos.ru
Fri Nov 29 16:47:52 UTC 2013


The smf_netstrategy() routine by design bails out if executed in a
local zone /lib/svc/share/smf_include.sh:

# smf_netstrategy
#   -> (_INIT_NET_IF, _INIT_NET_STRATEGY)
#
#   Sets _INIT_NET_IF to the name for the network-booted
#   interface if we are booting from the network.  _INIT_NET_STRATEGY is
#   assigned the value of the current network configuration strategy.
#   Valid values for _INIT_NET_STRATEGY are "none", "dhcp", and "rarp".
#
#   The network boot strategy for a zone is always "none".
#
smf_netstrategy () {
         if smf_is_nonglobalzone; then
                 _INIT_NET_STRATEGY="none" export _INIT_NET_STRATEGY
                 return 0
         fi
...


As I poster earlier in the Wiki and on the list, this presents a
problem for some auto-configuration of local zones which boot with
DHCP and might get configuration parameters from DHCP options,
such as the hostname and DNS config - but these paths in their
SMF methods are cut off by checking with this routine.

Can someone shed a some light on why this check is done so, and
if it really needs to remain in place?

In particular, it is possible to test if we are in a zone and
test its IP stack type (shared or exclusive), and bail out of
this test only in case of a shared-stack local zone. Is it an
acceptable solutions, or are some things know/expected to break?



My earlier posts on this matter:

https://www.illumos.org/issues/2875

http://openindiana.org/pipermail/openindiana-discuss/2012-June/008315.html
http://openindiana.org/pipermail/openindiana-discuss/2012-June/008317.html
http://openindiana.org/pipermail/openindiana-discuss/2012-June/008319.html

http://wiki.openindiana.org/oi/Using+host-only+networking+to+get+from+build+zones+and+test+VMs+to+the+Internet

Thanks,
//Jim Klimov




More information about the oi-dev mailing list