From gjelinek@sac.sfbay.sun.com Wed Jul 21 14:38:06 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6LLc6KD024584
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 21 Jul 2010 14:38:06 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6LLc2iH000746;
	Wed, 21 Jul 2010 16:38:06 -0500 (CDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5X00601G3H6300@nwk-avmta-2.sfbay.sun.com>; Wed,
 21 Jul 2010 14:38:05 -0700 (PDT)
Received: from dm-sfbay-01.sfbay.sun.com ([129.145.155.118])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5X005ICG3HH800@nwk-avmta-2.sfbay.sun.com>; Wed,
 21 Jul 2010 14:38:05 -0700 (PDT)
Received: from sac.sfbay.sun.com (sac.SFBay.Sun.COM [10.5.240.67])
	by dm-sfbay-01.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4)
 with ESMTP id o6LLc4PV017203; Wed, 21 Jul 2010 14:38:04 -0700 (PDT)
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6LLc4gd024552; Wed,
 21 Jul 2010 14:38:04 -0700 (PDT)
Received: (from gjelinek@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id o6LLc4p9024548; Wed,
 21 Jul 2010 14:38:04 -0700 (PDT)
Date: Wed, 21 Jul 2010 14:38:04 -0700 (PDT)
From: Gerald Jelinek <gjelinek@sac.sfbay.sun.com>
Subject: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
To: PSARC-ext@sun.com
Cc: jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com,
        robert.gordon@oracle.com
Message-id: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
Status: RO
Content-Length: 3660

I'm sponsoring this fast-track for Robert Gordon.

Thanks,
Jerry

Template Version: @(#)sac_nextcase 1.70 03/30/10 SMI
This information is Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
1. Introduction
    1.1. Project/Component Working Name:
	 NFS Instances
    1.2. Name of Document Author/Supplier:
	 Author:  Robert Gordon
    1.3  Date of This Document:
	21 July, 2010
4. Technical Description

Patch binding is requested; however, there are no plans to backport any of
the proposed changes.

The proposed changes are needed to support an NFS server in a non-global
zone; however, the changes are not specific to NFS. They would also be used
when enabling any file sharing protocol (ie. CIFS) server for non-global zones.

PRIV_SYS_SHARE 
--------------

Establishing an NFS or CIFS share requires full root privileges; however,
within a non-global zone, full privileges are not permitted. A new system
privilege PRIV_SYS_SHARE is proposed, and is enforced in sharefs when
adding or removing shares.

PRIV_SYS_SHARE can be assigned to a zone, and it is enabled by default for
root users in both global and non-global zones.  It can also be assigned to
Non-privileged users.

With PRIV_SYS_SHARE, a global zone administrator may allow or prohibit
sharing from any protocol (CIFS, NFS) in any zone (global or non-global).
Enforcement of the protocol-specific privileges (PRIV_SYS_NFS and
PRIV_SYS_SMB) will not be changed.  To establish a share, both
PRIV_SYS_SHARE and the protocol-specific privilege are required.


VFS Share Ownership and References
----------------------------------

A file system may only be shared by a single NFS server instance.

File systems are assigned to zones with "add_dataset" and "add_fs" zone
config resources.  The assigned file systems are only mounted in their zone,
and therefore can only be shared by the NFS server running in the zone.

However, a zone's root dataset is problematic because it is mounted both
within the global zone and its non-global zone.  To ensure that a file
system can never be shared by multiple NFS server instances, the notion of
VFS share ownership is introduced.

Enforcement of VFS share ownership prevents the global zone from sharing an
active non-global zone's root dataset.

Two new vfs_t fields (vfs_share_owner, vfs_share_count) are used to track
VFS shares and VFS share ownership they are managed by using the following
interfaces:

   int  vfs_share_ref(vfs_t *, zone_t *);
   void vfs_share_unref(vfs_t *, zone_t *);

For each share, the NFS server establishes a share reference on the VFS
containing the shared object. The reference is removed when the object is
unshared. VFS share reference and VFS ownership changes are coordinated with
a new vfs_t lock: vfs_share_owner_lock.

If the zone_t * argument for vfs_share_ref() is not the current zone owner
of the VFS, EPERM is returned, otherwise the reference count is bumped and
optionally sets ownership.

Zone boot fails if share references exist on its root dataset VFS with EBUSY.


EXPORTED INTERFACES:

			|Proposed	|Specified	|
			|Stability	|in what	|
Interface Name		|Classification |Document?	| Comments
===============================================================================
			|		|		|
  PRIV_SYS_SHARE	|Committed	|This		| Share Privilege 
			|		|Document	|
			|		|		|
  vfs_share_ref()	|Consolidation	|This		| VFS
  vfs_share_unref()	|Private	|Document	| Share Ownership.
			|		|		|
			|		|		|


6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: FastTrack
    6.6. ARC Exposure: open


From Afshin.Salek@oracle.com Wed Jul 21 15:13:09 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6LMD947025330
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 21 Jul 2010 15:13:09 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6LMD5LR015224;
	Wed, 21 Jul 2010 17:13:08 -0500 (CDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5X00A0XHPWN300@brm-avmta-1.central.sun.com>; Wed,
 21 Jul 2010 16:13:08 -0600 (MDT)
Received: from sca-ea-mail-3.sun.com ([192.18.43.21])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5X00GUEHPUE4E0@brm-avmta-1.central.sun.com>; Wed,
 21 Jul 2010 16:13:07 -0600 (MDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by sca-ea-mail-3.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6LMD6no026472;
 Wed, 21 Jul 2010 22:13:06 +0000 (GMT)
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6LKboC5014945; Wed, 21 Jul 2010 22:13:05 +0000 (GMT)
Received: from abhmt014.oracle.com by acsmt355.oracle.com	with ESMTP id
 447300281279750267; Wed, 21 Jul 2010 15:11:07 -0700
Received: from [10.1.106.212] (/10.1.106.212)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Wed,
 21 Jul 2010 15:11:06 -0700
Date: Wed, 21 Jul 2010 15:10:44 -0700
From: Afshin Salek <Afshin.Salek@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
To: Gerald Jelinek <gjelinek@sac.sfbay.sun.com>
Cc: PSARC-ext@sun.com, rich.brown@oracle.com, nfs-instance@sun.com,
        robert.gordon@oracle.com, jerry.jelinek@oracle.com
Message-id: <4C477064.40305@Oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090205.4C4770F1.026B:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.7) Gecko/20100214
 Lightning/1.0b1 Thunderbird/3.0.1
Status: RO
Content-Length: 476

>
> PRIV_SYS_SHARE
> --------------
>
> Establishing an NFS or CIFS share requires full root privileges; however,
> within a non-global zone, full privileges are not permitted. A new system
> privilege PRIV_SYS_SHARE is proposed, and is enforced in sharefs when
> adding or removing shares.
>

Right now, sharefs checks for PRIV_SYS_CONFIG. It's not clear whether
this proposal suggests to also check for PRIV_SYS_SHARE or replace
PRIV_SYS_CONFIG with PRIV_SYS_SHARE.

Afshin

From robert.gordon@oracle.com Wed Jul 21 15:21:41 2010
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6LMLfDZ025659
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 21 Jul 2010 15:21:41 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6LMLegG015563;
	Wed, 21 Jul 2010 15:21:41 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5X00B13I44DD00@brm-avmta-1.central.sun.com>; Wed,
 21 Jul 2010 16:21:40 -0600 (MDT)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5X00GANI44EAD0@brm-avmta-1.central.sun.com>; Wed,
 21 Jul 2010 16:21:40 -0600 (MDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6LMLduq012185; Wed,
 21 Jul 2010 22:21:39 +0000 (GMT)
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6LLtLSr001057; Wed, 21 Jul 2010 22:21:36 +0000 (GMT)
Received: from abhmt020.oracle.com by acsmt354.oracle.com	with ESMTP id
 447320821279750837; Wed, 21 Jul 2010 15:20:37 -0700
Received: from [10.0.1.198] (/141.144.120.87)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Wed,
 21 Jul 2010 15:20:36 -0700
Date: Wed, 21 Jul 2010 17:20:34 -0500
From: Robert Gordon <robert.gordon@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <4C477064.40305@Oracle.com>
To: Afshin Salek <Afshin.Salek@oracle.com>
Cc: Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        rich.brown@oracle.com, nfs-instance@sun.com, jerry.jelinek@oracle.com
Message-id: <DCDF13C7-6EF0-4A2A-891D-389BBE2337B9@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090204.4C4772F2.011C:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C477064.40305@Oracle.com>
Status: RO
Content-Length: 667


On Jul 21, 2010, at 5:10 PM, Afshin Salek wrote:

>> 
>> PRIV_SYS_SHARE
>> --------------
>> 
>> Establishing an NFS or CIFS share requires full root privileges; however,
>> within a non-global zone, full privileges are not permitted. A new system
>> privilege PRIV_SYS_SHARE is proposed, and is enforced in sharefs when
>> adding or removing shares.
>> 
> 
> Right now, sharefs checks for PRIV_SYS_CONFIG. It's not clear whether
> this proposal suggests to also check for PRIV_SYS_SHARE or replace
> PRIV_SYS_CONFIG with PRIV_SYS_SHARE.
> 
> Afshin

We shall replace PRIV_SYS_CONFIG with PRIV_SYS_SHARE. I'll update the 
text to be more explicit. 

Thanks.
Robert.

From Darren.Moffat@oracle.com Thu Jul 22 02:40:33 2010
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6M9eXLp007824
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 02:40:33 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6M9eXAi023729;
	Thu, 22 Jul 2010 02:40:33 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00609DJLDI00@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 03:40:33 -0600 (MDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00HLNDJKATE0@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 03:40:32 -0600 (MDT)
Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6M9eWPA006931; Thu,
 22 Jul 2010 09:40:32 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6M7lp99005421; Thu, 22 Jul 2010 09:40:31 +0000 (GMT)
Received: from abhmt021.oracle.com by acsmt355.oracle.com	with ESMTP id
 448796171279791622; Thu, 22 Jul 2010 02:40:22 -0700
Received: from [10.7.251.221] (/10.7.251.221)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 02:40:21 -0700
Date: Thu, 22 Jul 2010 10:40:18 +0100
From: Darren J Moffat <Darren.Moffat@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
To: PSARC-ext@sun.com
Cc: jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com,
        robert.gordon@oracle.com
Message-id: <4C481202.7040402@Oracle.COM>
Organization: Oracle Solaris Security
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090208.4C481210.00CA:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.9) Gecko/20100607
 Lightning/1.0b1 OracleBeehiveExtension/1.0.0.0pre3 Thunderbird/3.0.4
Status: RO
Content-Length: 1137

I'm slightly confused by the case title and content.

The title implies that this case delivers NFS instances, yet the case 
content doesn't seem to be enough for that and is more a dependent 
change to support NFS instances.  Is this case the whole NFS instances 
case ?

> PRIV_SYS_SHARE can be assigned to a zone, and it is enabled by default for
> root users in both global and non-global zones.  It can also be assigned to
> Non-privileged users.

As an aside a nit on terminology:

Privileges are not assigned to users, this is a common misunderstanding 
of RBAC.  Privileges are assigned to processes, usually via an RBAC 
rights profile which maybe assigned to a user or role.  The confusion 
comes from the fact that defaultprivs is allowed to be set in 
user_attr(4), what this is really doing is assigning that set of 
privileges to the users initial program as started by the login program 
(it is really pam_unix_cred that does this).

In generally we don't recommend privileges are assigned to the users 
initial program in user_attr(4) - one useful common exception to that is 
the dtrace privileges.

-- 
Darren J Moffat

From Andrew.Gabriel@oracle.com Thu Jul 22 03:12:36 2010
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MACaDo008343
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 03:12:36 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MACaRS006334;
	Thu, 22 Jul 2010 03:12:36 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00909F10BG00@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 04:12:36 -0600 (MDT)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y0083LF0Z1C10@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 04:12:35 -0600 (MDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MACZE0018094; Thu,
 22 Jul 2010 10:12:35 +0000 (GMT)
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6LEPwvw018703; Thu, 22 Jul 2010 10:12:34 +0000 (GMT)
Received: from abhmt006.oracle.com by acsmt353.oracle.com	with ESMTP id
 426922411279793532; Thu, 22 Jul 2010 03:12:12 -0700
Received: from [81.187.162.109] (/81.187.162.109)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 03:12:11 -0700
Date: Thu, 22 Jul 2010 11:13:06 +0100
From: Andrew Gabriel <Andrew.Gabriel@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
To: Gerald Jelinek <gjelinek@sac.sfbay.sun.com>
Cc: PSARC-ext@sun.com, jerry.jelinek@oracle.com, nfs-instance@sun.com,
        rich.brown@oracle.com, robert.gordon@oracle.com
Message-id: <4C4819B2.7050608@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090201.4C481992.01F4:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090929)
Status: RO
Content-Length: 404

Gerald Jelinek wrote:
> Zone boot fails if share references exist on its root dataset VFS with EBUSY.
>   

This sounds overly restrictive and might unnecessarily bite someone's 
existing infrastructure.
Could you not instead have the sharing of the zone root from inside the 
zone rejected, if it is already shared from the global zone?
That can't break any existing infrastructure.

-- 
Andrew Gabriel

From robert.gordon@oracle.com Thu Jul 22 07:56:01 2010
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MEu173012164
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 07:56:01 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MEu0ma025761;
	Thu, 22 Jul 2010 07:56:01 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00B09S5C8200@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 08:56:00 -0600 (MDT)
Received: from sca-ea-mail-1.sun.com ([192.18.43.24])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y0061HS5COW30@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 08:56:00 -0600 (MDT)
Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by sca-ea-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o6MEtx2v013355;
 Thu, 22 Jul 2010 14:55:59 +0000 (GMT)
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6M6Duc2019781; Thu, 22 Jul 2010 14:55:57 +0000 (GMT)
Received: from abhmt015.oracle.com by acsmt354.oracle.com	with ESMTP id
 427740901279810548; Thu, 22 Jul 2010 07:55:48 -0700
Received: from [10.159.34.27] (/10.159.34.27)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 07:55:48 -0700
Date: Thu, 22 Jul 2010 09:55:46 -0500
From: Robert Gordon <robert.gordon@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <4C481202.7040402@Oracle.COM>
To: Darren J Moffat <Darren.Moffat@oracle.com>
Cc: PSARC-ext@sun.com, jerry.jelinek@oracle.com, nfs-instance@sun.com,
        rich.brown@oracle.com
Message-id: <6CE3E72C-0BEA-4658-AE26-24E64335EF5F@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090206.4C485BFF.0074:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C481202.7040402@Oracle.COM>
Status: RO
Content-Length: 583


On Jul 22, 2010, at 4:40 AM, Darren J Moffat wrote:

> I'm slightly confused by the case title and content.
> 
> The title implies that this case delivers NFS instances, yet the case content doesn't seem to be enough for that and is more a dependent change to support NFS instances.  Is this case the whole NFS instances case ?

:) .. Well, no this is not the whole NFS instance case. These two enhancements are the only items that can be considered independent of NFS instances, that need PSARC approval. 

Thanks for the terminology explanation, i'll update the text. 

Robert.
 

From robert.gordon@oracle.com Thu Jul 22 08:18:11 2010
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MFIAlM012602
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 08:18:11 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.4) with ESMTP id o6MFI9RA003576;
	Thu, 22 Jul 2010 09:18:10 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00811T6ACU00@nwk-avmta-1.sfbay.Sun.COM>; Thu,
 22 Jul 2010 08:18:10 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00GG5T68TF60@nwk-avmta-1.sfbay.Sun.COM>; Thu,
 22 Jul 2010 08:18:08 -0700 (PDT)
Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MFI71d024042; Thu,
 22 Jul 2010 15:18:08 +0000 (GMT)
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MEulro027347; Thu, 22 Jul 2010 15:18:02 +0000 (GMT)
Received: from abhmt007.oracle.com by acsmt353.oracle.com	with ESMTP id
 449663861279811873; Thu, 22 Jul 2010 08:17:53 -0700
Received: from [10.159.34.27] (/10.159.34.27)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 08:17:52 -0700
Date: Thu, 22 Jul 2010 10:17:50 -0500
From: Robert Gordon <robert.gordon@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <4C4819B2.7050608@oracle.com>
To: Andrew Gabriel <Andrew.Gabriel@oracle.com>
Cc: Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090201.4C48612D.0259:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
Status: RO
Content-Length: 813


On Jul 22, 2010, at 5:13 AM, Andrew Gabriel wrote:

> Gerald Jelinek wrote:
>> Zone boot fails if share references exist on its root dataset VFS with EBUSY.
>>  
> 
> This sounds overly restrictive and might unnecessarily bite someone's existing infrastructure.
> Could you not instead have the sharing of the zone root from inside the zone rejected, if it is already shared from the global zone?
> That can't break any existing infrastructure.
> 
> -- 
> Andrew Gabriel


The administrator will need to alter the existing infrastructure. The current zoneadm implementation will unshare the root prior to booting the zone. This simply adds protection to stop the global zone from inadvertently re-sharing, and closes a race between zoneadm unshare and zone boot, since the share ownership will change. 

Robert.

From Andrew.Gabriel@oracle.com Thu Jul 22 08:57:39 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MFvdNp013508
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 08:57:39 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MFvcii013381;
	Thu, 22 Jul 2010 10:57:39 -0500 (CDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00J0JV025J00@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 08:57:38 -0700 (PDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00ICWV01SP10@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 08:57:38 -0700 (PDT)
Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MFva5h026183; Thu,
 22 Jul 2010 15:57:37 +0000 (GMT)
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MFvWEj010356; Thu, 22 Jul 2010 15:57:35 +0000 (GMT)
Received: from abhmt017.oracle.com by acsmt355.oracle.com	with ESMTP id
 449808171279814172; Thu, 22 Jul 2010 08:56:12 -0700
Received: from [81.187.162.109] (/81.187.162.109)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 08:56:11 -0700
Date: Thu, 22 Jul 2010 16:57:06 +0100
From: Andrew Gabriel <Andrew.Gabriel@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
To: Robert Gordon <robert.gordon@oracle.com>
Cc: Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <4C486A52.1000106@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090207.4C486A70.01AB:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com> <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090929)
Status: RO
Content-Length: 1188

Robert Gordon wrote:
> On Jul 22, 2010, at 5:13 AM, Andrew Gabriel wrote:
>
>   
>> Gerald Jelinek wrote:
>>     
>>> Zone boot fails if share references exist on its root dataset VFS with EBUSY.
>>>  
>>>       
>> This sounds overly restrictive and might unnecessarily bite someone's existing infrastructure.
>> Could you not instead have the sharing of the zone root from inside the zone rejected, if it is already shared from the global zone?
>> That can't break any existing infrastructure.
>>
>> -- 
>> Andrew Gabriel
>>     
>
>
> The administrator will need to alter the existing infrastructure. The current zoneadm implementation will unshare the root prior to booting the zone.

No it doesn't (I just tried it).

> This simply adds protection to stop the global zone from inadvertently re-sharing, and closes a race between zoneadm unshare and zone boot, since the share ownership will change. 
>   

Sorry, but why is this restriction necessary?
Just let whoever shares it first (global zone, or non-global zone) have 
the share, and deny any attempt to share it by a second NFS instance. I 
can' see any need for changing or removing the current behavior.

-- 
Andrew Gabriel

From robert.gordon@oracle.com Thu Jul 22 09:35:06 2010
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MGZ6w5014239
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 09:35:06 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail2sca.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MGZ5Vg022191;
	Thu, 22 Jul 2010 09:35:05 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00L1ZWQH9800@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 09:35:05 -0700 (PDT)
Received: from sca-ea-mail-1.sun.com ([192.18.43.24])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00IE9WQGSP50@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 09:35:04 -0700 (PDT)
Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by sca-ea-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o6MGYwlh008474;
 Thu, 22 Jul 2010 16:34:59 +0000 (GMT)
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MGYv58027339; Thu, 22 Jul 2010 16:34:57 +0000 (GMT)
Received: from abhmt009.oracle.com by acsmt355.oracle.com	with ESMTP id
 449955191279816488; Thu, 22 Jul 2010 09:34:48 -0700
Received: from [10.0.1.198] (/141.144.122.24)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 09:34:47 -0700
Date: Thu, 22 Jul 2010 11:34:44 -0500
From: Robert Gordon <robert.gordon@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <4C486A52.1000106@oracle.com>
To: Andrew Gabriel <Andrew.Gabriel@oracle.com>
Cc: Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090209.4C487332.017B:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com> <4C486A52.1000106@oracle.com>
Status: RO
Content-Length: 849


On Jul 22, 2010, at 10:57 AM, Andrew Gabriel wrote:

> Sorry, but why is this restriction necessary?

The team thought that if an administrator created a zone to partition data with the intent to share data from that zone, allowing another zone to share it's root, probably didn't make sense. 

Are you saying that this is something we should not actively prohibit ? 

> Just let whoever shares it first (global zone, or non-global zone) have the share, and deny any attempt to share it by a second NFS instance. I can' see any need for changing or removing the current behavior.

There isn't really any current behavior with respect to sharing in a zone :)

I understand what you are saying and the zone boot restriction can be removed, 
it doesn't effect the proposed new interfaces. My concern is inadvertent 
"zone data leakage" ... 

Robert. 

From johnlev@barman.uk.sun.com Thu Jul 22 09:50:05 2010
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MGo5CQ014567
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 09:50:05 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.4) with ESMTP id o6MGo4HX060885;
	Thu, 22 Jul 2010 10:50:04 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00L09XFGXQ00@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 09:50:04 -0700 (PDT)
Received: from dm-uk-02.uk.sun.com ([129.156.101.196])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00IHZXFFSW70@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 09:50:03 -0700 (PDT)
Received: from barman.uk.sun.com (barman.UK.Sun.COM [129.156.132.12])
	by dm-uk-02.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4)
 with ESMTP id o6MGo0Tg006028; Thu, 22 Jul 2010 17:50:00 +0100 (BST)
Received: from johnlev by barman.uk.sun.com with local (Exim 4.42)
	id 1Obyrq-0004Rb-Mx; Thu, 22 Jul 2010 17:43:30 +0100
X-URL: http://jurassic.eng/~johnlev/
Date: Thu, 22 Jul 2010 17:43:30 +0100
From: John Levon <john.levon@sun.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
Sender: John Levon <johnlev@barman.uk.sun.com>
To: Robert Gordon <robert.gordon@oracle.com>
Cc: Andrew Gabriel <Andrew.Gabriel@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <20100722164330.GA16142@barman.uk.sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com> <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
User-Agent: Mutt/1.5.6i
Status: RO
Content-Length: 540

On Thu, Jul 22, 2010 at 11:34:44AM -0500, Robert Gordon wrote:

> > Sorry, but why is this restriction necessary?
> 
> The team thought that if an administrator created a zone to partition
> data with the intent to share data from that zone, allowing another
> zone to share it's root, probably didn't make sense. 
> 
> Are you saying that this is something we should not actively prohibit
> ? 

At the very least, it's very useful for testing: you can get to zone
data remotely without having to give the zone an IP address.

regards
john

From Nicolas.Williams@oracle.com Thu Jul 22 09:53:13 2010
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MGrDkF014601
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 09:53:13 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail2sca.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MGr6hw000162;
	Thu, 22 Jul 2010 09:53:13 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00L15XKO8O00@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 10:53:12 -0600 (MDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y006EWXKLOMA0@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 10:53:09 -0600 (MDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MGr95C002072; Thu,
 22 Jul 2010 16:53:09 +0000 (GMT)
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MAtoBc031105; Thu, 22 Jul 2010 16:53:03 +0000 (GMT)
Received: from abhmt002.oracle.com by acsmt353.oracle.com	with ESMTP id
 450018081279817521; Thu, 22 Jul 2010 09:52:01 -0700
Received: from oracle.com (/129.153.128.104)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 09:51:59 -0700
Date: Thu, 22 Jul 2010 11:52:12 -0500
From: Nicolas Williams <Nicolas.Williams@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
To: Robert Gordon <robert.gordon@oracle.com>
Cc: Andrew Gabriel <Andrew.Gabriel@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <20100722165210.GI23748@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090205.4C487772.00F5:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com> <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
User-Agent: Mutt/1.5.20 (2010-03-02)
Status: RO
Content-Length: 1052

On Thu, Jul 22, 2010 at 11:34:44AM -0500, Robert Gordon wrote:
> There isn't really any current behavior with respect to sharing in a
> zone :)
> 
> I understand what you are saying and the zone boot restriction can be
> removed, it doesn't effect the proposed new interfaces. My concern is
> inadvertent "zone data leakage" ... 

I think there is a compatibility issue.  Prior to this project the g-z
could share a zone's resources, now either, but not both of the g-z and
the ngz will be able to share a zone's resources.  Thus if a conflicting
share exists in the g-z then the ngz will not be able to share the same
resource (with what error message?), or, alternatively, the g-z will not
be able to ever share what it used to be able to (incompatible change).

Given the importance of this feature I don't really care which
incompatible behavior results :)  It does seem to me that preventing the
booting of a zone whose resources are shared by the g-z is a good idea,
along with preventing the g-z from sharing a booted ngz's resources.

Nico
-- 

From Darren.Moffat@oracle.com Thu Jul 22 09:57:38 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MGvcoj014900
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 09:57:38 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MGvbmg015138;
	Thu, 22 Jul 2010 11:57:37 -0500 (CDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00M01XS19500@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 09:57:37 -0700 (PDT)
Received: from sca-ea-mail-4.sun.com ([192.18.43.22])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00I0HXS0ST80@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 09:57:36 -0700 (PDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by sca-ea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MGvap8014557;
 Thu, 22 Jul 2010 16:57:36 +0000 (GMT)
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MF5aks026776; Thu, 22 Jul 2010 16:57:34 +0000 (GMT)
Received: from abhmt015.oracle.com by acsmt354.oracle.com	with ESMTP id
 428190851279817848; Thu, 22 Jul 2010 09:57:28 -0700
Received: from [10.7.251.221] (/10.7.251.221)
 by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu,
 22 Jul 2010 09:57:25 -0700
Date: Thu, 22 Jul 2010 09:57:22 -0700 (PDT)
From: Darren J Moffat <Darren.Moffat@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <20100722165210.GI23748@oracle.com>
To: Nicolas Williams <Nicolas.Williams@oracle.com>
Cc: Robert Gordon <robert.gordon@oracle.com>,
        Andrew Gabriel <Andrew.Gabriel@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <4C487872.5010805@Oracle.COM>
Organization: Oracle Solaris Security
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090206.4C48787E.01A7:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com>
 <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
 <20100722165210.GI23748@oracle.com>
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.9) Gecko/20100607
 Lightning/1.0b1 OracleBeehiveExtension/1.0.0.0pre3 Thunderbird/3.0.4
Status: RO
Content-Length: 781

On 22/07/2010 17:52, Nicolas Williams wrote:
> On Thu, Jul 22, 2010 at 11:34:44AM -0500, Robert Gordon wrote:
>> There isn't really any current behavior with respect to sharing in a
>> zone :)
>>
>> I understand what you are saying and the zone boot restriction can be
>> removed, it doesn't effect the proposed new interfaces. My concern is
>> inadvertent "zone data leakage" ...
>
> I think there is a compatibility issue.  Prior to this project the g-z
> could share a zone's resources, now either, but not both of the g-z and

And TX actually depends on that behaviour today, on the other hand once 
we do have NFS servers within a zone then TX could migrate to using that 
instead (because that is what it is currently providing the illusion of 
anyway).

-- 
Darren J Moffat

From Andrew.Gabriel@oracle.com Thu Jul 22 10:05:22 2010
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MH5Mo3015099
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 10:05:22 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail2sca.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MH5K36005343;
	Thu, 22 Jul 2010 10:05:22 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00M0BY4YAS00@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 11:05:22 -0600 (MDT)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y006E3Y4XOKC0@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 11:05:21 -0600 (MDT)
Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MH5KRU007944; Thu,
 22 Jul 2010 17:05:20 +0000 (GMT)
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MH5IS5028914; Thu, 22 Jul 2010 17:05:18 +0000 (GMT)
Received: from abhmt006.oracle.com by acsmt353.oracle.com	with ESMTP id
 428206221279818216; Thu, 22 Jul 2010 10:03:36 -0700
Received: from [81.187.162.109] (/81.187.162.109)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 10:03:35 -0700
Date: Thu, 22 Jul 2010 18:04:31 +0100
From: Andrew Gabriel <Andrew.Gabriel@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
To: Robert Gordon <robert.gordon@oracle.com>
Cc: Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <4C487A1F.2050708@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090201.4C487A50.0055:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com> <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090929)
Status: RO
Content-Length: 1645

