book
Article ID: 330862
calendar_today
Updated On:
Issue/Introduction
Symptoms:
Discovery of Cisco device is successful, pull config job shows successful, however the config is not visible on UI.
Found below errors in AS logs:
Server.log -
2017-01-03 06:47:41,005 ERROR [com.powerup.configmgr.server.services.notification.impl.NotificationWorker] (http-apr-8881-exec-6) Exception on device state update, for idx=15766
org.hibernate.exception.DataException: could not update: [com.powerup.configmgr.server.persist.device.Device#0a200a6055c1c53fa66fee4959010000]
Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(100)
Powerup.log -
2017-01-03 06:41:03,498 ERROR [com.powerup.configmgr.server.services.notification.impl.NotificationWorker] (http-apr-8881-exec-3) Exception on device state update, for idx=15766
org.hibernate.exception.DataException: could not update: [com.powerup.configmgr.server.persist.device.Device#0a200a6055c1c53fa66fee4959010000]
Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(100)
Found below errors in DB log:
Server.postmaster -
2017-01-03 06:41:03.520 EST - SessionId:586b7fe3.2080 - TransId:0 - ERROR: value too long for type character varying(100)
2017-01-03 06:41:03.520 EST - SessionId:586b7fe3.2080 - TransId:0 - STATEMENT: update cm_device set version=$1, config_data=$2, cut_thru_mechanism=$3, deployment_state=$4, device_idx=$5, fully_qualified_name=$6, host_name=$7, device_name=$8, device_status=$9, device_type=$10, device_alias=$11, dns_domain_name=$12, document_urls=$13, hardware_info=$14, in_sync=$15, is_operational_device=$16, is_pseudo_resource=$17, is_start_config_out_of_sync=$18, composite_device_state=$19, latest_revision=$20, latest_revision_date=$21, latest_hw_revision=$22, latest_hw_revision_date=$23, last_config_update_time=$24, config_types_present=$25, management_ip_address=$26, management_ip_numeric=$27, modified_locally=$28, os_description=$29, package_identifier=$30, package_name=$31, pw_rollout_ref_count=$32, pw_rollout_timestamp=$33, primary_mechanism=$34, private_credentials=$35, serial_number=$36, snmp_contact=$37, snmp_location=$38, system_description=$39, vendor_model=$40, vendor_name=$41, last_comm_attempt_time=$42, last_comm_success_time=$43, active_snmp_version=$44, snmp_port=$45, banner=$46, compliance_state=$47, compliance_severity=$48, assoc_operational_device_id=$49, baseline_state_id=$50, cut_thru_oob_server_id=$51, primary_network_id=$52, primary_oob_server_id=$53, design_workspace_id=$54, site_id=$55, last_state_id=$56 where device_id=$57 and version=$58
2017-01-03 06:41:03.522 EST - SessionId:586b7fe3.2080 - TransId:0 - ERROR: current transaction is aborted, commands ignored until end of transaction block
Environment
VMware Smart Assurance - NCM
Cause
As per the System Properties.xml file in device cache located at $VOYENCE_HOME/data/devserver/cm/cache/<deviceIDX> in DS, vendor_model has more than 100 characters as its Cisco Stack device, causing the DB write after pull config to fail.
<Model>WS-C2960X-48LPS-L:WS-C2960X-48LPS-L:WS-C2960X-48LPS-L:WS-C2960X-48LPS-L:WS-C2960X-48LPS-L:WS-C2960X-48LPS-L:WS-C2960X-48LPS-L:WS-C2960X-48LPS-L</Model>
Resolution
Login to the NCM postgres DB:
su - pgdba
psql voyencedb voyence
Enter DB password.
Below is the way to know vendor_model field current varchar length:
SELECT atttypmod FROM pg_attribute WHERE attrelid = 'cm_device'::regclass AND attname = 'vendor_model ;
Ex: voyencedb=# SELECT atttypmod FROM pg_attribute WHERE attrelid = 'cm_device'::regclass AND attname = 'vendor_model';
atttypmod
-----------
104
(1 row)
voyencedb=#
Run below query in database to increase the varchar length to 300.
UPDATE pg_attribute SET atttypmod = 300+4 WHERE attrelid = 'cm_device'::regclass AND attname = 'vendor_model';
Once the value is set, perform clear cache on device from GUI and run pull config.
Additional Information
Steps to clear device cache are listed in KB 304993,
https://support.emc.com/kb/304993