Decommission host

Rest-api call: /v2/de-commission

click to edit

PPDM login returns 409/405

click to edit

runs unregister.bat using --decommission

shut down agentsvc

Set fullDecommissionState flag to IN_PROGRESS in config.yml.

Shutdown the scheduled/recurring jobs jobs

Block the http requests

Take backups of the dbs and retain the copies db alone

Call adonobj.unconfigure() TBD

New objects.db is created to record the agents which successded with unconfigure

delete certs and agentId

set fullDecommissionState to DONE

Return SUCCESS in rest-api call

Shut down the agentsvc

Call register.sh with --unregister flag

agentsvc checks the fullDecommissionState

If its IN_PROGRESS, complete the decommissioning and return msg n code.

If its Done: Exit with suitable msg.

register script to identify and explain the different btw modes?

If its RECOMMISSION: Say it cannot unregister since the sys is out of sync.

After the above 3 checks:
agentsvc calles the unregister api

If the login fails with 409/405, perform fullDecommission

if login succeeds and the no full decommission performed, then only perform the -decommission where agentsvc is not started on boot up
Set decommission flag to True.

Decommission from ADM

/v1/de-commission:
Creates DECOMMISSION job in sessions.db
The startIdleJobs will start this job.

click to edit

the submitJob will check if any other recurring jobs are running and terminate them.