From sacadmin Wed Aug  8 14:51:23 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 l78LpN7u029628
	for <PSARC-record@sac.sfbay.sun.com>; Wed, 8 Aug 2007 14:51:23 -0700 (PDT)
Received: from zion.eng.sun.com (localhost [127.0.0.1])
	by zion.eng.sun.com (8.14.1+Sun/8.14.1) with ESMTP id l78Ln3WB002933;
	Wed, 8 Aug 2007 14:49:03 -0700 (PDT)
Received: (from ahl@localhost)
	by zion.eng.sun.com (8.14.1+Sun/8.14.1/Submit) id l78Ln3fP002932;
	Wed, 8 Aug 2007 14:49:03 -0700 (PDT)
Date: Wed, 8 Aug 2007 14:49:02 -0700
From: Adam Leventhal <ahl@eng.sun.com>
To: Adam Leventhal <ahl@zion.eng.sun.com>
Cc: PSARC-record@sac.sfbay.sun.com, Eric.Schrock@Sun.COM,
        Adam Leventhal <ahl@eng.sun.com>
Subject: Re: /etc/{init,utmp}pipe to /var/run [PSARC/2007/455 FastTrack timeout 08/15/2007]
Message-ID: <20070808214902.GB4529@eng.sun.com>
References: <200708082109.l78L9AVZ007682@zion.eng.sun.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200708082109.l78L9AVZ007682@zion.eng.sun.com>
User-Agent: Mutt/1.5.10i
Status: RO
Content-Length: 3522

This case would normally qualify for self review, however since the
interfaces being changed predate any ARC classification, it is being
filed as closed approved automatic to document the interfaces.  The
release binding is Minor.

Adam

---8<---

A. DESCRIPTION

Solaris currently delivers two files into /etc that are runtime FIFOs
for daemons, /etc/initpipe and /etc/utmppipe.  These files should be
installed into /var/run in accordance with current practice.  This case
does not seek to change the location of any other runtime files in /etc.


B. DETAILS

The /etc/utmppipe file is managed by svc:/system/utmp:default, which has
the dependency chain:

	milestone/sysconfig
		|
		V
	milestone/single-user
		|
		V
	filesystem/minimal

This dependency is necessary because the daemon is responsible for
managing files in /var/adm.  As filesystem/minimal is responsible for
mounting /var, it is permissible to use files in that directory -- there
is no reason for this file to be in /etc.

The /etc/initpipe file is managed by init, and therefore could
theoretically be usable before filesystem/minimal is online, as early as
filesystem/usr.  However, svc.startd is responsible for poking init to
indicate that the pipe is now writable, and it does not do this until
after filesystem/minimal has come online, as part of
special_fsminimal_post_online().  The pipe is used only when updating
/var/adm/utmpx (so init can keep track of "godchildren"), so there is no
reason for this functionality to be available before /var is mounted
writable.

These files will be renamed:

	/etc/initpipe	->	/var/run/initpipe
	/etc/utmppipe	->	/var/run/utmppipe

As these are runtime files only, there is no need to migrate old files
on upgrade.


C. EXTERNAL USE

Since these interfaces predate any formal ARC classification, a search
was done to find any external consumers of these files.  Within Sun, the
following references were found:

	- WBEM includes a module for provisioning a diskless client's
	  root filesystem configuration.  Among other various broken
	  assumptions (the module hasn't been updated since 2001), the
	  smossclntmod() function does a mknod() of /etc/initpipe.  This
	  is entirely unnecessary, as the file will be created
	  automatically if it isn't there.  Creating this file is
	  benign, since it simply won't be used.  At a future point the
	  WBEM code can be removed, but its removal is not a
	  requirement for this case.

Outside of Sun, a search through koders.com and Google code search found
only the following non-Solaris references:

	- /etc/initpipe is used by a single script in the ISG Toolchest
	  (http://isg.ee.ethz.ch/tools/isgtc/) as a "key file" for
	  (as far as I can tell) identifying a Solaris host in a
	  diskless client setting.

	- Tripwire identifies both /etc/initpipe and /etc/utmppipe as
	  system FIFOs and therefore exceptions from monitoring.
	  Various other home brewed tripwire-like programs also encode
	  /etc/utmppipe as an exception.  These applications are
	  unaffected by the path change, as the file simply will be
	  missing, and they already understand that files under /var/run
	  are subject to modification while the system is running.

Given these limited use cases, it is safe to qualify these as
consolidation private interfaces.


D. INTERFACES

This case updates the following files:

	/var/run/initpipe	Consolidation Private
	/var/run/utmppipe	Consolidation Private

-- 
Adam Leventhal, Solaris Kernel Development       http://blogs.sun.com/ahl