Robert Gordon wrote:
> On Jul 22, 2010, at 10:57 AM, Andrew Gabriel wrote:
>
>   
>> Sorry, but why is this restriction necessary?
>>     
>
> The team thought that if an administrator created a zone to partition data with the intent to share data from that zone, allowing another zone to share it's root, probably didn't make sense. 
>
> Are you saying that this is something we should not actively prohibit ?
>   

Let the administrator decide. All you achieve by adding arbitrary 
restrictions is you will prevent someone from using Zones to solve an 
issue they have, for which Zones would otherwise have been ideal, and 
everyone loses. There are plenty of other reasons to use Zones which are 
nothing to do with partitioning data.

If I understood correctly that there's some technical reason a directory 
can't be shared by more than one NFS instance, then check for just that. 
Don't add other unnecessary restrictions, particularly ones which break 
current functionality which people may be using.

>> Just let whoever shares it first (global zone, or non-global zone) have the share, and deny any attempt to share it by a second NFS instance. I can' see any need for changing or removing the current behavior.
>>     
>
> There isn't really any current behavior with respect to sharing in a zone :)
>   

Well, there is. If you're changing it, then you need to make that clear.

> I understand what you are saying and the zone boot restriction can be removed, 
> it doesn't effect the proposed new interfaces. My concern is inadvertent 
> "zone data leakage" ... 
>   

