Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

svc.zones(8)

Name

svc.zones - Solaris Management Facility delegated restarter for zones(7)

Synopsis

/usr/lib/zones/svc.zones
svc:/system/zones:default

Description

svc.zones is the Service Management Facility (SMF) delegated restarter for zones(7). Each zone is represented by an instance of the zone service:

svc:/system/zones/zone

The instance name matches the zonename.

The zones delegated restarter sets up the infrastructure for zones(7) to work. The failures and activity from setting up zones infrastructure will be logged at:

/var/log/zones/<zonename>.messages

Failures during the infrastructure setup of a particular zone, will place that zone in maintenance. The zones delegated restarter will retry the infrastructure setup on svcadm(8) clear for zones in maintenance because of failures in its infrastructure setup.

The zones delegated restarter performs autobooting of zones at start time according to each zone's autoboot property setting. For more information, see the zones(7) and zonecfg(8) manual pages. Likewise, during a graceful shutdown of the global zone, the zones delegated restarter service shuts down, halts, or suspends each zone, depending on its autoshutdown property. For more information, see the zonecfg(8) manual page.

The zones autoboot and shutdown are performed in parallel, and the number of concurrent operations can be limited. For more information, see the "Zones Delegated Restarter Properties" below.

Zone SMF Dependencies

The set of SMF FMRIs that constitute the zone dependencies will be defined by a new zonecfg(8) resource dependency. It is comprised of grouping properties and FMRI properties. All SMF dependencies for a zone will be of type service, and have restart_on attribute as none.

The following zonecfg(8) commands creates SMF dependencies:

add smf-dependency
	set name=firewall
	set fmri=svc:/system/zones/zone:appfirewall
	set grouping=require_any
	end
add smf-dependency
	set name=firewall
	set fmri=svc:/3rdparty/my-firewall:default
	end
add smf-dependency
	set fmri=svc:/system/zones/zone:dataload
	set grouping=exclude_all
	end

The default for grouping is require_all and must not be explicitly set. The FMRI values will be validated against libscf(3LIB) SCF_TYPE_FMRI.

Zones Boot Ordering

There are two ways to establish the zone's boot order:

  1. Determining the SMF dependencies of a zone SMF instance.

  2. Assigning boot priority of each zone.

Once the SMF dependencies are satisfied for a zone, that zone is placed in a queue according to its priority. To assign a boot priority for a zone, use the zonecfg boot-priority property. For more information on boot-priority property, see the zonecfg(8) manual page. The zones restarter will boot the zones from high to low boot priority in the queue.

Note that the boot ordering based on assigned boot priority is best-effort and thus non-deterministic. It is not guaranteed that all zones with higher boot priority will be booted before all zones with lower boot priority. If your configuration requires a deterministic behavior, use SMF dependencies.

Zones Delegated Restarter Properties

config/track-zone-goals

This boolean property tells the zones restarter when should a zone SMF instance be placed in the online state. If set to false, the zones restarter will place a zone SMF instance in the online state, immediately when the zone begins to boot up. When set to true, the online state of a zone SMF instance will be considered according to the online state description in the "Service States" section. The default value of this property is true.

config/concurrent-boot-shutdown

The maximum number of concurrent zones booting up or shutting down.

config/concurrent-suspend-resume

The maximum number of concurrent zones performing suspend or resume operations.

options/logging

The level of logging performed by the zones restarter.

The valid values are:

quiet

Minimal logging is performed and only errors are reported.

verbose

Verbose logging is performed.

debug

Debug logging is performed.

The following example shows how to set one of the above properties:

# svccfg -s svc:/system/zones:default setprop \
    config/concurrent-boot-shutdown = 10
# svcadm refresh svc:/system/zones:default

The Zones Restarter will not limit the number of concurrent operations if the property has no value, or if the property is absent.

The booting process of a non-global zone will be considered complete when the zone SMF instance reaches the online state or the maintenance state. Please see the "Service States" section below for details on the semantics of the SMF states for zones.

Zone Commands Interaction with the Zones Delegated Restarter

zoneadm(8) commands can override the zones delegated restarter and SMF graph engine.

A zone can be booted by an administrator even if its SMF dependencies have not been satisfied. In this case, the zone SMF instance will be placed in the online or maintenance states, according to the semantics described in the "Service States" section below. Note that since all zone SMF dependencies have the restart_on attribute as none, the graph engine will not send a stop event to the zone SMF instance if the SMF dependencies for that zone are not satisfied before its boot.

Disabling a zone SMF instance that is in maintenance state because the zone is in an unbootable state, will not clear the SMF maintenance state. Disabling a zone SMF instance will only clear a maintenance state caused by the zone's milestone/goals dependencies requiring administrative action to be satisfied. In this case, disabling the zone SMF instance will shutdown the zone.

The zones boot priority and concurrent threshold only apply to operations caused by the SMF graph engine events. Admin commands are not subject to boot priority or concurrent threshold. This way, if a zone is assigned a low priority, the admin can boot it up manually without waiting for the many zones with higher priority to boot up.

Service States

As part of its service management duties, the svc.zones implements a state machine for each of its managed zone SMF instance. The states in this machine are made up of the smf(7) set of states. The semantics of these states are as follows:

uninitialized

svc.zones is yet to process this instance.

online

The zone is running and has reached the milestone/goals. For zones that do not support milestone/goals, the online state will be reached immediately when the zone begins to boot. For more information on milestone/goals, see the smf(7) manual page.

degraded

The zone SMF instance has reached the online state, but zoneadmd(8) has failed multiple times and is not running.

offline

The zone SMF instance is enabled, but its SMF dependencies have not been satisfied.

disabled

The zone is halted and will not be booted up by the zones delegated restarter.

maintenance

A zone SMF instance can be in this state because of the following reasons:

  • Failed boot attempt

  • The zone is in a state from which it cannot be booted

  • The zone's milestone/goals dependencies cannot be satisfied without administrative action.

The output of svcs -vx command should be used to determine the reason for the maintenance state. A zone SMF instance in maintenance will not clear the maintenance state on a disabled event.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/zones
Interface Stability
Committed

See Also

attributes(7), init(8), libscf(3LIB), smf(7), solaris-kz(7), svcadm(8), svcs(1), zoneadm(8), zoneadmd(8), zonecfg(8), zones(7)