FSM sam:dme:ComputePhysicalDiag

Rule ID:1876

TODO: investigate throttle setting TODO: power availablity check handling TODO: if possible, use the BIOS_TIMEOUT sensor rather than having a long BIOS POST complete timeout
Applies to MO: compute:Physical

Name: Diag
Stage: post-explicit
Message: running diagnostic tests for serverId(FSM:sam:dme:ComputePhysicalDiag)

Begin State: PreSanitize


States
 PreSanitize
Note: diags will still collect willboot info, but need to modify our logic to still allow booting even if there are errors

  On Success: Sanitize
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 20000
  Retry Count: 10
  Unavailable: UNAVAIL_RETRY
  Message: Preparing to check hardware configuration server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:PreSanitize)

  Notify:
   Target: sam:bladeAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagPreSanitize

 Sanitize
NO COMMENTS

  On Success: CheckPowerAvailability
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 20000
  Retry Count: 6
  Unavailable: UNAVAIL_RETRY
  Message: Checking hardware configuration server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:Sanitize)

  Notify:
   Target: sam:bladeAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagSanitize

 CheckPowerAvailability
NO COMMENTS

  On Success: DisableScriptableVMedia
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 60000
  Retry Count: 3
  Unavailable: UNAVAIL_RETRY
  Message: Check if power is available for server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:CheckPowerAvailability)

  Notify:
   Target:
   Instance: active
   Purpose: mod
   Custom: true
   Data:

 DisableScriptableVMedia
NO COMMENTS

  On Success: PreconfigVmediaLocal
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 40000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: disabling scriptable vmedia(FSM-STAGE:sam:dme:ComputePhysicalDiag:DisableScriptableVMedia)

  Notify:
   Target: sam:bladeAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagDisableScriptableVMedia

 PreconfigVmediaLocal
NO COMMENTS

  On Success: PreconfigVmediaPeer
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 40000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: Teardown local vmedia(FSM-STAGE:sam:dme:ComputePhysicalDiag:PreconfigVmediaLocal)

  Notify:
   Target: sam:bladeAG
   Instance: self
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagPreconfigVmediaLocal

 PreconfigVmediaPeer
NO COMMENTS

  On Success: SetupVmediaLocal
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 40000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: Teardown peer vmedia(FSM-STAGE:sam:dme:ComputePhysicalDiag:PreconfigVmediaPeer)

  Notify:
   Target: sam:bladeAG
   Instance: peer
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagPreconfigVmediaPeer

 SetupVmediaLocal
NO COMMENTS

  On Success: SetupVmediaPeer
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 40000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: provisioning a virtual media device with a management O/S for server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:SetupVmediaLocal)

  Notify:
   Target: sam:bladeAG
   Instance: self
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagSetupVmediaLocal

 SetupVmediaPeer
NO COMMENTS

  On Success: SetupBootEnvironment
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 40000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: provisioning a virtual media device with a management O/S for server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:SetupVmediaPeer)

  Notify:
   Target: sam:bladeAG
   Instance: peer
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagSetupVmediaPeer

 SetupBootEnvironment
TODO: need to do ConfigUserAccess as well...

  On Success: SerialDebugConnect
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 40000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: setting up boot environment for management O/S for server(FSM-STAGE:sam:dme:ComputePhysicalDiag:SetupBootEnvironment)

  Notify:
   Target: sam:bladeAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagSetupBootEnvironment

 SerialDebugConnect
NO COMMENTS

  On Success: PowerOn
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_SKIP
  Retry Interval: 60000
  Retry Count: 1
  Unavailable: UNAVAIL_RETRY
  Message: Connect to pre-boot environment agent on server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:SerialDebugConnect)

  Notify:
   Target: sam:hostagentAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagSerialDebugConnect

 PowerOn
NO COMMENTS

  On Success: PowerOnWait
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 30000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: power on server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:PowerOn)

  Notify:
   Target: sam:bladeAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagPowerOn

 PowerOnWait
NO COMMENTS

  On Success: BiosPostCompletion
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_RESET_FSM
  Retry Interval: 30000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: Waiting for power on for server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:PowerOnWait)

  Notify:
   Target:
   Instance: active
   Purpose: mod
   Custom: false
   Data:

 BiosPostCompletion
NO COMMENTS

  On Success: HagConnect
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 20000
  Retry Count: 90
  Unavailable: UNAVAIL_RETRY
  Message: Waiting for BIOS POST completion on server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:BiosPostCompletion)

  Notify:
   Target: sam:bladeAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagBiosPostCompletion

 HagConnect