Explicitly sharing data isn't inadvertent.

-- 
Andrew Gabriel

From robert.gordon@oracle.com Thu Jul 22 10:15:43 2010
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MHFhRm015319
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 10:15:43 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.4) with ESMTP id o6MHFe5m009289;
	Thu, 22 Jul 2010 11:15:42 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00N0DYM64D00@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 10:15:42 -0700 (PDT)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00I6XYM5SUB0@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 10:15:42 -0700 (PDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MHFfea013808; Thu,
 22 Jul 2010 17:15:41 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MDsvpS003616; Thu, 22 Jul 2010 17:15:39 +0000 (GMT)
Received: from abhmt001.oracle.com by acsmt355.oracle.com	with ESMTP id
 450094591279818911; Thu, 22 Jul 2010 10:15:11 -0700
Received: from [10.0.1.198] (/141.144.122.24)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 10:15:11 -0700
Date: Thu, 22 Jul 2010 12:15:04 -0500
From: Robert Gordon <robert.gordon@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <4C487A1F.2050708@oracle.com>
To: Andrew Gabriel <Andrew.Gabriel@oracle.com>
Cc: Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <74DD156F-8309-4B0B-AAAA-C91131E7909A@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090204.4C487CBC.0072:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com>
 <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com> <4C487A1F.2050708@oracle.com>
Status: RO
Content-Length: 231


On Jul 22, 2010, at 12:04 PM, Andrew Gabriel wrote:

> 
> Let the administrator decide.

okay. 

This "Zone boot fails if share references exist on its root dataset VFS with EBUSY." will be removed from the fast track. 

Robert. 

From Nicolas.Williams@oracle.com Thu Jul 22 10:16:09 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MHG8E4015338
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 10:16:08 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MHG79t023633;
	Thu, 22 Jul 2010 12:16:08 -0500 (CDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00N0JYMV5400@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 10:16:07 -0700 (PDT)
Received: from sca-ea-mail-2.sun.com ([192.18.43.25])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00I6XYMVST90@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 10:16:07 -0700 (PDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by sca-ea-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o6MHG1X9017887;
 Thu, 22 Jul 2010 17:16:01 +0000 (GMT)
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MA1v4s005668; Thu, 22 Jul 2010 17:15:50 +0000 (GMT)
Received: from abhmt007.oracle.com by acsmt355.oracle.com	with ESMTP id
 450092831279818879; Thu, 22 Jul 2010 10:14:39 -0700
Received: from oracle.com (/129.153.128.104)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 10:14:38 -0700
Date: Thu, 22 Jul 2010 12:14:51 -0500
From: Nicolas Williams <Nicolas.Williams@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <4C487872.5010805@Oracle.COM>
To: Darren J Moffat <Darren.Moffat@oracle.com>
Cc: Robert Gordon <robert.gordon@oracle.com>,
        Andrew Gabriel <Andrew.Gabriel@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <20100722171451.GC24773@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090205.4C487CD0.00B4:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com>
 <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
 <20100722165210.GI23748@oracle.com> <4C487872.5010805@Oracle.COM>
User-Agent: Mutt/1.5.20 (2010-03-02)
Status: RO
Content-Length: 1235

On Thu, Jul 22, 2010 at 09:57:22AM -0700, Darren J Moffat wrote:
> On 22/07/2010 17:52, Nicolas Williams wrote:
> > On Thu, Jul 22, 2010 at 11:34:44AM -0500, Robert Gordon wrote:
> >> There isn't really any current behavior with respect to sharing in a
> >> zone :)
> >>
> >> I understand what you are saying and the zone boot restriction can be
> >> removed, it doesn't effect the proposed new interfaces. My concern is
> >> inadvertent "zone data leakage" ...
> >
> > I think there is a compatibility issue.  Prior to this project the g-z
> > could share a zone's resources, now either, but not both of the g-z and
> 
> And TX actually depends on that behaviour today, on the other hand once 
> we do have NFS servers within a zone then TX could migrate to using that 
> instead (because that is what it is currently providing the illusion of 
> anyway).

Is TX still exclusive of exclusive-IP zones?  It'd be nice if one could
run non-TX zones under TX, which would necessarily mean that such zones
would have to have a single label that they run under to control
interactions with TX zones.  Until TX is sufficiently general I think
this can be papered over: in TX only the g-z should get to share
resources via SMB/NFS.

Nico
-- 

From Nicolas.Williams@Oracle.com Thu Jul 22 10:26:25 2010
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MHQOaO015579
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 10:26:24 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.4) with ESMTP id o6MHPxnD015326;
	Thu, 22 Jul 2010 11:26:24 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y0001TZ3ZFX00@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 10:26:23 -0700 (PDT)
Received: from sca-ea-mail-4.sun.com ([192.18.43.22])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00IUAZ3ZST90@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 10:26:23 -0700 (PDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by sca-ea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MHQMfY029268;
 Thu, 22 Jul 2010 17:26:22 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MGQi3U026162; Thu, 22 Jul 2010 17:26:20 +0000 (GMT)
Received: from abhmt016.oracle.com by acsmt354.oracle.com	with ESMTP id
 450126301279819495; Thu, 22 Jul 2010 10:24:55 -0700
Received: from oracle.com (/129.153.128.104)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 10:24:54 -0700
Date: Thu, 22 Jul 2010 12:25:03 -0500
From: Nicolas Williams <Nicolas.Williams@Oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <4C487A1F.2050708@oracle.com>
To: Andrew Gabriel <Andrew.Gabriel@Oracle.com>
Cc: Robert Gordon <robert.gordon@Oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@Oracle.com, nfs-instance@sun.com, rich.brown@Oracle.com
Message-id: <20100722172503.GD24773@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090209.4C487F3D.0165:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com>
 <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com> <4C487A1F.2050708@oracle.com>
User-Agent: Mutt/1.5.20 (2010-03-02)
Status: RO
Content-Length: 2489

On Thu, Jul 22, 2010 at 06:04:31PM +0100, Andrew Gabriel wrote:
> Robert Gordon wrote:
> >On Jul 22, 2010, at 10:57 AM, Andrew Gabriel wrote:
> >
> >>Sorry, but why is this restriction necessary?
> >
> >The team thought that if an administrator created a zone to
> >partition data with the intent to share data from that zone,
> >allowing another zone to share it's root, probably didn't make
> >sense.
> >
> >Are you saying that this is something we should not actively prohibit ?
> 
> Let the administrator decide. All you achieve by adding arbitrary
> restrictions is you will prevent someone from using Zones to solve
> an issue they have, for which Zones would otherwise have been ideal,
> and everyone loses. There are plenty of other reasons to use Zones
> which are nothing to do with partitioning data.

At least one restriction is needed: only one of the g-z and ngz can
share any of the ngz's resources.

But because existing systems can only share ngz resources from the g-z
you'll necessarily have to deal with what to do when an ngz tries to
share a resource already shared by the g-z.  The question is: how?

I can see any number of options, such as:

1) Don't allow ngzs to share filesystems unless they've been marked as
   capable of it, which in turn will only happen if the relevant
   datasets have been marked as not shareable by the g-z, which in turn
   can only happen if they aren't shared by the g-z.  Thereafter you
   could not share that ngz's filesystems from the g-z.

2) Don't allow ngzs to share filesystems shared by the g-z.  What error
   will be returned to the ngz sysadmin though?

