puppetlabs/puppet · error · Puppet::Error
Unable to unfreeze %{package}
Error message
Unable to unfreeze %{package} What it means
Raised by `unhold` (lib/puppet/provider/package/pkg.rb:125) in the Solaris `pkg` provider. Before install/update it runs `pkg unfreeze <name>` and accepts exit codes 0 (success) and 4 (nothing frozen); any other exit code aborts with Puppet::Error carrying the command's combined stdout/stderr in %{package}.
Source
Thrown at lib/puppet/provider/package/pkg.rb:125
{ :publisher => Regexp.last_match(1), :name => Regexp.last_match(2), :ensure => Regexp.last_match(3) }.merge ifo_flag(Regexp.last_match(4))
# FMRI STATE UFOXI
# pkg://solaris/SUNWcs@0.5.11,5.11-0.151.0.1:20101105T001108Z installed u----
when %r{^pkg://([^/]+)/([^@]+)@(\S+) +(\S+) +(.....)$}
{ :publisher => Regexp.last_match(1), :name => Regexp.last_match(2), :ensure => Regexp.last_match(3) }.merge pkg_state(Regexp.last_match(4)).merge(ufoxi_flag(Regexp.last_match(5)))
else
raise ArgumentError, _('Unknown line format %{resource_name}: %{parse_line}') % { resource_name: name, parse_line: line }
end).merge({ :provider => name })
end
def hold
pkg(:freeze, @resource[:name])
end
def unhold
r = exec_cmd(command(:pkg), 'unfreeze', @resource[:name])
raise Puppet::Error, _("Unable to unfreeze %{package}") % { package: r[:out] } unless [0, 4].include? r[:exit]
end
def insync?(is)
# this is called after the generic version matching logic (insync? for the
# type), so we only get here if should != is, and 'should' is a version
# number. 'is' might not be, though.
should = @resource[:ensure]
# NB: it is apparently possible for repository administrators to publish
# packages which do not include build or branch versions, but component
# version must always be present, and the timestamp is added by pkgsend
# publish.
if /^[0-9.]+(,[0-9.]+)?(-[0-9.]+)?:[0-9]+T[0-9]+Z$/ !~ should
# We have a less-than-explicit version string, which we must accept for
# backward compatibility. We can find the real version this would match
# by asking pkg for the all matching versions, and selecting the first
# installable one [0]; this can change over time when remote repositories
# are updated, but the principle of least astonishment should still hold:
# if we allow users to specify less-than-explicit versions, theView on GitHub (pinned to e227c27540)
Solutions
- Run `pkg unfreeze <package>` manually as root and read the real error printed to stdout/stderr (it is embedded in the Puppet message).
- Ensure the puppet agent runs as root on Solaris hosts.
- Repair the image with `pkg verify` / `pkg fix`, or `pkg rebuild-index` where applicable.
- Free disk space and confirm /var/pkg is writable, then let Puppet retry.
Defensive patterns
Strategy: validation
Validate before calling
# Only rely on unhold when a freeze actually exists and unfreeze succeeds as root
pkg freeze -l | grep -q "^${name}@" && pkg unfreeze "${name}" || echo "nothing frozen or cannot unfreeze - investigate as root" Prevention
- Run the puppet agent as root on Solaris.
- Keep /var/pkg writable and the image healthy (pkg verify after crashes).
- Pre-clear holds manually before maintenance windows that change frozen packages.
When it happens
Trigger: `pkg unfreeze` returning something other than 0/4: agent running without root privileges (cannot modify /var/pkg), a corrupted package image, an invalid package operand, or disk/filesystem errors.
Common situations: puppet agent running as a non-root or RBAC-restricted user; image left inconsistent after a crashed pkg operation; read-only or full /var filesystem.
Related errors
- Unable to update %{package}
- Unknown format %{resource_name}: %{full_flags}[%{bad_flag}]
- Unknown format %{resource_name}: %{state}
- Unknown line format %{resource_name}: %{parse_line}
- No version of %{name} matching %{should} is installable, eve
AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21).
Data as JSON: /api/errors/06e76ff0c3b422b7.
Report an issue: GitHub.