Release Automation

Release Automation KB: Cannot Remove Agent 

Feb 02, 2015 02:42 PM

Problem

 

Applies to all supported versions.

 

When attempting to remove an agent from Automation Studio, the following error occurs:

 

You cannot delete a server that is being used by Release Center artifacts.

Artifacts using this server are:

- ArtifactName (Ver. x.x), application: <name>

- ArtifactName (Ver. x.x), application: <name>

 

Cause

 

There are two possible causes for this error:

 

  1. The agent in question currently belongs to an agent group.
  2. A problem with the database is preventing the removal. (This is an environment-specific problem in which somehow the data within the database was improperly altered/corrupted/etc.)

 

Resolution

 

For the first scenario above:

 

  1. Login to ROC.
  2. Identify the agent group(s) that the agent belongs to.
  3. Remove the agent from the agent group(s).
  4. Remove the agent from Automation Studio.

 

If the above solution fails, the second scenario above is likely the problem, in which case the agent can be manually removed from the database via the following steps:

 

Note: Before proceeding, be absolutely certain that the agent does not belong to any agent groups. Only a skilled database user/administrator should perform the following steps.

 

Execute the following SQL commands:

 

   1. select * from rc_artifacts


     This will list all artifacts IDs used. Note the ID, which will be used to search other tables to find the artifact name via the next steps.

 

   2. There are many different types of artifacts, and only one table per artifact. A SELECT query may be performed from each of these tables to match the ID found in the previous step to find the problem artifact.

 

     rc_artifact_local_file

     rc_artifact_ftp

     rc_artifact_http

     rc_artifact_remote

     rc_artifact_ssh

     rc_artifact_svn

     rc_artifact_tfs

     rc_artifact_repository

 

  3. Find the row in the "rc_artifacts" table. You'll see an "artifact_getter" column. Use this value to map the row into the "rc_artifact_getters" table.

 

  4. The "rc_artifact_getters" table maps the artifact to the agent. The following SQL will remove the agent as an artifact retrieval agent:

 

     update rc_artifact_getters set server_id = 0

     where id = <value from Step (3)>


Once completed, the agent should have been successfully removed.

Statistics
0 Favorited
13 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.