3) Don't allow the g-z to share filesystems shareable by ngzs.

4) Don't allow booting of ngzs whose datasets are shared by the g-z, and
   don't allow the g-z to share datasets owned by a booted zone.

(1) is fully backwards compatible, but probably requires lots of extra
work.

(2) and (4) are only slightly backwards incompatible, and that
incompatibility strikes me as tolerable.  (4) probably requires
significant extra work too.

(3) Would be a very noticeable, incompatible change.

There may be other options too.

> If I understood correctly that there's some technical reason a
> directory can't be shared by more than one NFS instance, then check
> for just that. Don't add other unnecessary restrictions,
> particularly ones which break current functionality which people may
> be using.

Right, that's (2) above, and it's the simplest option.

Nico
-- 

From robert.gordon@oracle.com Thu Jul 22 10:31:33 2010
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MHVX7e015595
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 10:31:33 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.4) with ESMTP id o6MHV4gK018908;
	Thu, 22 Jul 2010 11:31:33 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00005ZC6PS00@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 10:31:18 -0700 (PDT)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00IP5ZC5SWB0@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 10:31:17 -0700 (PDT)
Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MHVGJr024759; Thu,
 22 Jul 2010 17:31:16 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MHUpdS015125; Thu, 22 Jul 2010 17:31:11 +0000 (GMT)
Received: from abhmt004.oracle.com by acsmt354.oracle.com	with ESMTP id
 450145921279819859; Thu, 22 Jul 2010 10:30:59 -0700
Received: from [10.0.1.198] (/141.144.122.24)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 10:30:58 -0700
Date: Thu, 22 Jul 2010 12:30:54 -0500
From: Robert Gordon <robert.gordon@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <20100722172503.GD24773@oracle.com>
To: Nicolas Williams <Nicolas.Williams@oracle.com>
Cc: Andrew Gabriel <Andrew.Gabriel@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <6D00B5D0-3520-4336-829A-A9BDED4A9D26@Oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090209.4C488062.01D7:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com>
 <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
 <4C487A1F.2050708@oracle.com> <20100722172503.GD24773@oracle.com>
Status: RO
Content-Length: 211


On Jul 22, 2010, at 12:25 PM, Nicolas Williams wrote:

> 
> 2) Don't allow ngzs to share filesystems shared by the g-z.  What error
>   will be returned to the ngz sysadmin though?

Currently EPERM. 

Robert. 

From Nicolas.Williams@oracle.com Thu Jul 22 10:33:47 2010
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MHXlrx015646
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 10:33:47 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail2sca.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MHRO1t013276;
	Thu, 22 Jul 2010 10:33:46 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y0000RZG9TI00@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 10:33:45 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y00IXVZG9SWB0@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 10:33:45 -0700 (PDT)
Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MHXieS028419; Thu,
 22 Jul 2010 17:33:44 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MHXgI0025419; Thu, 22 Jul 2010 17:33:42 +0000 (GMT)
Received: from abhmt010.oracle.com by acsmt354.oracle.com	with ESMTP id
 450154801279820011; Thu, 22 Jul 2010 10:33:31 -0700
Received: from oracle.com (/129.153.128.104)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 10:33:27 -0700
Date: Thu, 22 Jul 2010 12:33:42 -0500
From: Nicolas Williams <Nicolas.Williams@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <6D00B5D0-3520-4336-829A-A9BDED4A9D26@Oracle.com>
To: Robert Gordon <robert.gordon@oracle.com>
Cc: Andrew Gabriel <Andrew.Gabriel@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <20100722173341.GE24773@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090204.4C4880F7.01F7:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com>
 <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
 <4C487A1F.2050708@oracle.com> <20100722172503.GD24773@oracle.com>
 <6D00B5D0-3520-4336-829A-A9BDED4A9D26@Oracle.com>
User-Agent: Mutt/1.5.20 (2010-03-02)
Status: RO
Content-Length: 311

On Thu, Jul 22, 2010 at 12:30:54PM -0500, Robert Gordon wrote:
> On Jul 22, 2010, at 12:25 PM, Nicolas Williams wrote:
> > 2) Don't allow ngzs to share filesystems shared by the g-z.  What error
> >   will be returned to the ngz sysadmin though?
> 
> Currently EPERM. 

OK with me, but I'm not an ARC member :)

From robert.gordon@oracle.com Thu Jul 22 10:36:39 2010
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MHadoS015661
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 10:36:39 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.4) with ESMTP id o6MHadaD022276;
	Thu, 22 Jul 2010 11:36:39 -0600 (MDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00101ZL3UO00@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 11:36:39 -0600 (MDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y006WXZL2OKD0@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 11:36:38 -0600 (MDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MHachZ000731; Thu,
 22 Jul 2010 17:36:38 +0000 (GMT)
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6M3rBhl007561; Thu, 22 Jul 2010 17:36:36 +0000 (GMT)
Received: from abhmt015.oracle.com by acsmt353.oracle.com	with ESMTP id
 428300181279820183; Thu, 22 Jul 2010 10:36:23 -0700
Received: from [10.0.1.198] (/141.144.122.24)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 10:36:22 -0700
Date: Thu, 22 Jul 2010 12:36:20 -0500
From: Robert Gordon <robert.gordon@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <20100722173341.GE24773@oracle.com>
To: Nicolas Williams <Nicolas.Williams@oracle.com>
Cc: Andrew Gabriel <Andrew.Gabriel@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <EEE37032-5648-40EC-B483-DBB23FB46C45@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090203.4C4881A5.01E2:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com>
 <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
 <4C487A1F.2050708@oracle.com> <20100722172503.GD24773@oracle.com>
 <6D00B5D0-3520-4336-829A-A9BDED4A9D26@Oracle.com>
 <20100722173341.GE24773@oracle.com>
Status: RO
Content-Length: 410


On Jul 22, 2010, at 12:33 PM, Nicolas Williams wrote:

> On Thu, Jul 22, 2010 at 12:30:54PM -0500, Robert Gordon wrote:
>> On Jul 22, 2010, at 12:25 PM, Nicolas Williams wrote:
>>> 2) Don't allow ngzs to share filesystems shared by the g-z.  What error
>>>  will be returned to the ngz sysadmin though?
>> 
>> Currently EPERM. 
> 
> OK with me, but I'm not an ARC member :)

you play one on TV right ? 

:-D 

From Andrew.Gabriel@oracle.com Thu Jul 22 10:39:58 2010
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MHdwj3015686
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 10:39:58 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail2sca.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MHdv8I016166;
	Thu, 22 Jul 2010 10:39:58 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00D03ZQJQD00@nwk-avmta-1.sfbay.Sun.COM>; Thu,
 22 Jul 2010 10:39:55 -0700 (PDT)
Received: from sca-ea-mail-1.sun.com ([192.18.43.24])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y0080MZQJN0B0@nwk-avmta-1.sfbay.Sun.COM>; Thu,
 22 Jul 2010 10:39:55 -0700 (PDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by sca-ea-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o6MHdnw1010670;
 Thu, 22 Jul 2010 17:39:49 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6M9hhmu017505; Thu, 22 Jul 2010 17:39:48 +0000 (GMT)
Received: from abhmt003.oracle.com by acsmt355.oracle.com	with ESMTP id
 428309601279820377; Thu, 22 Jul 2010 10:39:37 -0700
Received: from [81.187.162.109] (/81.187.162.109)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 10:39:36 -0700
Date: Thu, 22 Jul 2010 18:40:32 +0100
From: Andrew Gabriel <Andrew.Gabriel@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <20100722172503.GD24773@oracle.com>
To: Nicolas Williams <Nicolas.Williams@oracle.com>
Cc: Robert Gordon <robert.gordon@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <4C488290.1070908@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090208.4C488264.0249:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com>
 <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
 <4C487A1F.2050708@oracle.com> <20100722172503.GD24773@oracle.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090929)
Status: RO
Content-Length: 3621

Nicolas Williams wrote:
> On Thu, Jul 22, 2010 at 06:04:31PM +0100, Andrew Gabriel wrote:
>   
>> Robert Gordon wrote:
>>     
>>> On Jul 22, 2010, at 10:57 AM, Andrew Gabriel wrote:
>>>
>>>       
>>>> Sorry, but why is this restriction necessary?
>>>>         
>>> The team thought that if an administrator created a zone to
>>> partition data with the intent to share data from that zone,
>>> allowing another zone to share it's root, probably didn't make
>>> sense.
>>>
>>> Are you saying that this is something we should not actively prohibit ?
>>>       
>> Let the administrator decide. All you achieve by adding arbitrary
>> restrictions is you will prevent someone from using Zones to solve
>> an issue they have, for which Zones would otherwise have been ideal,
>> and everyone loses. There are plenty of other reasons to use Zones
>> which are nothing to do with partitioning data.
>>     
>
> At least one restriction is needed: only one of the g-z and ngz can
> share any of the ngz's resources.
>
> But because existing systems can only share ngz resources from the g-z
> you'll necessarily have to deal with what to do when an ngz tries to
> share a resource already shared by the g-z.  The question is: how?
>
> I can see any number of options, such as:
>
> 1) Don't allow ngzs to share filesystems unless they've been marked as
>    capable of it, which in turn will only happen if the relevant
>    datasets have been marked as not shareable by the g-z, which in turn
>    can only happen if they aren't shared by the g-z.  Thereafter you
>    could not share that ngz's filesystems from the g-z.
>
> 2) Don't allow ngzs to share filesystems shared by the g-z.  What error
>    will be returned to the ngz sysadmin though?
>
> 3) Don't allow the g-z to share filesystems shareable by ngzs.
>
> 4) Don't allow booting of ngzs whose datasets are shared by the g-z, and
>    don't allow the g-z to share datasets owned by a booted zone.
>
> (1) is fully backwards compatible, but probably requires lots of extra
> work.
>
> (2) and (4) are only slightly backwards incompatible, and that
> incompatibility strikes me as tolerable.  (4) probably requires
> significant extra work too.
>
> (3) Would be a very noticeable, incompatible change.
>
> There may be other options too.
>
>   
>> If I understood correctly that there's some technical reason a
>> directory can't be shared by more than one NFS instance, then check
>> for just that. Don't add other unnecessary restrictions,
>> particularly ones which break current functionality which people may
>> be using.
>>     
>
> Right, that's (2) above, and it's the simplest option.
>   

