Project

General

Profile

Bug #2875

local zones should not enforce "smf_netstrategy==none" regardless of reality

Added by Jim Klimov over 8 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
2012-06-14
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

In the SMF framework, local zones can not use netstrategy=dhcp (and, as a consequence, they don't try fetch DNS settings from DHCP) due to this definition in /lib/svc/share/smf_include.sh:

#   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
...

There are some other SMF scripts as well which assume and "enforce" that a local zone always has a "none" netstrategy (search should be done for cases of "$_INIT_NET_STRATEGY==none" and calls to smf_netstrategy() routine).

This does make sense for shared-IP zones, but for exclusive-IP ones which can be DHCP clients indeed, this seems wrong (and further on forbids configuration of DNS resolver (resolv.conf, nsswitch.conf) from DHCP data via svc:/network/service:default method script /lib/svc/method/net-svc.

In my limited testing on oi_151a3 and an older SXCE, "/sbin/netstrategy" returns properly valid values for different local zone networking configurations, and can be trusted.

The zone's current "ip-type" can be queried with undocumented (bug #2851) command "zonename -t".

I intend to fix the issue myself, though help/suggestions won't be rejected ;)
I've started a thread on the mailing list (also touching on some other related issues), but so far got no answers, here: http://www.mail-archive.com/openindiana-discuss@openindiana.org/msg08029.html

Also available in: Atom PDF