From sacadmin Tue Nov  7 12:01:01 2006
Received: from zion.eng.sun.com (zion.SFBay.Sun.COM [129.146.17.75])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id kA7K11sr007375;
	Tue, 7 Nov 2006 12:01:01 -0800 (PST)
Received: from zion.eng.sun.com (localhost [127.0.0.1])
	by zion.eng.sun.com (8.13.7+Sun/8.13.7) with ESMTP id kA7K11ga029520;
	Tue, 7 Nov 2006 12:01:01 -0800 (PST)
Received: (from maybee@localhost)
	by zion.eng.sun.com (8.13.7+Sun/8.13.7/Submit) id kA7K11bl029513;
	Tue, 7 Nov 2006 12:01:01 -0800 (PST)
Date: Tue, 7 Nov 2006 12:01:01 -0800 (PST)
From: Mark Maybee <maybee@zion.eng.sun.com>
Message-Id: <200611072001.kA7K11bl029513@zion.eng.sun.com>
To: PSARC@sac.sfbay.sun.com
Cc: Mark.Shellenbaum@sun.com
Subject: Enhancements to zpool history [PSARC/2006/625 Timeout:  11/15/2006]
Status: RO
Content-Length: 4539

Subject: PSARC FastTrack [11/15/2006]: Enhancements to zpool history


Template Version: @(#)sac_nextcase %I% %G% SMI
This information is Copyright 2006 Sun Microsystems, Inc.
1. Introduction
    1.1. Project/Component Working Name:
	 Enhancements to zpool history
    1.2. Name of Document Author/Supplier:
	 Author:  Mark Shellenbaum
    1.3  Date of This Document:
	07 November, 2006
4. Technical Description

This case adds two flags to the 'zpool history' command: '-l' and '-i'.
The stability of these additions is committed, and the release binding is
patch/micro.

Summary:

	This proposal is to add some additional functionality to
	the zpool history mechanism as described in 2006/288.
	The additions are to support logging the user id, hostname
	zone and transaction group that the ZFS administration command
	was executed in.

	Additionally, some ZFS commands require some internal events
	in order to achieve the desired ZFS command.  This proposal will
	also start logging many ZFS internal events.

Problem:
	
	It is desirable to know what user, zone and hostname various ZFS
	administrative commands were performed on.  This is particularly
	important for proper support of the ZFS delegated adminstration
	model as described in PSARC/2006/465.  Also, several zfs commands
	such as recursive snapshot, zfs receive and others may need to
	create or destroy datasets in order to perform the user requested
	administrative task and will be logged as an "internal event".
	
Solution:
	
	The solution will be to add user id, zone and hostname to the 
        persistent log records.  By default those fields won't be displayed
	when "zpool history" is invoked.  Two new options -l and -i will
	be added to "zpool history".  The first option -l will display
	log records in a long format which will include the "user, hostname
	and zone".  The -i option is used for displaying the internal events
	in additional to the standard events.  

	zpool history [-il] [<pool>]

	The default format without either -l or -i is:

	# zpool history
	History for 'sandbox':
	2006-11-03.08:12:35 zpool create sandbox c2d0
	2006-11-03.08:37:35 zfs create sandbox/test1
	2006-11-03.10:19:00 zfs create sandbox/marks
	...

	long format log record display format: 

	# zpool history -l
	2006-11-03.08:12:35 zpool create sandbox c2d0 \
	      [user root on rousay:global]
	2006-11-03.08:37:35 zfs create sandbox/test1 \
	      [user root on rousay:global]
	2006-11-03.10:19:00 zfs create sandbox/marks \
	      [user root on rousay:global]
	...

	Internal event format:

	<timestamp> [internal <event> txg:<number>] <event data> <dataset>
	
        For example a zfs receive would log file following

	# zfs receive sandbox/marks </var/tmp/zfs.data
	# zpool history -i
	...
	2006-11-03.10:51:13 [internal create txg:1890] \
	        sandbox/marks/fs 
	2006-11-03.10:51:13 [internal snapshot txg:1892] \
	        sandbox/marks/fs/fs2@snap1
	2006-11-03.10:51:13 [internal receive txg:1892] \
	        sandbox/marks/fs/fs2@snap1@snap1
	2006-11-03.10:51:13 zfs receive -d sandbox/marks

Man Page diffs
***************
*** 44,49 ****
--- 44,51 ----
  
       zpool import [-d dir] [-f]       [-a]
  
+      zpool history [-il] [pool] ...
+ 
  DESCRIPTION
       The zpool command configures ZFS storage  pools.  A  storage
       pool  is  a  collection  of  devices  that       provides physical
***************
*** 213,218 ****
--- 215,223 ----
       is       "/", rather than the normal default "/pool".
  
    Subcommands
+      All subcommands that modify state are logged persistenly to
+      the pool in their original form.
+ 
       The zpool command provides       subcommands to create and destroy
       storage  pools,  add  capacity to storage pools, and provide
       information about the storage pools. The  following  subcom-
***************
*** 708,713 ****
--- 713,727 ----
                  potentially active.
  
  
+ 
+ 
+      zpool history [-il] [pool] ...
+ 
+             Displays the command history of the specified pools (or all
+             pools if no pool is specified).
+ 
+	      -i 
+
+		 Displays ZFS internally logged events in addition to 
+                user initiated events.		 
+
+	      -l Displays log records in long format, which in addition
+                to standard format includes, user name, hostname and zone
+		 operation was performed under.
+

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

From sacadmin Thu May 17 13:40:01 2007
Received: from zion.eng.sun.com (zion [129.146.17.75])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l4HKe1aM002362
	for <PSARC@sac.sfbay.sun.com>; Thu, 17 May 2007 13:40:01 -0700 (PDT)
Received: from dhcp-umpk17-228-40.sfbay.sun.com (dhcp-umpk17-228-40 [129.146.228.40])
	by zion.eng.sun.com (8.13.7+Sun/8.13.7) with ESMTP id l4HKcpwY002700;
	Thu, 17 May 2007 13:38:51 -0700 (PDT)
Message-ID: <464CBD5B.4000106@sun.com>
Date: Thu, 17 May 2007 13:38:51 -0700
From: Matthew Ahrens <Matthew.Ahrens@sun.com>
User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326)
MIME-Version: 1.0
To: PSARC@sac.sfbay.sun.com, ZFS Engineering Team <zfs-eng@sun.com>
Subject: Re: Enhancements to zpool history [PSARC/2006/625 Timeout:  11/15/2006]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 920