It's less restrictive than 2).  Allow both g-z and ngz to share 
directories, but only one at a time (first come, first served) on a per 
share basis. i.e. you can share it unless another NFS instance already is.

As far as I know, the system call to share a filesystem isn't a public 
interface, so it's not of great consequence what the error returned is, 
as long as share(1M) can make some sense of it.

I just tried sharing an NFS mounted filesystem (which isn't allowed on 
Solaris), and amusingly, I get the following misleading error message:

# df -k /mnt
Filesystem            kbytes    used   avail capacity  Mounted on
a20:/export/home     248415166 22862738 225552427    10%    /mnt
# share -F nfs /mnt
NFS: Cannot share filesystems in non-global zones: /mnt
Could not share: /mnt: operation not supported
#

The syscall actually returned Err#66 EREMOTE, which is reasonable.
The mapping to a textual error is completely bogus though.

-- 
Andrew Gabriel

From robert.gordon@oracle.com Thu Jul 22 10:44:17 2010
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MHiHMk015742
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 10:44:17 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail2sca.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MHiGub017965;
	Thu, 22 Jul 2010 10:44:17 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Y00207ZXSJ300@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 11:44:16 -0600 (MDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Y006HLZXSOMD0@brm-avmta-1.central.sun.com>; Thu,
 22 Jul 2010 11:44:16 -0600 (MDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MHiFhU004792; Thu,
 22 Jul 2010 17:44:15 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6LLiIdC004922; Thu, 22 Jul 2010 17:44:09 +0000 (GMT)
Received: from abhmt003.oracle.com by acsmt355.oracle.com	with ESMTP id
 428323051279820645; Thu, 22 Jul 2010 10:44:05 -0700
Received: from [10.0.1.198] (/141.144.122.24)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 10:44:04 -0700
Date: Thu, 22 Jul 2010 12:43:34 -0500
From: Robert Gordon <robert.gordon@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <4C488290.1070908@oracle.com>
To: Andrew Gabriel <Andrew.Gabriel@oracle.com>
Cc: Nicolas Williams <Nicolas.Williams@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <CDED2D81-E512-467C-B023-814F2DD86403@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090209.4C48836C.0090:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com>
 <AEEF936B-C339-4FFD-86F4-B9A803B67186@oracle.com>
 <4C487A1F.2050708@oracle.com> <20100722172503.GD24773@oracle.com>
 <4C488290.1070908@oracle.com>
Status: RO
Content-Length: 424


On Jul 22, 2010, at 12:40 PM, Andrew Gabriel wrote:

> 
> It's less restrictive than 2).  Allow both g-z and ngz to share directories, but only one at a time (first come, first served) on a per share basis. i.e. you can share it unless another NFS instance already is.

This is what i have implemented, and goes to the idea of sharing ownership. Once a zone establishes ownership, other zones will receive EPERM. 

Robert.

From edward.pilatowicz@oracle.com Thu Jul 22 12:01:31 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MJ1V5x017539
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 12:01:31 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6MJ1SJQ009579;
	Thu, 22 Jul 2010 14:01:31 -0500 (CDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Z007073IIWS00@nwk-avmta-1.sfbay.Sun.COM>; Thu,
 22 Jul 2010 12:01:30 -0700 (PDT)
Received: from jurassic.Eng.Sun.COM ([10.5.240.81])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Z00GGE3II3930@nwk-avmta-1.sfbay.Sun.COM>; Thu,
 22 Jul 2010 12:01:30 -0700 (PDT)
Received: from jurassic.Eng.Sun.COM (localhost [127.0.0.1])
	by jurassic.Eng.Sun.COM (8.14.4+Sun/8.14.4) with ESMTP id o6MJ1Ttd330202
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu,
 22 Jul 2010 12:01:29 -0700 (PDT)
Received: (from edp@localhost)
	by jurassic.Eng.Sun.COM (8.14.4+Sun/8.14.4/Submit) id o6MJ1TDW330201; Thu,
 22 Jul 2010 12:01:29 -0700 (PDT)
Date: Thu, 22 Jul 2010 12:01:29 -0700
From: Edward Pilatowicz <edward.pilatowicz@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <4C486A52.1000106@oracle.com>
To: Andrew Gabriel <Andrew.Gabriel@oracle.com>
Cc: Robert Gordon <robert.gordon@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <20100722190129.GA325131@jurassic.Eng.Sun.COM>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.4.1.325704
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com> <4C486A52.1000106@oracle.com>
X-Authentication-warning: jurassic.Eng.Sun.COM: edp set sender to
 edward.pilatowicz@oracle.com using -f
User-Agent: Mutt/1.5.20 (2009-06-14)
Status: RO
Content-Length: 2178

On Thu, Jul 22, 2010 at 04:57:06PM +0100, Andrew Gabriel wrote:
> Robert Gordon wrote:
> >On Jul 22, 2010, at 5:13 AM, Andrew Gabriel wrote:
> >
> >>Gerald Jelinek wrote:
> >>>Zone boot fails if share references exist on its root dataset VFS with EBUSY.
> >>This sounds overly restrictive and might unnecessarily bite someone's existing infrastructure.
> >>Could you not instead have the sharing of the zone root from inside the zone rejected, if it is already shared from the global zone?
> >>That can't break any existing infrastructure.
> >>
> >>--
> >>Andrew Gabriel
> >
> >
> >The administrator will need to alter the existing infrastructure. The current zoneadm implementation will unshare the root prior to booting the zone.
>
> No it doesn't (I just tried it).
>

this is done at zone install time at the zfs dataset property level.
ie, when a base datasets are created, their sharenfs property is
explicitly disabled.  (the sharesmb property is unfortunately not
cleared, but that is a bug.  see 6962440.)

the administrator can subsequently enable sharing for the zones root
filesystem, but i don't know  of any use cases or requirements to
support this functionality.  sure, we _could_ support it, with possibly
added complexity, but why?  what kind of sane zone deployments would
actually utilize this functionality?

to me, allowing this seems to violate zone independence and integrity.
a zone owns it's root filesystems, and hence it should be in charge of
deciding if they should be shared or not.  so how does a zone
administrator check to see if a gz admin as (intentionally or
unintentionally) shared out their zone root?  should they do this on
every boot if they are security conscious?  also, zones exist to provide
namespace virtualization/isolation.  so if the gz is sharing out a zones
filesystem, then that nfs share is using the user mappings in the gz to
access filesystems that belong to another virtual machine, which may
have different user mappings?  yech...

of course i could still be convinced that supporting this really would
be useful, but i have yet to see anyone propose a use case or
justification other than "because we could/can".

ed

From Andrew.Gabriel@oracle.com Thu Jul 22 12:08:59 2010
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6MJ8xZL017692
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 22 Jul 2010 12:08:59 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.4) with ESMTP id o6MJ8wpU000539;
	Thu, 22 Jul 2010 13:08:59 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L5Z0050D3UYUQ00@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 12:08:58 -0700 (PDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L5Z0042C3UYXT10@nwk-avmta-2.sfbay.sun.com>; Thu,
 22 Jul 2010 12:08:58 -0700 (PDT)
Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6MJ8vH6020295; Thu,
 22 Jul 2010 19:08:57 +0000 (GMT)
Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154])
	by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6MJ8s6R026124; Thu, 22 Jul 2010 19:08:55 +0000 (GMT)
Received: from abhmt009.oracle.com by acsmt353.oracle.com	with ESMTP id
 428560471279825680; Thu, 22 Jul 2010 12:08:00 -0700
Received: from [81.187.162.109] (/81.187.162.109)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Thu,
 22 Jul 2010 12:07:59 -0700
Date: Thu, 22 Jul 2010 20:08:51 +0100
From: Andrew Gabriel <Andrew.Gabriel@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <20100722190129.GA325131@jurassic.Eng.Sun.COM>
To: Edward Pilatowicz <edward.pilatowicz@oracle.com>
Cc: Robert Gordon <robert.gordon@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <4C489743.3090709@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt354.oracle.com [141.146.40.154]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090201.4C489749.0114:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C4819B2.7050608@oracle.com>
 <A7FD6084-0710-4643-835A-B1A65BBA8BBA@oracle.com>
 <4C486A52.1000106@oracle.com> <20100722190129.GA325131@jurassic.Eng.Sun.COM>
User-Agent: Thunderbird 2.0.0.23 (X11/20090929)
Status: RO
Content-Length: 1034

Edward Pilatowicz wrote:
> On Thu, Jul 22, 2010 at 04:57:06PM +0100, Andrew Gabriel wrote:
>   
>> Robert Gordon wrote:
>>     
>>> On Jul 22, 2010, at 5:13 AM, Andrew Gabriel wrote:
>>>
>>>       
>>>> Gerald Jelinek wrote:
>>>>         
>>>>> Zone boot fails if share references exist on its root dataset VFS with EBUSY.
>>>>>           
>>>> This sounds overly restrictive and might unnecessarily bite someone's existing infrastructure.
>>>> Could you not instead have the sharing of the zone root from inside the zone rejected, if it is already shared from the global zone?
>>>> That can't break any existing infrastructure.
>>>>
>>>> --
>>>> Andrew Gabriel
>>>>         
>>> The administrator will need to alter the existing infrastructure. The current zoneadm implementation will unshare the root prior to booting the zone.
>>>       
>> No it doesn't (I just tried it).
>>
>>     
>
> this is done at zone install time at the zfs dataset property level.
>   

That's not the case which was being discussed.

-- 
Andrew Gabriel

From robert.gordon@oracle.com Fri Jul 23 09:29:37 2010
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6NGTbaL004661
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 23 Jul 2010 09:29:37 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail3mpk.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6NGTXjX024307;
	Fri, 23 Jul 2010 09:29:36 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L6000603R59CT00@nwk-avmta-2.sfbay.sun.com>; Fri,
 23 Jul 2010 09:29:33 -0700 (PDT)
Received: from sca-ea-mail-2.sun.com ([192.18.43.25])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L60005A4R595710@nwk-avmta-2.sfbay.sun.com>; Fri,
 23 Jul 2010 09:29:33 -0700 (PDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by sca-ea-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o6NGTWR9020214;
 Fri, 23 Jul 2010 16:29:33 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6N0BgWb030759; Fri, 23 Jul 2010 16:29:31 +0000 (GMT)
Received: from abhmt002.oracle.com by acsmt353.oracle.com	with ESMTP id
 431598181279902571; Fri, 23 Jul 2010 09:29:31 -0700
Received: from [10.1.2.103] (/209.12.28.210)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Fri,
 23 Jul 2010 09:29:30 -0700
Date: Fri, 23 Jul 2010 11:29:29 -0500
From: Robert Gordon <robert.gordon@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
To: PSARC-ext@sun.com
Cc: Jerry Jelinek <jerry.jelinek@oracle.com>,
        nfs-instance <nfs-instance@sun.com>,
        Rich Brown <rich.brown@oracle.com>
Message-id: <A8CCF481-D9D0-4D2B-96EA-516B1F165831@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090203.4C49C36C.01C1:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
Status: RO
Content-Length: 3540


Here is an updated version: 

Template Version: @(#)sac_nextcase 1.70 03/30/10 SMI
This information is Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
1. Introduction
   1.1. Project/Component Working Name:
	 NFS Instances
   1.2. Name of Document Author/Supplier:
	 Author:  Robert Gordon
   1.3  Date of This Document:
	23 July, 2010
4. Technical Description

Patch binding is requested; however, there are no plans to backport any of
the proposed changes.

The proposed changes are needed to support an NFS server in a non-global
zone; however, the changes are not specific to NFS. They would also be used
when enabling any file sharing protocol (ie. CIFS) server for non-global zones.

PRIV_SYS_SHARE 
--------------

Establishing an NFS or CIFS share requires full root privileges; however,
within a non-global zone, full privileges are not permitted. A new system
privilege PRIV_SYS_SHARE is proposed, and is enforced in sharefs when adding 
or removing shares replacing the existing usage of PRIV_SYS_CONFIG.

PRIV_SYS_SHARE can be assigned to a zone, and it is enabled by default for
root users in both global and non-global zones.  

With PRIV_SYS_SHARE, a global zone administrator may allow or prohibit
sharing from any protocol (CIFS, NFS) in any zone (global or non-global).
Enforcement of the protocol-specific privileges (PRIV_SYS_NFS and
PRIV_SYS_SMB) will not be changed.  To establish a share, both
PRIV_SYS_SHARE and the protocol-specific privilege are required.


VFS Share Ownership and References
----------------------------------

A file system may only be shared by a single NFS server instance.

File systems are assigned to zones with "add_dataset" and "add_fs" zone
config resources.  The assigned file systems are only mounted in their zone,
and therefore can only be shared by the NFS server running in the zone.

However, a zone's root dataset is problematic because it is mounted both
within the global zone and its non-global zone.  To ensure that a file
system can never be shared by multiple NFS server instances, the notion of
VFS share ownership is introduced.

Enforcement of VFS share ownership prevents the global zone from sharing a
shared non-global zone's root dataset.

Two new vfs_t fields (vfs_share_owner, vfs_share_count) are used to track
VFS shares and VFS share ownership they are managed by using the following
interfaces:

   int  vfs_share_ref(vfs_t *, zone_t *);
   void vfs_share_unref(vfs_t *, zone_t *);

For each share, the NFS server establishes a share reference on the VFS
containing the shared object. The reference is removed when the object is
unshared. VFS share reference and VFS ownership changes are coordinated with
a new vfs_t lock: vfs_share_owner_lock.

If the zone_t * argument for vfs_share_ref() is not the current zone owner
of the VFS, EBUSY is returned, otherwise the reference count is bumped and
optionally sets ownership.


EXPORTED INTERFACES:

			|Proposed	|Specified	|
			|Stability	|in what	|
Interface Name		|Classification |Document?	| Comments
===============================================================================
			|		|		|
  PRIV_SYS_SHARE	|Committed	|This		| Share Privilege 
			|		|Document	|
			|		|		|
  vfs_share_ref()	|Consolidation	|This		| VFS
  vfs_share_unref()	|Private	|Document	| Share Ownership.
			|		|		|
			|		|		|


6. Resources and Schedule
   6.4. Steering Committee requested information
  	6.4.1. Consolidation C-team Name:
		ON
   6.5. ARC review type: FastTrack
   6.6. ARC Exposure: open



From gww@sac.sfbay.sun.com Fri Jul 23 18:05:27 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6O15RrF012549
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 23 Jul 2010 18:05:27 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6O15Qng009484;
	Fri, 23 Jul 2010 20:05:26 -0500 (CDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L6100C01F126300@brm-avmta-1.central.sun.com>; Fri,
 23 Jul 2010 19:05:26 -0600 (MDT)
Received: from dm-sfbay-02.sfbay.sun.com ([129.146.11.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L61007BLF125EC0@brm-avmta-1.central.sun.com>; Fri,
 23 Jul 2010 19:05:26 -0600 (MDT)
Received: from sac.sfbay.sun.com (sac.SFBay.Sun.COM [10.5.240.67])
	by dm-sfbay-02.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4)
 with ESMTP id o6O15MTD004432; Fri, 23 Jul 2010 18:05:22 -0700 (PDT)
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6O15M9D012546; Fri,
 23 Jul 2010 18:05:22 -0700 (PDT)
Received: (from gww@localhost)	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit)
 id o6O15Mjq012545; Fri, 23 Jul 2010 18:05:22 -0700 (PDT)
Date: Fri, 23 Jul 2010 18:05:22 -0700 (PDT)
From: Gary Winiger <gww@sac.sfbay.sun.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
To: PSARC-ext@sun.com, robert.gordon@oracle.com
Cc: jerry.jelinek@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <201007240105.o6O15Mjq012545@sac.sfbay.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
Status: RO
Content-Length: 2001

> Here is an updated version: 

	Perhaps my questions were previously answered.  I didn't see
	that from reading the discussion.

> Patch binding is requested; however, there are no plans to backport any of
> the proposed changes.

> PRIV_SYS_SHARE 
> --------------
> 
> Establishing an NFS or CIFS share requires full root privileges; however,

	Nit root != privilege.

	Proper terminology would be to state what privileges are necessary.
	sys_nfs or sys_smb and is there something more else?
	What are the actual required privileges?

> within a non-global zone, full privileges are not permitted. A new system
> privilege PRIV_SYS_SHARE is proposed, and is enforced in sharefs when adding 
> or removing shares replacing the existing usage of PRIV_SYS_CONFIG.

	This seems like a change in functionality.  That is, the proposal
	seems to be to remove functionality from sys_config.  That would
	not make a Patch binding appropriate.

> PRIV_SYS_SHARE can be assigned to a zone, and it is enabled by default for
> root users in both global and non-global zones.  

	Again why is root the thing here?  What are the actual required
	privileges?
	I'm trying to understand the compelling reason for adding sys_share.

> With PRIV_SYS_SHARE, a global zone administrator may allow or prohibit
> sharing from any protocol (CIFS, NFS) in any zone (global or non-global).
> Enforcement of the protocol-specific privileges (PRIV_SYS_NFS and
> PRIV_SYS_SMB) will not be changed.  To establish a share, both
> PRIV_SYS_SHARE and the protocol-specific privilege are required.

	Usually a privilege isn't combined with other privileges for
	a single restriction.  Why isn't sys_nfs or sys_smb being or
	not being in the zones privilege set sufficient?
	Why is the additional restriction necessary?

	I understand that sys_config is too powerful to allow in a zone.
	It seems to me that sharing should be allowed for processes
	(subjects) with sys_nfs (or sys_smb) and appropriate file/directory
	assess.

Gary..

From jeff.a.smith@oracle.com Mon Jul 26 14:50:11 2010
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6QLoBeD023649
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 26 Jul 2010 14:50:11 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6QLoAC4023648;
	Mon, 26 Jul 2010 14:50:11 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L6600B0XPZMAM00@brm-avmta-1.central.sun.com>; Mon,
 26 Jul 2010 15:50:10 -0600 (MDT)
Received: from sca-ea-mail-1.sun.com ([192.18.43.24])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L66004IKPZLYB20@brm-avmta-1.central.sun.com>; Mon,
 26 Jul 2010 15:50:10 -0600 (MDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by sca-ea-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o6QLo4d3015962;
 Mon, 26 Jul 2010 21:50:04 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6PM3XCI004453; Mon, 26 Jul 2010 21:50:03 +0000 (GMT)
Received: from abhmt001.oracle.com by acsmt353.oracle.com	with ESMTP id
 438251651280180978; Mon, 26 Jul 2010 14:49:38 -0700
Received: from jasmac.central.sun.com (/10.1.232.170)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Mon,
 26 Jul 2010 14:49:37 -0700
Date: Mon, 26 Jul 2010 16:49:35 -0500
From: "Jeff A. Smith" <jeff.a.smith@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <201007240105.o6O15Mjq012545@sac.sfbay.sun.com>
To: Gary Winiger <gww@sac.sfbay.sun.com>
Cc: PSARC-ext@sun.com, robert.gordon@oracle.com, jerry.jelinek@oracle.com,
        nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <F2F82AF0-0237-4901-AAFC-8BA4755B0141@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090202.4C4E030B.029D:SCFMA4539814,ss=1,fgs=0
References: <201007240105.o6O15Mjq012545@sac.sfbay.sun.com>
Status: RO
Content-Length: 1621


On Jul 23, 2010, at 8:05 PM, Gary Winiger wrote:

> 	I'm trying to understand the compelling reason for adding sys_share.

Hi Gary,

I think this issue (missing requirements/rationale) is
at the heart of many of the questions in this thread,
so I'd like start there.

PRIV_SYS_SHARE allows a GZ admin to prohibit all sharing
in a zone regardless of the sharing protocol without having
any impact on client mounts in the zone.

Currently NFS and SMB shares are not possible in NGZ, and
I was surprised to learn that some customers actually like/
prefer this "failure to share" in NGZ.  When told that
sharing would soon be possible in NGZ, the customer became
concerned and demanded a mechanism for the GZ admin to
disable sharing for NGZ on a per-zone basis.  The customer
still wanted to be able to perform NFS client mounts in the NGZ.

The GZ admin could simply add PRIV_SYS_NFS to a NGZ's set
of prohibited privs; however, doing so would prevent both 
NFS client mounts and NFS server shares within the zone.

If we were also enabling the SMB server in NGZ under this 
project (we aren't), the customer would want to be able 
to prevent SMB shares too.  They want the GZ admin to be
able to prevent all sharing (regardless of pcol) in any
zone without affecting client mounts.

One of our design goals is to solve sharing problems in
a way that can work for both NFS and SMB shares.  A new
system priv for sharing seemed like a good fit because it
is enforced using the existing/proven mechanism to prohibit 
privs allowed in NGZ, and it meets the cust requirement
without regard to the sharing protocol used.

Jeff

From jeff.a.smith@oracle.com Tue Jul 27 14:25:11 2010
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6RLPBuk019662
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 27 Jul 2010 14:25:11 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail2sca.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6RLPANV026896;
	Tue, 27 Jul 2010 14:25:11 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L680020HJHYL200@brm-avmta-1.central.sun.com>; Tue,
 27 Jul 2010 15:25:10 -0600 (MDT)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L68001X9JHYFX00@brm-avmta-1.central.sun.com>; Tue,
 27 Jul 2010 15:25:10 -0600 (MDT)
Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6RLPAsD024134; Tue,
 27 Jul 2010 21:25:10 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6RFSHCG002606; Tue, 27 Jul 2010 21:25:07 +0000 (GMT)
Received: from abhmt003.oracle.com by acsmt355.oracle.com	with ESMTP id
 442080881280265831; Tue, 27 Jul 2010 14:23:51 -0700
Received: from jasmac.central.sun.com (/10.1.232.170)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Tue,
 27 Jul 2010 14:23:50 -0700
Date: Tue, 27 Jul 2010 16:23:48 -0500
From: "Jeff A. Smith" <jeff.a.smith@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <A8CCF481-D9D0-4D2B-96EA-516B1F165831@oracle.com>
To: PSARC-ext@sun.com
Cc: Jerry Jelinek <jerry.jelinek@oracle.com>,
        nfs-instance <nfs-instance@sun.com>,
        Rich Brown <rich.brown@oracle.com>
Message-id: <B69F85BD-0B5C-4A9E-8ABF-C59222D615F8@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090202.4C4F4EB5.024B:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <A8CCF481-D9D0-4D2B-96EA-516B1F165831@oracle.com>
Status: RO
Content-Length: 4757

Updated doc.  I believe this incorporates all feedback
from last week while I was out.

Template Version: @(#)sac_nextcase 1.70 03/30/10 SMI
This information is Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
1. Introduction
  1.1. Project/Component Working Name:
	 NFS Instances
  1.2. Name of Document Author/Supplier:
	 Author:  Robert Gordon, Jeff A. Smith
  1.3  Date of This Document:
	27 July, 2010
4. Technical Description

Minor binding is requested; there are no plans to backport
any of the proposed changes.

The proposed changes are needed to support an NFS server in a
non-global zone (NGZ); however, the changes are not specific
to NFS. They would also be used when enabling any file sharing
protocol (ie. CIFS) server for non-global zones.

PRIV_SYS_SHARE 
--------------

Currently, establishing a share enforces PRIV_SYS_CONFIG
in sharefs.  For ZFS shares, libshare contains an additional
check to enforce full privileges.  These privilege checks
will never succeed in a NGZ because they are prohibited
by the Zones security model.  The current checks will be
replaced by the proposed (new) PRIV_SYS_SHARE.

Each sharing protocol in Solaris (NFS and CIFS/SMB) has its
own system privilege, and it is currently enforced when 
protocol mounts or (GZ) shares are established.

The protocol-specific privileges are not sufficient to preserve
the current Solaris behavior of allowing protocol mounts but
disallowing protocol shares.  Some customers prefer the 
current behavior which does not permit sharing within NGZ.

The project team feels that a mechanism must be provided
for the GZ admin to preserve current behavior by preventing
all protocol shares on a per-zone basis while allowing
protocol mounts.

PRIV_SYS_SHARE is a new system privilege proposed to
disable sharing on a per-zone basis.  Because PRIV_SYS_SHARE
is enforced within sharefs (where all protocol shares 
begin), the GZ admin can completely disable shares
within a zone by adding PRIV_SYS_SHARE to the zone's set
of prohibited privileges.  

Enforcement of the protocol-specific privileges
(PRIV_SYS_NFS and PRIV_SYS_SMB) will not be changed.  
To establish a share, both PRIV_SYS_SHARE (to modify 
sharefs) and the protocol-specific privilege are required.


VFS Share Ownership and References
----------------------------------

A file system may only be shared by a single NFS server instance.

File systems are assigned to zones with "add_dataset" and "add_fs" zone
config resources.  The assigned file systems are only mounted in their zone,
and therefore can only be shared by the NFS server running in the zone.

However, a zone's root dataset is problematic because it is mounted both
within the global zone and its non-global zone.  To ensure that a file
system can never be shared by multiple NFS server instances, the notion of
VFS share ownership is introduced.

Enforcement of VFS share ownership prevents the global zone from sharing an
active non-global zone's root dataset.

Two new vfs_t fields (vfs_share_owner, vfs_share_count) are used to
track VFS shares and VFS share ownership, and they are managed with
the following interfaces:

   int  vfs_share_ref(vfs_t *, zone_t *);
   void vfs_share_unref(vfs_t *, zone_t *);

For each share, the NFS server establishes a share reference on the VFS
containing the shared object. The reference is removed when the object is
unshared. VFS share reference and VFS ownership changes are coordinated with
a new vfs_t lock: vfs_share_owner_lock.

When the zone_t * argument for vfs_share_ref() is not the current
zone owner of the VFS, EBUSY is returned because the VFS is shared
by another server instance.  Otherwise, the reference count is
bumped, and optionally, the zone owner is set.


EXPORTED INTERFACES:

                        |Proposed        |Specified        |
                        |Stability       |in what          |
Interface Name          |Classification  |Document?        | Comments
==============================================================================
                        |                |                 |
  PRIV_SYS_SHARE        |Committed       |This             | Share Privilege 
                        |                |Document         |
                        |                |                 |
  vfs_share_ref()       |Consolidation   |This             | VFS
  vfs_share_unref()     |Private         |Document         | Share Ownership.
                        |                |                 |
                        |                |                 |

6. Resources and Schedule
  6.4. Steering Committee requested information
 	6.4.1. Consolidation C-team Name:
		ON
  6.5. ARC review type: FastTrack
  6.6. ARC Exposure: open


From gww@sac.sfbay.sun.com Tue Jul 27 20:58:30 2010
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6S3wUYr025641
	for <psarc-ext@sac.sfbay.sun.com>; Tue, 27 Jul 2010 20:58:30 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail2sca.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6S3wUSd025879;
	Tue, 27 Jul 2010 20:58:30 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L69006031PIO900@nwk-avmta-1.sfbay.Sun.COM>; Tue,
 27 Jul 2010 20:58:30 -0700 (PDT)
Received: from dm-sfbay-02.sfbay.sun.com ([129.146.11.31])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L690019I1PHAL60@nwk-avmta-1.sfbay.Sun.COM>; Tue,
 27 Jul 2010 20:58:29 -0700 (PDT)
Received: from sac.sfbay.sun.com (sac.SFBay.Sun.COM [10.5.240.67])
	by dm-sfbay-02.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4)
 with ESMTP id o6S3wTZw014227; Tue, 27 Jul 2010 20:58:29 -0700 (PDT)
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6S3wTor025638; Tue,
 27 Jul 2010 20:58:29 -0700 (PDT)
Received: (from gww@localhost)	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit)
 id o6S3wTdN025637; Tue, 27 Jul 2010 20:58:29 -0700 (PDT)
Date: Tue, 27 Jul 2010 20:58:29 -0700 (PDT)
From: Gary Winiger <gww@sac.sfbay.sun.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
To: jeff.a.smith@oracle.com
Cc: PSARC-ext@sun.com, jerry.jelinek@oracle.com, nfs-instance@sun.com,
        rich.brown@oracle.com, robert.gordon@oracle.com
Message-id: <201007280358.o6S3wTdN025637@sac.sfbay.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
Status: RO
Content-Length: 1769

Jeff,

> On Jul 23, 2010, at 8:05 PM, Gary Winiger wrote:
> 
> > 	I'm trying to understand the compelling reason for adding sys_share.

> I think this issue (missing requirements/rationale) is
> at the heart of many of the questions in this thread,
> so I'd like start there.

	Thanks, that makes sys_share clear to me.  What I was missing
	was that sys_nfs was needed to import as well as share.

> PRIV_SYS_SHARE
> --------------
>
> Currently, establishing a share enforces PRIV_SYS_CONFIG
> in sharefs.  For ZFS shares, libshare contains an additional
> check to enforce full privileges.  These privilege checks

	Libraries cannot and should not try to enforce privileges.
	In what I believe this case to be, only the kernel can
	enforce privileges.  I presume this a misstatement.
	One can always write an equivalent function to the
	library without privilege checks.  Processes calling of that
	equivalent function should not be granted access unless they have
	appropriate privileges.

> will never succeed in a NGZ because they are prohibited
> by the Zones security model.  The current checks will be
> replaced by the proposed (new) PRIV_SYS_SHARE.

	This seems to me to be an incompatible change that doesn't
	need to be made.  If before this project, sys_config was
	the privilege that allowed sharing, it should continue
	to allow sharing.  In addition sys_share should allow
	sharing.  I believe it was already determined that
	sys_config cannot/should not/must not be granted to a NGZ.

	If the project wishes to make this incompatible change,
	please justify it (and perhaps how it would be mitigated for
	all existing users of sys_config to share).

	Other than the "misstatement" and the incompatibility,
	I'm now fine with the case.  Thanks.

Gary..

From Darren.Moffat@oracle.com Wed Jul 28 02:27:47 2010
Received: from sunmail3mpk.sfbay.sun.com (sunmail3mpk.SFBay.Sun.COM [129.146.11.52])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6S9Rl1l002039
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 28 Jul 2010 02:27:47 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3mpk.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6S9RkeD006300;
	Wed, 28 Jul 2010 02:27:47 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L690000DGYAW700@brm-avmta-1.central.sun.com>; Wed,
 28 Jul 2010 03:27:46 -0600 (MDT)
Received: from sca-ea-mail-4.sun.com ([192.18.43.22])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L6900FCHGYAON60@brm-avmta-1.central.sun.com>; Wed,
 28 Jul 2010 03:27:46 -0600 (MDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by sca-ea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6S9RjVh009787;
 Wed, 28 Jul 2010 09:27:45 +0000 (GMT)
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6R8C063029411; Wed, 28 Jul 2010 09:27:44 +0000 (GMT)
Received: from abhmt020.oracle.com by acsmt353.oracle.com	with ESMTP id
 443678311280309178; Wed, 28 Jul 2010 02:26:18 -0700
Received: from [10.7.251.221] (/10.7.251.221)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Wed,
 28 Jul 2010 02:26:17 -0700
Date: Wed, 28 Jul 2010 10:26:14 +0100
From: Darren J Moffat <Darren.Moffat@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <201007280358.o6S3wTdN025637@sac.sfbay.sun.com>
To: Gary Winiger <gww@sac.sfbay.sun.com>
Cc: jeff.a.smith@oracle.com, PSARC-ext@sun.com, jerry.jelinek@oracle.com,
        nfs-instance@sun.com, rich.brown@oracle.com, robert.gordon@oracle.com
Message-id: <4C4FF7B6.4010508@Oracle.COM>
Organization: Oracle Solaris Security
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090207.4C4FF810.025D:SCFMA4539814,ss=1,fgs=0
References: <201007280358.o6S3wTdN025637@sac.sfbay.sun.com>
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.9) Gecko/20100607
 Lightning/1.0b1 OracleBeehiveExtension/1.0.0.0pre3 Thunderbird/3.0.4
Status: RO
Content-Length: 1637

On 28/07/2010 04:58, Gary Winiger wrote:
> 	This seems to me to be an incompatible change that doesn't
> 	need to be made.  If before this project, sys_config was
> 	the privilege that allowed sharing, it should continue
> 	to allow sharing.  In addition sys_share should allow
> 	sharing.  I believe it was already determined that
> 	sys_config cannot/should not/must not be granted to a NGZ.

While it is an incompatible change I believe it is perfectly acceptable 
because the provider RBAC profiles we provide for sharing are still 
"legacy" suser with uid=0 (ie all privs).

More importantly we don't document libshare or sharefs at all and the 
share_nfs(1M), share(1M), sharemgr(1M) man pages (which are the only 
supported interfaces for sharing filesystems) don't document which 
privileges are required either.  It is sharefs that makes the privilege 
check against sys_config today.

So really this is currently an implementation detail of libshare and 
sharefs today.

> 	If the project wishes to make this incompatible change,
> 	please justify it (and perhaps how it would be mitigated for
> 	all existing users of sys_config to share).

The definition of sys_config provided by 'ppriv -lv sys_config' or the 
privileges(5) man page don't document that sys_config is checked for 
sharing NFS (or CIFS) filesystems.

There is a change in which privilege is checked but I think it is 
perfectly acceptable and shouldn't be visible as an incompatible change 
except to those people who have reverse engineered what privileges they 
think share_nfs(1M) needs to have.

So the case gets my +1 as specified.

-- 
Darren J Moffat

From jeff.a.smith@oracle.com Wed Jul 28 04:25:45 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6SBPj9M003678
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 28 Jul 2010 04:25:45 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6SBPfJ3019801;
	Wed, 28 Jul 2010 06:25:44 -0500 (CDT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L6900J05MET6200@nwk-avmta-2.sfbay.sun.com>; Wed,
 28 Jul 2010 04:25:41 -0700 (PDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L69009HPMES9J90@nwk-avmta-2.sfbay.sun.com>; Wed,
 28 Jul 2010 04:25:41 -0700 (PDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6SBPeNd019723; Wed,
 28 Jul 2010 11:25:40 +0000 (GMT)
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6S8kLTV007580; Wed, 28 Jul 2010 11:25:38 +0000 (GMT)
Received: from abhmt010.oracle.com by acsmt353.oracle.com	with ESMTP id
 443990071280316240; Wed, 28 Jul 2010 04:24:00 -0700
Received: from [10.0.1.30] (/74.193.65.89)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Wed,
 28 Jul 2010 04:23:59 -0700
Date: Wed, 28 Jul 2010 06:23:58 -0500
From: "Jeff A. Smith" <jeff.a.smith@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <201007280358.o6S3wTdN025637@sac.sfbay.sun.com>
To: Gary Winiger <gww@sac.sfbay.sun.com>
Cc: PSARC-ext@sun.com, Jerry Jelinek <jerry.jelinek@oracle.com>,
        nfs-instance <nfs-instance@sun.com>,
        Rich Brown <rich.brown@oracle.com>
Message-id: <51043CE2-4B1C-4D42-9E2A-03C11D9B57B1@oracle.com>
MIME-version: 1.0
X-Mailer: Apple Mail (2.1081)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090201.4C5013B3.0020:SCFMA4539814,ss=1,fgs=0
References: <201007280358.o6S3wTdN025637@sac.sfbay.sun.com>
Status: RO
Content-Length: 806


On Jul 27, 2010, at 10:58 PM, Gary Winiger wrote:

> 
>> PRIV_SYS_SHARE
>> --------------
>> 
>> Currently, establishing a share enforces PRIV_SYS_CONFIG
>> in sharefs.  For ZFS shares, libshare contains an additional
>> check to enforce full privileges.  These privilege checks
> 
> 	Libraries cannot and should not try to enforce privileges.
> 	In what I believe this case to be, only the kernel can
> 	enforce privileges.  I presume this a misstatement.

Yes.  It should read "libshare contains an additional check
for full privileges."  The purpose of the check (which exists
in onnv today) is not enforcement.  It is there to provide a 
more helpful error message than would be provided if execution
continued and failed later when privs are enforced.

I'll update the case with this change.

Jeff



From gary.winiger@oracle.com Wed Jul 28 07:52:13 2010
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6SEqD37022778
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 28 Jul 2010 07:52:13 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.4) with ESMTP id o6SEqBkw033905;
	Wed, 28 Jul 2010 08:52:13 -0600 (MDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L6900617VYZSD00@brm-avmta-1.central.sun.com>; Wed,
 28 Jul 2010 08:52:11 -0600 (MDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L6900JGGVYZTN80@brm-avmta-1.central.sun.com>; Wed,
 28 Jul 2010 08:52:11 -0600 (MDT)
Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6SEq7o4006686; Wed,
 28 Jul 2010 14:52:07 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6SEq5aK003793; Wed, 28 Jul 2010 14:52:06 +0000 (GMT)
Received: from abhmt021.oracle.com by acsmt353.oracle.com	with ESMTP id
 464642901280328724; Wed, 28 Jul 2010 07:52:04 -0700
Received: from gwws-macbook-pro.local (/10.7.251.252)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Wed,
 28 Jul 2010 07:52:02 -0700
Date: Wed, 28 Jul 2010 07:52:00 -0700
From: Gary Winiger <gary.winiger@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <51043CE2-4B1C-4D42-9E2A-03C11D9B57B1@oracle.com>
To: "Jeff A. Smith" <jeff.a.smith@oracle.com>
Cc: Gary Winiger <gww@sac.sfbay.sun.com>, PSARC-ext@sun.com,
        Jerry Jelinek <jerry.jelinek@oracle.com>,
        nfs-instance <nfs-instance@sun.com>,
        Rich Brown <rich.brown@oracle.com>
Message-id: <4C504410.8090603@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090204.4C504417.008E:SCFMA4539814,ss=1,fgs=0
References: <201007280358.o6S3wTdN025637@sac.sfbay.sun.com>
 <51043CE2-4B1C-4D42-9E2A-03C11D9B57B1@oracle.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.11)
 Gecko/20100711 Thunderbird/3.0.6
Status: RO
Content-Length: 981

Jeff

On 7/28/10 4:23 AM, Jeff A. Smith wrote:
>
> On Jul 27, 2010, at 10:58 PM, Gary Winiger wrote:
>
>>
>>> PRIV_SYS_SHARE
>>> --------------
>>>
>>> Currently, establishing a share enforces PRIV_SYS_CONFIG
>>> in sharefs.  For ZFS shares, libshare contains an additional
>>> check to enforce full privileges.  These privilege checks
>>
>> 	Libraries cannot and should not try to enforce privileges.
>> 	In what I believe this case to be, only the kernel can
>> 	enforce privileges.  I presume this a misstatement.
>
> Yes.  It should read "libshare contains an additional check
> for full privileges."  The purpose of the check (which exists
> in onnv today) is not enforcement.  It is there to provide a
> more helpful error message than would be provided if execution
> continued and failed later when privs are enforced.
>
> I'll update the case with this change.

	As long as the code is enforcing at the kernel level,
	you mail could be considered the case update.

Gary..

From gary.winiger@oracle.com Wed Jul 28 07:56:16 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6SEuGw5023061
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 28 Jul 2010 07:56:16 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6SEuF5g022988;
	Wed, 28 Jul 2010 09:56:15 -0500 (CDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L6900401W5RL200@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 28 Jul 2010 07:56:15 -0700 (PDT)
Received: from sca-ea-mail-3.sun.com ([192.18.43.21])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L69005C1W5R8E70@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 28 Jul 2010 07:56:15 -0700 (PDT)
Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227])
	by sca-ea-mail-3.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6SEuEML027397;
 Wed, 28 Jul 2010 14:56:14 +0000 (GMT)
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6RD1Rpk014957; Wed, 28 Jul 2010 14:56:13 +0000 (GMT)
Received: from abhmt008.oracle.com by acsmt353.oracle.com	with ESMTP id
 444784571280328971; Wed, 28 Jul 2010 07:56:11 -0700
Received: from gwws-macbook-pro.local (/10.7.251.252)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Wed,
 28 Jul 2010 07:56:10 -0700
Date: Wed, 28 Jul 2010 07:56:07 -0700
From: Gary Winiger <gary.winiger@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <4C4FF7B6.4010508@Oracle.COM>
To: Darren J Moffat <Darren.Moffat@oracle.com>
Cc: Gary Winiger <gww@sac.sfbay.sun.com>, jeff.a.smith@oracle.com,
        PSARC-ext@sun.com, jerry.jelinek@oracle.com, nfs-instance@sun.com,
        rich.brown@oracle.com, robert.gordon@oracle.com
Message-id: <4C504507.4080204@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090201.4C50450E.0142:SCFMA4539814,ss=1,fgs=0
References: <201007280358.o6S3wTdN025637@sac.sfbay.sun.com>
 <4C4FF7B6.4010508@Oracle.COM>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.11)
 Gecko/20100711 Thunderbird/3.0.6
Status: RO
Content-Length: 1047

On 7/28/10 2:26 AM, Darren J Moffat wrote:
> On 28/07/2010 04:58, Gary Winiger wrote:
>> This seems to me to be an incompatible change that doesn't
>> need to be made. If before this project, sys_config was
>> the privilege that allowed sharing, it should continue
>> to allow sharing. In addition sys_share should allow
>> sharing. I believe it was already determined that
>> sys_config cannot/should not/must not be granted to a NGZ.
>
> While it is an incompatible change I believe it is perfectly acceptable
> because the provider RBAC profiles we provide for sharing are still
> "legacy" suser with uid=0 (ie all privs).

	That's a fine justification for the legacy.  "It can be
	incompatible because it was never exposed."

> There is a change in which privilege is checked but I think it is
> perfectly acceptable and shouldn't be visible as an incompatible change
> except to those people who have reverse engineered what privileges they
> think share_nfs(1M) needs to have.
>
> So the case gets my +1 as specified.

	Agreed.

+1.

Gary..

From jerry.jelinek@oracle.com Wed Jul 28 14:05:18 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6SL5Iq9001652
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 28 Jul 2010 14:05:18 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6SL5HrQ005692;
	Wed, 28 Jul 2010 16:05:18 -0500 (CDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L6A00B23D8UU000@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 28 Jul 2010 14:05:18 -0700 (PDT)
Received: from sca-ea-mail-2.sun.com ([192.18.43.25])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L6A004D1D8TC220@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 28 Jul 2010 14:05:17 -0700 (PDT)
Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117])
	by sca-ea-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id o6SL5B3J010498;
 Wed, 28 Jul 2010 21:05:12 +0000 (GMT)
Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155])
	by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6SL595K031480; Wed, 28 Jul 2010 21:05:09 +0000 (GMT)
Received: from abhmt013.oracle.com by acsmt355.oracle.com	with ESMTP id
 465708191280351054; Wed, 28 Jul 2010 14:04:14 -0700
Received: from [10.7.250.48] (/10.7.250.48)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Wed,
 28 Jul 2010 14:04:14 -0700
Date: Wed, 28 Jul 2010 15:04:12 -0600
From: Jerry Jelinek <jerry.jelinek@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <DCDF13C7-6EF0-4A2A-891D-389BBE2337B9@oracle.com>
To: PSARC-ext@sun.com
Cc: Robert Gordon <robert.gordon@oracle.com>,
        Gerald Jelinek <gjelinek@sac.sfbay.sun.com>, rich.brown@oracle.com,
        nfs-instance@sun.com
Message-id: <4C509B4C.9020504@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt355.oracle.com [141.146.40.155]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090205.4C509B87.0117:SCFMA4539814,ss=1,fgs=0
References: <201007212138.o6LLc4p9024548@sac.sfbay.sun.com>
 <4C477064.40305@Oracle.com> <DCDF13C7-6EF0-4A2A-891D-389BBE2337B9@oracle.com>
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.10)
 Gecko/20100621 Lightning/1.0b1 Thunderbird/3.0.5
