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:
- Log into the NCM Client using an account with full administrator access to all network containers.
- Select Tools then System Administration from the top menu to launch the System Administration window.
- 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.
- 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.
- 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).
- Run the following command to launch a controldb shell (current controldb password will be required):
Linux:
su - pgdba -c 'psql voyencedb voyence'
- 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}';
- 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;
- 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:
- Log into a command line shell on the NCM Application Server (AS) host as 'root' (Linux).
- Run the following command to stop all NCM services on the AS host:
Linux:
service vcmaster stop
- 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
- 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.
- 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:
- Search for any lines starting with a POP character string that reference the name of the DS host to be deleted.
- Make a note of the ID number immediately following the POP character string for any lines found.
- Delete all lines found in the preceding Step A.
- 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.
- Delete the ID number noted in Step B above from the line along with any trailing comma.
- Save and exit the file.
- 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
- Start NCM services on the AS host by running the following command:
Linux:
service vcmaster start