> 	# zpool history -i
> 	...
> 	2006-11-03.10:51:13 [internal create txg:1890] \
> 	        sandbox/marks/fs 
> 	2006-11-03.10:51:13 [internal snapshot txg:1892] \
> 	        sandbox/marks/fs/fs2@snap1
> 	2006-11-03.10:51:13 [internal receive txg:1892] \
> 	        sandbox/marks/fs/fs2@snap1@snap1
> 	2006-11-03.10:51:13 zfs receive -d sandbox/marks
...
> +      zpool history [-il] [pool] ...
> + 
> +             Displays the command history of the specified pools (or all
> +             pools if no pool is specified).
> + 
> +	      -i 
> +
> +		 Displays ZFS internally logged events in addition to 
> +                user initiated events.		 
...

We would like to make the output from 'zpool history -i' unstable, so that 
we can change it without further restriction.  Can we do this simply by 
making a note of it in the manpage?  (zpool(1m) currently says "interface 
stability: evolving".)

thanks,
--matt

From sacadmin Mon May 21 17:42:25 2007
Received: from engmail3mpk.sfbay.Sun.COM (engmail3mpk.SFBay.Sun.COM [129.146.11.26])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l4M0gPEZ014780
	for <PSARC@sac.sfbay.sun.com>; Mon, 21 May 2007 17:42:25 -0700 (PDT)
Received: from marduk.eng.sun.com (marduk.SFBay.Sun.COM [129.146.108.224])
	by engmail3mpk.sfbay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l4M0fDIc021515;
	Mon, 21 May 2007 17:41:13 -0700 (PDT)
Received: from marduk.eng.sun.com (localhost [127.0.0.1])
	by marduk.eng.sun.com (8.13.6+Sun/8.12.11) with ESMTP id l4M0hE46014501;
	Mon, 21 May 2007 17:43:14 -0700 (PDT)
Received: (from gww@localhost)
	by marduk.eng.sun.com (8.13.6+Sun/8.12.11/Submit) id l4M0hEAG014500;
	Mon, 21 May 2007 17:43:14 -0700 (PDT)
Date: Mon, 21 May 2007 17:43:14 -0700 (PDT)
From: Gary Winiger <gww@eng.sun.com>
Message-Id: <200705220043.l4M0hEAG014500@marduk.eng.sun.com>
To: Matthew.Ahrens@sun.com, PSARC@sac.sfbay.sun.com, zfs-eng@sun.com
Subject: Re: Enhancements to zpool history [PSARC/2006/625 Timeout:  11/15/2006]
Status: RO
Content-Length: 426

> 
> We would like to make the output from 'zpool history -i' unstable, so that 
							   ^^^^^^^^
	Unstable like Evolving and Uncommitted does not permit incompatible
	changes at will.  I'd suggest that you upgrade the taxonomy of
	the command to the new public taxonomies:
		Committed, Uncommitted, Volatile, Not-an-interface
	as appropriate and that you do it as a separate case so it
	gets the proper visibility.

Gary..

From sacadmin Mon May 21 18:04:18 2007
Received: from zion.eng.sun.com (zion [129.146.17.75])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l4M14ICv015599
	for <PSARC@sac.sfbay.sun.com>; Mon, 21 May 2007 18:04:18 -0700 (PDT)
Received: from stationary.local (punchin-ahrens [192.9.61.138])
	by zion.eng.sun.com (8.13.7+Sun/8.13.7) with ESMTP id l4M136QS017851;
	Mon, 21 May 2007 18:03:06 -0700 (PDT)
Message-ID: <465240FC.6070901@sun.com>
Date: Mon, 21 May 2007 18:01:48 -0700
From: Matthew Ahrens <Matthew.Ahrens@sun.com>
User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326)
MIME-Version: 1.0
To: Gary Winiger <gww@eng.sun.com>
CC: PSARC@sac.sfbay.sun.com, zfs-eng@sun.com
Subject: Re: Enhancements to zpool history [PSARC/2006/625 Timeout:  11/15/2006]
References: <200705220043.l4M0hEAG014500@marduk.eng.sun.com>
In-Reply-To: <200705220043.l4M0hEAG014500@marduk.eng.sun.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Status: RO
Content-Length: 506

