{"record":{"id":"72f6644d18a4d90f","repo":"puppetlabs/puppet","slug":"unmanageable-state-state-on-service-name","errorCode":null,"errorMessage":"Unmanageable state '#{state}' on service #{name}","messagePattern":"Unmanageable state '#(.+?)' on service #(.+?)","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/provider/service/smf.rb","lineNumber":230,"sourceCode":"      # TODO (PUP-8957): Should this be set back to INFO ?\n      debug \"Could not get status on service #{name} #{e}\"\n      return :stopped\n    end\n\n    case state\n    when \"online\"\n      :running\n    when \"offline\", \"disabled\", \"uninitialized\"\n      :stopped\n    when \"maintenance\"\n      :maintenance\n    when \"degraded\"\n      :degraded\n    when \"legacy_run\"\n      raise Puppet::Error,\n            \"Cannot manage legacy services through SMF\"\n    else\n      raise Puppet::Error,\n            \"Unmanageable state '#{state}' on service #{name}\"\n    end\n  end\n\n  # Helper that encapsulates the clear + svcadm [enable|disable]\n  # logic in one place. Makes it easy to test things out and also\n  # cleans up flush's code.\n  def maybe_clear_service_then_svcadm(cur_state, subcmd, flags)\n    # If the cur_state is maint or degraded, then we need to clear the service\n    # before we enable or disable it.\n    adm('clear', service_fmri) if [:maintenance, :degraded].include?(cur_state)\n    adm(subcmd, flags, service_fmri)\n  end\n\n  # The flush method is necessary for the SMF provider because syncing the enable and ensure\n  # properties are not independent operations like they are in most of our other service\n  # providers.\n  def flush","sourceCodeStart":212,"sourceCodeEnd":248,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/provider/service/smf.rb#L212-L248","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# surface unmappable states before the provider does\nstate=$(LC_ALL=C svcs -H -o state \"${name}\" 2>/dev/null)\ncase \"$state\" in\n  online|offline|disabled|uninitialized|maintenance|degraded|legacy_run) ;;\n  *) echo \"svcs reports unknown state '${state}' — provider too old for this Solaris?\" ;;\nesac","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["puppet","solaris","smf","unknown-state"],"backgroundTag":"unsupported-resource-state","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}