After having installed the latest agent release with a different agent name,
we need to redefine the machine to reference the new agent name.
But when we try to delete the old machine definition by :
the operation fails with the following error messages :
CAUAJM_I_50227 Deleting machine: machine_name
CAUAJM_E_50327 Cannot delete machine "machine_name" as it is still being referenced by machine containers.
CAUAJM_E_50228 Deletion of machine: machine_name was NOT successful!
CAUAJM_E_50198 Exit Code = 1
These error messages are reported because the machine_name is referenced in job definitions.
We can proceed by the following steps to take a backup of the job and machine definitions and then redefine the machine :
1. Use the following command to save the job definitions :
autorep –q -J ALL > job-definitions.jil
2. The following command allows to save the machine definitions :
autorep –q –M ALL > machine-definitions.jil
or to backup only the concerned machine definition run :
autorep –q –M machine_name > machine_name.jil
3. Then use the following option to allow to delete the machine :
4. In “machine_name.jil” file created in step 2, change the agent_name to the new agent name.
agent_name: new_agent_name < ====
5. You can also change any other attributes if needed, then redefine the machine by :
jil < machine_name.jil > machine_name.res
The operation completed successfully.