Status: RO
Content-Length: 397

This case is due to time out tomorrow and it has
a couple of +1s.  I think all of the questions have
been addressed by the team, but in case anyone
has any remaining issues which I've overlooked,
please respond before the end of the day tomorrow
so that the team can either address them or I can
extend the timer.

Otherwise, I plan to mark this closed approved end
of day tomorrow

Thanks,
Jerry

From jerry.jelinek@oracle.com Fri Jul 30 05:25:40 2010
Received: from sunmail6brm.central.sun.com (sunmail6brm.Central.Sun.COM [129.147.4.169])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id o6UCPduO002535
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 30 Jul 2010 05:25:40 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail6brm.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.4) with ESMTP id o6UCPdhY007075;
	Fri, 30 Jul 2010 07:25:39 -0500 (CDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0L6D00301EIRWM00@brm-avmta-1.central.sun.com>; Fri,
 30 Jul 2010 06:25:39 -0600 (MDT)
Received: from sca-ea-mail-4.sun.com ([192.18.43.22])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0L6D000B7EIQO3B0@brm-avmta-1.central.sun.com>; Fri,
 30 Jul 2010 06:25:39 -0600 (MDT)
Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125])
	by sca-ea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id o6UCPcJu018329;
 Fri, 30 Jul 2010 12:25:38 +0000 (GMT)
Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153])
	by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1)
 with ESMTP id o6UCPaL5022646; Fri, 30 Jul 2010 12:25:36 +0000 (GMT)
