Over the past few weeks, there has been some discussion on this
alias about a /var/share directory and how it would solve part of
the "BE syncing" issue, so I would like to probe out the definition
of it a little more here and get some thoughts on what people think
about this.
The /var/share definition, requirements, and limitations will be
proposed below. This proposal is *not* intended to include
discussion about what the content of /var/share should be (so if you
have opinions on that, please hold them aside or continue that in
a separate thread). What this proposal is meant to achieve is the
design and structure of this new directory.
The purpose of the /var/share directory is so that we can identify
what needs to be kept "in sync" across BEs. The mechanism used to
actually keep BEs "in sync" will be a separate proposal. The
definition of /var/share and its proposal here does not depend on
that mechanism, but rather the inverse is true. The main requirement
in achieving "syncing" is to do it without interrupting or
interfering with the system's name space. The fact that things are
being kept "in sync" should be transparent to the OS itself. The
general requirements for /var/share are:
1. /var/share and any of its components are not required to
be shared across BEs for a system to boot and function.
2. The system's name space and integrity are always intact.
3. Software updates (like pkg updates) needn't have any
knowledge of how /var/share content is being "synced"
or shared between BEs.
Some additional requirements specific to, and needed for, the
management of BEs are:
4. Avoid needing shutdown/startup script coordination
5. Ensure that the current BE's name space is safely
protected from software updates to other BEs.
6. Works for zones.
Definition
----------
The /var/share directory will be defined as the directory where
data that could be shared across multiple instances of Solaris on
the same host should be placed. The multiple instances of Solaris
may have different versions of Solaris software installed.
- /var/share may not contain any pkg registered static files.
Editable files are okay.
- Pkg registered directories under /var/share should be only one
level deep.
For example,
/var/share/mail
/var/share/mqueue
/var/share/stuff
Because of the single level of pkg registered directories under
/var/share, any structure or directory organization that an
application might want to deliver to /var/share must be delivered
elsewhere and create symlinks into /var/share for each directory
that needs to be shared.
For example, an application cannot deliver this in their package:
/var/share/app/logsA
/var/share/app/dir1/logsB/
/var/share/app/dir2/logsC/
Instead, the application must deliver this directory structure
elsewhere on the system, and deliver single level directories in
/var/share for the directories that need to be shared, and create
symlinks to them:
/var/app/logsA/ -> ../share/logsA/
/var/app/dir1/logsB/ -> ../../share/logsB/
/var/app/dir2/logsC/ -> ../../share/logsC/
/var/share/logsA/
/var/share/logsB/
/var/share/logsC/
Unregistered subdirectories however, may exist underneath the
pkg registered directory.
thanks,
-ethan