Delete an obsolete device server (DS)
search cancel

Delete an obsolete device server (DS)

book

Article ID: 303527

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

  • How to delete an obsolete device server in Smarts NCM ?
  • Can we remove an obsolete device server using the Smarts NCM console?
  • What are the steps to remove an obsolete device server in Smarts NCM ?

Environment

NCM - 10.1.X

Resolution

Preface:

It is not possible to remove a Device Server (DS) entirely from within the Smarts Network Configuration Manager (NCM) console. To delete a DS from NCM you must use the command line to remove any reference to the device server from the NCM PostgreSQL Control Database (controldb) and from the NCM Infrastructure Database (infradb) as described in the following sections.

Task 1 - Remove a DS from the NCM controldb

To remove any reference to a DS from the controldb, do the following:

  1. Log into the NCM Client using an account with full administrator access to all network containers.
  2. Select Tools then System Administration from the top menu to launch the System Administration window.

 
  1. In the System Administration window, access the Device Servers node under each network in the instance to display what DS hosts are assigned to each network. Select any instance of the DS host to be deleted under each network, then click the Manage button in the lower right hand corner of the window to launch the Manage Device Servers window for each network having an instance of the DS host to be deleted.
 
  1. In each network's Manage Device Servers window, select the DS host to be deleted from the right-hand Selected pane, then click the Remove button to move the host to the left-hand Available pane, then click the OK button at the bottom to cause the change to take effect.
  
  1. After confirming that there are no remaining instances of the DS host being associated with any network in the NCM Client, log into a command line shell on the NCM PostgreSQL Control Database (controldb) host as 'root' (Linux).
  2. Run the following command to launch a controldb shell (current controldb password will be required):
Linux:
su - pgdba -c 'psql voyencedb voyence'



  1. Run the following SQL command to delete the DS host record from the controldb (where {DS Name} is the case sensitive name of the DS host as shown in the NCM Client UI):
DELETE * FROM cm_device_server WHERE device_server_name = '{DS Name}'; 
  1. Run the following SQL command to list all remaining DS hosts to confirm that the DS host to be deleted is no longer present:
SELECT * FROM cm_device_server; 
  1. Log out of the controldb shell by running the following PostgreSQL command:
\q 


Task 2 - Remove the DS from the infradb

To remove any reference to a DS host from the infradb, do the following:

  1. Log into a command line shell on the NCM Application Server (AS) host as 'root' (Linux).
  2. Run the following command to stop all NCM services on the AS host:
Linux:
service vcmaster stop



  1. Run the following commands to navigate to the path where the command line tools for working with the NCM infradb are located and export the content of the infradb to an editable text file:
Linux:
source /etc/voyence.conf
cd $VOYENCE_HOME/cgi-bin/
./cflist.cgi > _temp_infradb.txt



  1. Make a backup copy of the editable text file containing the exported infradb content in another, non-NCM path for easy recovery in case of human errors that could be introduced while editing the original infradb content export text file.
  2. Using an appropriate text file editor that does not alter the encoding of the text file, modify the original infradb content export text file to remove any references to the DS host to be deleted as follows:
    1. Search for any lines starting with a POP character string that reference the name of the DS host to be deleted.
    2. Make a note of the ID number immediately following the POP character string for any lines found.
    3. Delete all lines found in the preceding Step A.
    4. Scroll to the line near the beginning of the file that begins with the HEAD character string, then search the line for the PopList= field.
    5. Delete the ID number noted in Step B above from the line along with any trailing comma.
    6. Save and exit the file.
  3. Import the revised infradb content contained in the export text file back into the infradb by running the following command:
Linux:
./cfwrite.cgi < _temp_infradb.txt



  1.  Start NCM services on the AS host by running the following command:
Linux:
service vcmaster start