{"record":{"id":"648618a37ad51d52","repo":"puppetlabs/puppet","slug":"timed-out-waiting-for-resource-name-to-trans-648618","errorCode":null,"errorMessage":"Timed out waiting for #{@resource[:name]} to transition states","messagePattern":"Timed out waiting for #(.+?) to transition states","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/provider/service/src.rb","lineNumber":82,"sourceCode":"\n  def disable\n    rmitab(@resource[:name])\n  end\n\n  # Wait for the service to transition into the specified state before returning.\n  # This is necessary due to the asynchronous nature of AIX services.\n  # desired_state should either be :running or :stopped.\n  def wait(desired_state)\n    Timeout.timeout(60) do\n      loop do\n        status = self.status\n        break if status == desired_state.to_sym\n\n        sleep(1)\n      end\n    end\n  rescue Timeout::Error\n    raise Puppet::Error, \"Timed out waiting for #{@resource[:name]} to transition states\"\n  end\n\n  def start\n    super\n    wait(:running)\n  end\n\n  def stop\n    super\n    wait(:stopped)\n  end\n\n  def restart\n    execute([command(:lssrc), \"-Ss\", @resource[:name]]).each_line do |line|\n      args = line.split(\":\")\n\n      next unless args[0] == @resource[:name]\n","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/provider/service/src.rb#L64-L100","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check real state and diagnostics: lssrc -s <name>, plus the subsystem's own error log (/var/adm/ras, errpt)","For slow-stopping daemons, stop via a dedicated stop command or extend drain outside puppet before managing ensure => stopped","Fix the subsystem's start failure (ODM stanza, paths, user) so it actually reaches active","Re-run the agent after correcting the subsystem; no Puppet-side timeout is configurable for this wait"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# AIX: confirm the subsystem is in a workable state before managing it\nlssrc -s \"${name}\"\nerrpt -s \"$(date +%m%d0000$(date +%Y)\" 2>/dev/null | tail -1 >/dev/null || true\n# subsystem entry missing from SRC = start/wait will fail","typeGuard":null,"tryCatchPattern":null,"preventionTips":["For slow-draining AIX daemons, define an explicit stop command instead of relying on the 60s wait","Verify ODM/SRC subsystem entries (lssrc -s) in host acceptance checks","Check errpt after any wait timeout — the subsystem usually logged why it exited or ignored the stop"],"tags":["puppet","aix","src","service","timeout"],"backgroundTag":"service-state-transition-timeout","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}