Received: from abhmt003.oracle.com by acsmt355.oracle.com	with ESMTP id
 452277681280492732; Fri, 30 Jul 2010 05:25:32 -0700
Received: from [10.7.250.48] (/10.7.250.48)
	by default (Oracle Beehive Gateway v4.0)	with ESMTP ; Fri,
 30 Jul 2010 05:25:32 -0700
Date: Fri, 30 Jul 2010 06:25:30 -0600
From: Jerry Jelinek <jerry.jelinek@oracle.com>
Subject: Re: NFS Instances [PSARC/2010/280 FastTrack timeout 07/29/2010]
In-reply-to: <F2F82AF0-0237-4901-AAFC-8BA4755B0141@oracle.com>
To: PSARC-ext@sun.com
Cc: robert.gordon@oracle.com, nfs-instance@sun.com, rich.brown@oracle.com
Message-id: <4C52C4BA.8050505@oracle.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1; format=flowed
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
X-Source-IP: acsmt353.oracle.com [141.146.40.153]
X-Auth-Type: Internal IP
X-CT-RefId: str=0001.0A090208.4C52C4C1.020A:SCFMA4539814,ss=1,fgs=0
References: <201007240105.o6O15Mjq012545@sac.sfbay.sun.com>
 <F2F82AF0-0237-4901-AAFC-8BA4755B0141@oracle.com>
User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.10)
 Gecko/20100621 Lightning/1.0b1 Thunderbird/3.0.5
Status: RO
Content-Length: 103

This case has timed out and received the necessary +1s.
I've marked it closed approved.

Thanks,
Jerry

