VMware Smart Assurance NCM - Unable to enable or disable single test in NCM 10.1.1 Automation Library
search cancel

VMware Smart Assurance NCM - Unable to enable or disable single test in NCM 10.1.1 Automation Library

book

Article ID: 345322

calendar_today

Updated On:

Products

VMware

Issue/Introduction

Symptoms:
NCM 10.1.1 doesn't allow user to enable/disable singular tests under a standard. It results in disappearance of all tests linked to the edited standard & an error of "Resource Not found" is thrown on NCM GUI when standard/policy is clicked.

Environment

VMware Smart Assurance - NCM

Cause

The cause of this behavior has been determined to occur due to the hibernate software upgrade in NCM 10.1.1.

Resolution

This issue has been identified as a bug in NCM 10.1.1 & official fix is available as part NCM 10.1.3 GA release.

Refer https://docs.vmware.com/en/VMware-Smart-Assurance/10.1.3/rn/Smart-Assurance-Network-Configuration-Manager-1013-Release-Note.html, Section "Resolved Issues" - SMARTA-1067 / SR 20172465811: After disabling tests in Automation Library "Resource Not Found" error is thrown.


Workaround:

The following two workarounds can be applied in NCM 10.1.1 environment - one to mitigate issue of disabling/enabling tests in a standard and another to address error of "Resource Not Found" thrown when user clicks upon edited standard/policy. 

Note: Both workarounds needs to be implemented one after another to fix the complete issue.

Workaround to enable/disable tests in automation library
a) Login to Application server/Combination Server & execute source /etc/voyence.conf
b) Go to $VOYENCE_HOME/ncmcore/webapps/ncm-webapp/WEB-INF/lib and take the backup of existing services-9.4.0.0.jar as services-9.4.0.0.jar.orig, by executing below:
mv services-9.4.0.0.jar services-9.4.0.0.jar.orig
c) Copy the attached services-9.4.0.0.jar under $VOYENCE_HOME/ncmcore/webapps/ncm-webapp/WEB-INF/lib directory and execute the below:
chown root:voyence services-9.4.0.0.jar

d) Execute: service vcmaster restart

Workaround to mitigate "Resource Not found" error thrown when user clicks on affected policy/standard
a) Log into Database server and execute commands “su - pgdba” and “psql voyencedb voyence”. Enter Database password when probed. Capture the list of tests linked to a standard with index as “-1” with following command-
select encode(standard_test_linkage_id,'hex') as link_id,enabled, version, index,encode(config_audit_standard_id,'hex') as std_id, encode(test_item_id,'hex') as test_id from cm_standard_test_linkage order by config_audit_standard_id;

b) Correct the indexes for test_item_id in cm_standard_test_linkage table for each test_id which showed it’s index as “-1” with following command-
update cm_standard_test_linkage set index=0 where config_audit_standard_id=decode('<std_id>','hex') and test_item_id = decode('<test_id>', 'hex') and index=-1;

If there is more than one test_id showing index=-1, the update command should increase the index by a value of 1; for example -

2nd test_id index reset-
update cm_standard_test_linkage set index=1 where config_audit_standard_id=decode('<std_id>','hex') and test_item_id = decode('<test_id>', 'hex') and index=-1; 

3rd test_id index reset-
update cm_standard_test_linkage set index=2 where config_audit_standard_id=decode('<std_id>','hex') and test_item_id = decode('<test_id>', 'hex') and index=-1; 


Attachments

services-9.4.0.0 get_app