puppetlabs/puppet · error · Puppet::Error
Cannot query if the %{service} service is complete: The conc
Error message
Cannot query if the %{service} service is complete: The concept of complete/incomplete services was introduced in Solaris 11.1. You are on a Solaris %{release} machine. What it means
The SMF provider's complete_service? checks whether a service has the general/complete property (introduced with incomplete-service support in Solaris 11.1). It first calls supports_incomplete_services?, which compares the os.release.full fact against 11.1 with versioncmp; on older Solaris it raises immediately rather than returning a meaningless answer.
Source
Thrown at lib/puppet/provider/service/smf.rb:113
lines.select! { |line| line =~ /^fmri/ }
fmris = lines.map! { |line| line.split(' ')[-1].chomp }
unless fmris.length == 1
raise Puppet::Error, _("Failed to get the FMRI of the %{service} service: The pattern '%{service}' matches multiple FMRIs! These are the FMRIs it matches: %{all_fmris}") % { service: @resource[:name], all_fmris: fmris.join(', ') }
end
@fmri = fmris.first
end
# Returns true if the provider supports incomplete services.
def supports_incomplete_services?
Puppet::Util::Package.versioncmp(Puppet.runtime[:facter].value('os.release.full'), '11.1') >= 0
end
# Returns true if the service is complete. A complete service is a service that
# has the general/complete property defined.
def complete_service?
unless supports_incomplete_services?
raise Puppet::Error, _("Cannot query if the %{service} service is complete: The concept of complete/incomplete services was introduced in Solaris 11.1. You are on a Solaris %{release} machine.") % { service: @resource[:name], release: Puppet.runtime[:facter].value('os.release.full') }
end
return @complete_service if @complete_service
# We need to use the service's FMRI when querying its config. because
# general/complete is an instance-specific property.
fmri = service_fmri
# Check if the general/complete property is defined. If it is undefined,
# then svccfg will not print anything to the console.
property_defn = svccfg("-s", fmri, "listprop", "general/complete").chomp
@complete_service = !property_defn.empty?
end
def enable
@properties_to_sync[:enable] = true
end
View on GitHub (pinned to e227c27540)
Solutions
- Gate SMF completeness-dependent declarations by OS release in the profile (versioncmp against '11.1')
- Upgrade the node to Solaris 11.1 or later if incomplete-service management is required
- Verify the fact: puppet facts | grep release.full — odd strings make versioncmp misbehave
- Keep Solaris 10 nodes on a separate profile that avoids the completeness code path
Example fix
# before
service { 'svc:/application/myapp:default':
ensure => running,
provider => 'smf',
}
# after
if $facts['os']['family'] == 'Solaris' and versioncmp($facts['os']['release']['full'], '11.1') >= 0 {
service { 'svc:/application/myapp:default':
ensure => running,
provider => 'smf',
}
} Defensive patterns
Strategy: validation
Validate before calling
# gate SMF completeness paths at compile time
if $facts['os']['family'] == 'Solaris' and versioncmp($facts['os']['release']['full'], '11.1') < 0 {
fail('SMF incomplete-service features need Solaris >= 11.1')
} Prevention
- Split Solaris profiles by release (10 vs 11.1+) instead of sharing one service profile
- Pin os.release.full fact expectations in specs so versioncmp behavior is covered by tests
- Watch for odd fact strings (e.g. '11.1_SRRA') that can mis-sort in versioncmp
When it happens
Trigger: A catalog that reaches complete_service? — e.g. managing an SMF service whose manifest/state forces the completeness check during flush/enable logic — on Solaris 11.0, 10, or anything where os.release.full sorts below 11.1. versioncmp('11.0','11.1') < 0 trips it; note that lexical facts (e.g. '11.1_SRRA') can also mis-sort.
Common situations: Modules developed and tested on Solaris 11.2+ deployed onto Solaris 10/11.0 fleets; fact values from older Facter or zones reporting partial release strings; catalogs shared across a mixed-OS estate with one service profile.
Related errors
- Failed to get the FMRI of the %{service} service: The patter
- Timed out waiting for #{@resource[:name]} to transition stat
- Cannot manage legacy services through SMF
- Unmanageable state '#{state}' on service #{name}
- The pkg-get command is missing; blastwave packaging unavaila
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/5dd7e309b2067b2b.
Report an issue: GitHub.