The following is a proposal on how to manage syncing between BEs
in Snap Upgrade.  This was an issue brought up during design review.
Your thoughts/comments are welcome...


Background
----------
There are certain directories and files that we want to be kept
in sync across BEs.  An easy example of this is the /var/mail directory.
When rebooting to a different BE, we want that BE to see /var/mail in
the exact state it was in for the previous BE right before reboot.
Some sort of syncing mechanism is needed to accomplish this.

Live Upgrade accomplishes this by actually copying files and
directories from the previously booted BE to the newly booted BE
upon boot up.  This potentially requires a large amount of work during
shutdown and bootup.  It also, requires maintenance in tracking which
BE was the previously booted BE, etc.  Both these are things we would
like to avoid doing in Snap Upgrade.



Requirements
------------
1. Avoid needing "init 6" to boot between BEs (shutdown scripts)

2. Ensure the current BE's namespace is safely protected from
software updates to other BEs.

3. Works for zones.



Proposal
--------
A proposal we have for solving this in Snap Upgrade, is to create
a /var/shared directory which will be its own dataset shared across
all Snap Upgrade BEs.  We will move the directories that we want
"synced" under /var/shared and create symlinks from their original
locations.  The directories that we are proposing to do this with are:

/var/adm
/var/log
/var/mail
/var/spool


Restrictions/Issues
-------------------
The list of items being synced will no longer be a publicly
modifiable interface.  Users will no longer be able to add
arbitrary files or dirs that they want synced.

To keep the current BE's namespace safe, the /var/shared directory
must be mounted read-only for alternate BEs.  pkg(5) transactions
against mounted BE alternate roots will require special support.

For this to be supportable with zones, a separate /var/shared
dataset will need to exist for every zone.  Upon BE creation,
corresponding zones across BEs share a /var/shared dataset.
--
This message posted from opensolaris.org

Reply via email to