NO COMMENTS

  On Success: PnuOSIdent
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 60000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: Connect to pre-boot environment agent on server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:HagConnect)

  Notify:
   Target: sam:hostagentAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagHagConnect

 PnuOSIdent
NO COMMENTS

  On Success: RunTests
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 20000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: Identify pre-boot environment agent on server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:PnuOSIdent)

  Notify:
   Target: sam:hostagentAG
   Instance: active
   Purpose: mod
   Custom: true
   ProxyEp: hostag:agcore
   Data: compute:Physical
   Method: FsmComputePhysicalDiagPnuOSIdent

 RunTests
NO COMMENTS

  On Success: LogTransfer
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 30000
  Retry Count: 10
  Unavailable: UNAVAIL_RETRY
  Message: Running diagnostic tests(FSM-STAGE:sam:dme:ComputePhysicalDiag:RunTests)

  Notify:
   Target: sam:hostagentAG
   Instance: active
   Purpose: mod
   Custom: true
   ProxyEp: hostag:agcore
   Data: compute:Physical
   Method: FsmComputePhysicalDiagRunTests

 LogTransfer
NO COMMENTS

  On Success: WaitForDebug
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 30000
  Retry Count: 10
  Unavailable: UNAVAIL_RETRY
  Message: Transferring diag log files(FSM-STAGE:sam:dme:ComputePhysicalDiag:LogTransfer)

  Notify:
   Target: sam:hostagentAG
   Instance: active
   Purpose: mod
   Custom: true
   ProxyEp: hostag:agcore
   Data: compute:Physical
   Method: FsmComputePhysicalDiagLogTransfer

 WaitForDebug
NO COMMENTS

  On Success: TeardownVmediaLocal
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FOREVER
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 30000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: Waiting for user debugging(FSM-STAGE:sam:dme:ComputePhysicalDiag:WaitForDebug)

  Notify:
   Target:
   Instance: active
   Purpose: mod
   Custom: true
   Data:

 TeardownVmediaLocal
NO COMMENTS

  On Success: TeardownVmediaPeer
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 40000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: Teardown local vmedia(FSM-STAGE:sam:dme:ComputePhysicalDiag:TeardownVmediaLocal)

  Notify:
   Target: sam:bladeAG
   Instance: self
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagTeardownVmediaLocal

 TeardownVmediaPeer
NO COMMENTS

  On Success: HagDisconnect
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 40000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: Teardown peer vmedia(FSM-STAGE:sam:dme:ComputePhysicalDiag:TeardownVmediaPeer)

  Notify:
   Target: sam:bladeAG
   Instance: peer
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagTeardownVmediaPeer

 HagDisconnect
NO COMMENTS

  On Success: SerialDebugDisconnect
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 60000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: Disconnect from pre-boot environment agent on server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:HagDisconnect)

  Notify:
   Target: sam:hostagentAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagHagDisconnect

 SerialDebugDisconnect
NO COMMENTS

  On Success: TearDownBootEnvironment
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_SKIP
  Retry Interval: 60000
  Retry Count: 1
  Unavailable: UNAVAIL_RETRY
  Message: Disconnect from pre-boot environment agent on server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:SerialDebugDisconnect)

  Notify:
   Target: sam:hostagentAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagSerialDebugDisconnect

 TearDownBootEnvironment
NO COMMENTS

  On Success: Shutdown
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 40000
  Retry Count: 20
  Unavailable: UNAVAIL_RETRY
  Message: tearing down boot environment for management O/S for server(FSM-STAGE:sam:dme:ComputePhysicalDiag:TearDownBootEnvironment)

  Notify:
   Target: sam:bladeAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagTearDownBootEnvironment

 Shutdown
NO COMMENTS

  On Success:
  On Fail:
  Restart: INIT_CANCEL
  Retry: RETRY_FINITE
  Retry Exhaust: RETRY_EXHAUST_FAIL_FSM
  Retry Interval: 20000
  Retry Count: 6
  Unavailable: UNAVAIL_RETRY
  Message: Shutting down server serverId(FSM-STAGE:sam:dme:ComputePhysicalDiag:Shutdown)

  Notify:
   Target: sam:bladeAG
   Instance: active
   Purpose: mod
   Custom: true
   Data: compute:Physical
   Method: FsmComputePhysicalDiagShutdown