puppetlabs/puppet · error · Puppet::Error

Could not create

Error message

Could not create %{resource} %{name}: %{detail}

What it means

The AIX command issued by create failed (Puppet::ExecutionFailure); this rescue wraps the underlying command error with the resource kind and name for context.

Solutions

  1. Inspect the wrapped detail for the actual command failure (bad attribute, duplicate name, permissions)
  2. Verify the object does not already exist on the AIX host
  3. Check that required AIX attributes and flags are correct for the create command
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at lib/puppet/provider/aix_object.rb:477 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of puppetlabs/puppet@e227c27540 (2026-08-21). Data as JSON: /api/errors/8cf25fc78b505f3b. Report an issue: GitHub.

Appendix: source

Thrown at lib/puppet/provider/aix_object.rb:477

  def exists?
    !object_info.nil?
  end

  # Creates a new instance of the resource
  def create
    attributes = @resource.should(:attributes) || {}
    validate_new_attributes(attributes)

    mappings[:aix_attribute].each do |property, aix_attribute|
      property_should = @resource.should(property)
      next if property_should.nil?

      attributes[aix_attribute.name] = aix_attribute.convert_property_value(property_should)
    end

    execute(addcmd(attributes))
  rescue Puppet::ExecutionFailure => detail
    raise Puppet::Error, _("Could not create %{resource} %{name}: %{detail}") % { resource: @resource.class.name, name: @resource.name, detail: detail }, detail.backtrace
  end

  # Deletes this instance resource
  def delete
    execute(deletecmd)

    # Recollect the object info so that our current properties reflect
    # the actual state of the system. Otherwise, puppet resource reports
    # the wrong info. at the end. Note that this should return nil.
    object_info(true)
  rescue Puppet::ExecutionFailure => detail
    raise Puppet::Error, _("Could not delete %{resource} %{name}: %{detail}") % { resource: @resource.class.name, name: @resource.name, detail: detail }, detail.backtrace
  end
end

View on GitHub (pinned to e227c27540)