puppetlabs/puppet · error · Puppet::Error

Timed out waiting for #{@resource[:name]} to transition stat

Error message

Timed out waiting for #{@resource[:name]} to transition states

What it means

AIX SRC services change state asynchronously, so the src provider wraps start/stop with wait(desired_state): a loop polling self.status once per second under Timeout.timeout(60), converting Timeout::Error into Puppet::Error. The command (startsrc/stopsrc) already succeeded by then — the failure is purely the daemon failing to reach running/stopped within 60 seconds.

Source

Thrown at lib/puppet/provider/service/src.rb:82

  def disable
    rmitab(@resource[:name])
  end

  # Wait for the service to transition into the specified state before returning.
  # This is necessary due to the asynchronous nature of AIX services.
  # desired_state should either be :running or :stopped.
  def wait(desired_state)
    Timeout.timeout(60) do
      loop do
        status = self.status
        break if status == desired_state.to_sym

        sleep(1)
      end
    end
  rescue Timeout::Error
    raise Puppet::Error, "Timed out waiting for #{@resource[:name]} to transition states"
  end

  def start
    super
    wait(:running)
  end

  def stop
    super
    wait(:stopped)
  end

  def restart
    execute([command(:lssrc), "-Ss", @resource[:name]]).each_line do |line|
      args = line.split(":")

      next unless args[0] == @resource[:name]

View on GitHub (pinned to e227c27540)

Solutions

  1. Check real state and diagnostics: lssrc -s <name>, plus the subsystem's own error log (/var/adm/ras, errpt)
  2. For slow-stopping daemons, stop via a dedicated stop command or extend drain outside puppet before managing ensure => stopped
  3. Fix the subsystem's start failure (ODM stanza, paths, user) so it actually reaches active
  4. Re-run the agent after correcting the subsystem; no Puppet-side timeout is configurable for this wait
Defensive patterns

Strategy: validation

Validate before calling

# AIX: confirm the subsystem is in a workable state before managing it
lssrc -s "${name}"
errpt -s "$(date +%m%d0000$(date +%Y)" 2>/dev/null | tail -1 >/dev/null || true
# subsystem entry missing from SRC = start/wait will fail

Prevention

When it happens

Trigger: start followed by wait(:running) when the SRC subsystem crashes right after starting (config error, missing binary) so status never reports running; stop followed by wait(:stopped) when the subsystem ignores SIGTERM or hangs in shutdown; overloaded AIX LPARs where the subsystem needs more than 60s.

Common situations: Misconfigured subsystems (bad ODM entries, missing environment); applications with long shutdown drains (databases, app servers) exceeding 60s; /etc/inittab vs SRC mismatches after mksysb restores.

Understand the failure class

Related errors


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