OpenSolaris

Discussions Communities Projects Download Source Browser

Home » OpenSolaris Forums » zones » discuss

Thread: Request for Comments: Zones Rename

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 2 - Last Post: Aug 28, 2005 11:01 PM by: dp
dp

Posts: 807
From: US

Registered: 3/9/05
Request for Comments: Zones Rename
Posted: Aug 19, 2005 4:31 PM

  Click to reply to this thread Reply


Hi all,

I've just submitted to our internal ARC (architectural review) the
following proposal. The timer is set for Friday August 26, 2005.
I'd appreciate any comments you may have by then.

Remember that this is a *proposal* and may not represent the final form
this work will take. Thanks for your comments,

-dp

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Zone Rename
Daniel Price (dp@eng)

A. Introduction

This case proposes a new facility for zones[1]: rename of non-global
zones. Patch binding is requested for this facility. The stability
of the interface is "evolving."

B. Motivation

Platinum Beta customers have requested this functionality [2]. We've also heard
this request on some public forums [3]. Additionally, this is a logical
extension to the zones management tools we provide today. We expect that
customers will rename zones to track departmental organization changes or for
the repurposing of zones (for example in a shift from test to production
environments).

C. Zone Rename Details

Zone rename is exposed via the zonecfg command; the command is simply
extended such that 'zonename' becomes a settable attribute in the same
fashion as 'zonepath' or 'autoboot.' This is probably best seen by example:

$ zonecfg -z aaa
zonecfg:aaa> set zonename=bbb
zonecfg:bbb> commit
zonecfg:bbb> info
zonename: bbb
zonepath: /tmp/z
autoboot: false
...

This is a straightforward and compatible extension to the zonecfg command.
Rename is permitted only when a zone is not running; while "live rename"
(i.e. rename of an active zone) might in theory be possible, it would be quite
complex to implement and no customers have requested it. To be precise:
only zones in the "configured", "incomplete" or "installed" states can be
renamed.

Rename is never allowed to an existing zone name:

# zonecfg -z aaa
zonecfg:aaa>
zonecfg:aaa> set zonename=bbb
bbb: Zone name already in use
zonecfg:aaa>


One subtlety is the behavior of 'export' and 'info'. The 'export' subcommand
produces a series of commands as follows:

zonecfg:moo> export
create -b
set zonepath=/mmoooo
...

'export' is *not* altered by this project to emit the zonename, as we expect
that customers may wish to do:

zonecfg -z zone1 export | zonecfg -z zone2

If 'set zonename=zone1' were part of the export, then the import to zone2 would
not work properly, since both zones would have the same name, which is illegal.

The 'info' command (shown earlier) *is* updated by this project, so that the
zone name is emitted; this is a signal to the user that this is eligible for
editing; it is possible that some consumers which parse the output of 'info'
could break if they depended on the exact output order of fields. If this risk
is deemed unacceptable, this could be omitted from the output of 'info'. The
project team analyzed the 'webmin' source code and determined that webmin is not
negatively affected by this change.

A second subtlety is the behavior of the 'revert' command. In the event that
the zone is renamed, 'revert' will revert back to the previous zone name if the
configuration has not yet been committed. In other words:

zonecfg:moo> set zonename=newzonename
zonecfg:newzonename> revert
Are you sure you want to revert (y/[n])? y
zonecfg:moo>

As with other zonecfg interactions, no changes are made on-disk until the
'commit' command is used.


Appendix A. References:

1. PSARC 2002/174 Virtualization and Namespace Isolation in Solaris
2. http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=5022506
3. http://forum.sun.com/thread.jspa?threadID=21944&messageID=66544
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

--
Daniel Price - Solaris Kernel Engineering - dp at eng dot sun dot com - blogs.sun.com/dp
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org



dp

Posts: 807
From: US

Registered: 3/9/05
Re: Request for Comments: Zones Rename
Posted: Aug 20, 2005 11:15 AM   in response to: dp

  Click to reply to this thread Reply

On Fri 19 Aug 2005 at 04:31PM, Dan Price wrote:
>
> Hi all,
>
> I've just submitted to our internal ARC (architectural review) the
> following proposal. The timer is set for Friday August 26, 2005.
> I'd appreciate any comments you may have by then.

I'd also like to ask that substantive comments be CC'd to the alias.
It's better to have them on the record than not.

-dp

--
Daniel Price - Solaris Kernel Engineering - dp at eng dot sun dot com - blogs.sun.com/dp
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org



dp

Posts: 807
From: US

Registered: 3/9/05
Re: Request for Comments: Zones Rename
Posted: Aug 28, 2005 11:01 PM   in response to: dp

  Click to reply to this thread Reply

On Sat 20 Aug 2005 at 11:15AM, Dan Price wrote:
> On Fri 19 Aug 2005 at 04:31PM, Dan Price wrote:
> >
> > Hi all,
> >
> > I've just submitted to our internal ARC (architectural review) the
> > following proposal. The timer is set for Friday August 26, 2005.
> > I'd appreciate any comments you may have by then.
>
> I'd also like to ask that substantive comments be CC'd to the alias.
> It's better to have them on the record than not.

This case was approved by PSARC and is now marked as such; thanks to
the folks who provided comments offline. A codereview is forthcoming.

-dp

--
Daniel Price - Solaris Kernel Engineering - dp at eng dot sun dot com - blogs.sun.com/dp
_______________________________________________
zones-discuss mailing list
zones-discuss at opensolaris dot org






Terms of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
Copyright © 1995-2005 Sun Microsystems, Inc.