puppetlabs/puppet · error · Puppet::Error
Unmanageable state '#{state}' on service #{name}
Error message
Unmanageable state '#{state}' on service #{name} What it means
The same SMF state-mapping case statement has a catch-all: any svcs state string other than online, offline, disabled, uninitialized, maintenance, degraded, or legacy_run raises 'Unmanageable state'. This fires when Solaris reports a state the provider's mapping predates or an unexpected value reaches status.
Source
Thrown at lib/puppet/provider/service/smf.rb:230
# TODO (PUP-8957): Should this be set back to INFO ?
debug "Could not get status on service #{name} #{e}"
return :stopped
end
case state
when "online"
:running
when "offline", "disabled", "uninitialized"
:stopped
when "maintenance"
:maintenance
when "degraded"
:degraded
when "legacy_run"
raise Puppet::Error,
"Cannot manage legacy services through SMF"
else
raise Puppet::Error,
"Unmanageable state '#{state}' on service #{name}"
end
end
# Helper that encapsulates the clear + svcadm [enable|disable]
# logic in one place. Makes it easy to test things out and also
# cleans up flush's code.
def maybe_clear_service_then_svcadm(cur_state, subcmd, flags)
# If the cur_state is maint or degraded, then we need to clear the service
# before we enable or disable it.
adm('clear', service_fmri) if [:maintenance, :degraded].include?(cur_state)
adm(subcmd, flags, service_fmri)
end
# The flush method is necessary for the SMF provider because syncing the enable and ensure
# properties are not independent operations like they are in most of our other service
# providers.
def flushView on GitHub (pinned to e227c27540)
Solutions
- See the raw value: svcs -H -o state <fmri> and compare with the recognized list in the error's sibling branches
- Upgrade Puppet to a release matching your Solaris version (state mapping fixes land in newer providers)
- Force a sane locale (LC_ALL=C) for the agent environment so svcs output is not transformed
- If the state is transitional, re-run after it settles; if persistent, report the state string upstream
Defensive patterns
Strategy: validation
Validate before calling
# surface unmappable states before the provider does
state=$(LC_ALL=C svcs -H -o state "${name}" 2>/dev/null)
case "$state" in
online|offline|disabled|uninitialized|maintenance|degraded|legacy_run) ;;
*) echo "svcs reports unknown state '${state}' — provider too old for this Solaris?" ;;
esac Prevention
- Pin a Puppet version compatible with your Solaris SRU level and test svcs state mapping in CI
- Run the agent with LC_ALL=C so svcs output is never locale-mangled
- Collect the raw svcs state in a custom fact to detect vocabulary drift before catalog runs
When it happens
Trigger: svcs emitting a state string added in a newer/older Solaris patch level than the provider's mapping knows, or a corrupted/empty state field (state column parse returning something odd) during a status query on the smf provider.
Common situations: Running an older Puppet on a newer Solaris update that introduced state vocabulary; SRU upgrades changing svcs output; zones reporting transitional states; output-mangling locales or wrappers around svcs.
Related errors
- Failed to get the FMRI of the %{service} service: The patter
- Cannot query if the %{service} service is complete: The conc
- Timed out waiting for #{@resource[:name]} to transition stat
- Cannot manage legacy services through SMF
- The pkg-get command is missing; blastwave packaging unavaila
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/72f6644d18a4d90f.
Report an issue: GitHub.