Gary Winiger wrote:
>> We would like to make the output from 'zpool history -i' unstable, so that 
> 							   ^^^^^^^^
> 	Unstable like Evolving and Uncommitted does not permit incompatible
> 	changes at will.  I'd suggest that you upgrade the taxonomy of
> 	the command to the new public taxonomies:
> 		Committed, Uncommitted, Volatile, Not-an-interface
> 	as appropriate and that you do it as a separate case so it
> 	gets the proper visibility.

Where can we find out what the new terms mean?

--matt

From sacadmin Tue May 22 09:46:00 2007
Received: from engmail3mpk.sfbay.Sun.COM (engmail3mpk.SFBay.Sun.COM [129.146.11.26])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l4MGk0eC002957
	for <PSARC-members@sac.sfbay.sun.com>; Tue, 22 May 2007 09:46:00 -0700 (PDT)
Received: from marduk.eng.sun.com (marduk.SFBay.Sun.COM [129.146.108.224])
	by engmail3mpk.sfbay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l4MGilEu016888;
	Tue, 22 May 2007 09:44:47 -0700 (PDT)
Received: from marduk.eng.sun.com (localhost [127.0.0.1])
	by marduk.eng.sun.com (8.13.6+Sun/8.12.11) with ESMTP id l4MGknpI014913;
	Tue, 22 May 2007 09:46:49 -0700 (PDT)
Received: (from gww@localhost)
	by marduk.eng.sun.com (8.13.6+Sun/8.12.11/Submit) id l4MGknuk014912;
	Tue, 22 May 2007 09:46:49 -0700 (PDT)
Date: Tue, 22 May 2007 09:46:49 -0700 (PDT)
From: Gary Winiger <gww@eng.sun.com>
Message-Id: <200705221646.l4MGknuk014912@marduk.eng.sun.com>
To: gww@eng.sun.com, Matthew.Ahrens@sun.com
Subject: Re: Enhancements to zpool history [PSARC/2006/625 Timeout:  11/15/2006]
Cc: PSARC-members@sac.sfbay.sun.com, zfs-eng@sun.com
X-Sun-Charset: US-ASCII
Status: RO
Content-Length: 865

Taking archiving this to the zpool history case offline.

> Gary Winiger wrote:
> >> We would like to make the output from 'zpool history -i' unstable, so that 
> > 							   ^^^^^^^^
> > 	Unstable like Evolving and Uncommitted does not permit incompatible
> > 	changes at will.  I'd suggest that you upgrade the taxonomy of
> > 	the command to the new public taxonomies:
> > 		Committed, Uncommitted, Volatile, Not-an-interface
> > 	as appropriate and that you do it as a separate case so it
> > 	gets the proper visibility.
> 
> Where can we find out what the new terms mean?

	Where did you look?  Did you look?  The same place it's been
	since 1992.
http://sac.eng.sun.com/cgi-bin/bp.cgi?NAME=interface_taxonomy.bp

	And the new shiny place that it's been for the last couple
	years.
http://opensolaris.org/os/community/arc/policies/interface-taxonomy/

Gary..

