Highlighted
Super Contributor.. Super Contributor..
Super Contributor..
532 views

Windows_device_driver, value size of attribute 'device_id'

Jump to solution

Hello:

In our UCMDB (error.log) we have some errors related to size of attribute 'device_id' of windows_device_driver in reconciliation

For example:

...... has exceeded the size limit of the attribute [attribute: name [device_id] type [string] isFactory [true] isUserUpdated [false] default value [] size limit [150]] : operation DataInAddOrUpdateData : class com.mercury.topaz.cmdb.shared.base.CmdbException : 

 

We've try to change the 150 characters of the device_id (CI Type Manager) but UCMDB doesn´t allow this. It says "You are not permitted to update this class"

 

How can we fix this error?

 

 

Thanks.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Windows_device_driver, value size of attribute 'device_id'

Jump to solution

Did you try to enable auto truncate or auto trim on that attribute?

If that doesn't work (saw it before so I won't be surprised) you can try to handle the problem at the root cause.

From the log output we can see that this is from Inventory scanner and the actual attribute value is 

SWD\WPDBUSENUM\_??_USBSTOR#DISK&VEN_KINGSTON&PROD_DATATRAVELER_3.0&REV_#002618887702F0C0184B3E30&0#{53F56307-B6BF-11D0-94F2-00A0C91EFB8B})

The string is 154 long so it very close to the 150 attribute size. 

I think you can tweak a little bit the ParseEnrichedScanFile.py script to replace the ampersand (&amp) with & or + (plus sign) so the resulting string will be smaller than 150.

This is the part of the script of interest

# create windows device driver OSH
def createWindiwsDeviceDriverOSH(oshvresults, root, hostOsh):
deviceDriverWithID = {}
deviceDrivers = root.getElementsByTagName("hwOSDeviceDriverData_value")
deviceDriverArray = nodeListToArray(deviceDrivers)
propertyArray = {'hwOSDeviceDriverDataCompatID':'compat_id',
'hwOSDeviceDriverDataDescription':'description',
'hwOSDeviceDriverDataDeviceClass':'device_class',
'hwOSDeviceDriverDataDeviceID':'device_id',
'hwOSDeviceDriverDataDeviceName':'device_name',
'hwOSDeviceDriverDataDevLoader':'dev_loader',
'hwOSDeviceDriverDataDriverDate':'driver_date',
'hwOSDeviceDriverDataDriverName':'driver_name',
'hwOSDeviceDriverDataDriverProviderName':'driver_provider_name',
'hwOSDeviceDriverDataDriverVersion':'driver_version',
'hwOSDeviceDriverDataFriendlyName':'friendly_name',
'hwOSDeviceDriverDataHardWareID':'hardware_id',
'hwOSDeviceDriverDataInfName':'inf_name',
'hwOSDeviceDriverDataInstallDate':'install_date',
'hwOSDeviceDriverDataIsSigned':'is_signed',
'hwOSDeviceDriverDataLocation':'location',
'hwOSDeviceDriverDataManufacturer':'manufacturer',
'hwOSDeviceDriverDataName':'name',
'hwOSDeviceDriverDataPDO':'pdo',
'hwOSDeviceDriverDataSigner':'signer'}
for deviceDriver in deviceDriverArray:
deviceDriverOsh = ObjectStateHolder("windows_device_driver")
deviceID = None
for propertyName in propertyArray.keys():
driverAttribute = getNodeValues(propertyName, deviceDriver)[0]
if len(driverAttribute):
deviceDriverOsh.setStringAttribute(propertyArray[propertyName], driverAttribute)
if propertyName == 'hwOSDeviceDriverDataDeviceID':
deviceID = driverAttribute
deviceDriverWithID[deviceID] = deviceDriverOsh
deviceDriverOsh.setContainer(hostOsh)
oshvresults.add(deviceDriverOsh)
return deviceDriverWithID

 

 

 

 

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success

View solution in original post

6 Replies
Highlighted
Visitor.

Re: Windows_device_driver, value size of attribute 'device_id'

Jump to solution

In case you facing the issue while using OTTB discovery jobs, raise the case with the support.

If this is your custom code, take care of the lenght of the attribute before population within the script or create custom attribute with required size.

You could change the lenght of the attribute, but with every update of UCMDB or Content Pack the attribute length will be overritten. Highly not recommended approach.

Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Windows_device_driver, value size of attribute 'device_id'

Jump to solution

The biggest question would be why 1500 is not enough for a device ID?

We had in the past corner case scenarios when an attribute was wrongly populated with some extremely long string because the output of some command was failing or it retrieved the wrong information which was too long.

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success
0 Likes
Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Windows_device_driver, value size of attribute 'device_id'

Jump to solution

It's not 1500, it's 150

The Windows Device Driver CI Type have an attribute with name device_id which is 150 of value size and cannot be modified (You are not permitted to update this class).

windows_device_driver_size.JPGerror_message.JPG

In some computers the inventory scanner discover a windows_device_driver which exceed the 150 characters, for example:

scanned_file.JPG

This scanned file doesn´t load into the UCMDB. The error.log file in the UCMDB says:

ERROR  [Process Results Thread4-Inventory Discovery by Manual Scanner Deployment] (:) - Error processing results from task: Inventory Discovery by Manual Scanner Deployment
appilog.framework.shared.manage.impl.MamResponseException: appilog.framework.shared.manage.impl.MamResponseException: [ErrorCode [110] class model validation error]
CMDB Operation Internal Error: class appilog.framework.shared.manage.impl.MamResponseException : [ERROR CODE- 110] appilog.common.system.exceptions.AppilogDataException: appilog.framework.shared.manage.impl.MamResponseException: [ErrorCode [110] class model validation error]
CMDB Operation Internal Error: class com.hp.ucmdb.reconciliation.datain.exception.DataInException : com.hp.ucmdb.reconciliation.datain.operation.DataInOperationException: [ErrorCode [110] class model validation error]
Error while trying to [addOrUpdate] on level [1]! validation error occured, class [windows_device_driver].  Error in properties type validation :  property's value [(string-device_id:SWD\WPDBUSENUM\_??_USBSTOR#DISK&VEN_KINGSTON&PROD_DATATRAVELER_3.0&REV_#002618887702F0C0184B3E30&0#{53F56307-B6BF-11D0-94F2-00A0C91EFB8B})] has exceeded the size limit of the attribute [attribute: name [device_id] type [string] isFactory [true] isUserUpdated [false] default value [] size limit [150]] : operation DataInAddOrUpdateData : class com.mercury.topaz.cmdb.shared.base.CmdbException :
CMDB Internal Error: Error while handling request: {request: ID='45c28d3a7126cbfb8d2bc452fadb6b3a' Message='General CMDB request' Operation='com.hp.ucmdb.reconciliation.datain.operation.DataInAddOrUpdateData : FAILED!! [ID=  28966194] [Customer ID=1] [Changer=UCMDBDiscovery: Inventory Discovery by Manual Scanner Deployment Probe: ONHPUD207] [total= 1.172   , manipulation= 0.031   , identification= 0.625   , identification.query= 0.562   , identification.match= 0.016   , merge= 0.516   , update= 0.016   ]  [durations: identify= 0.625 dataIn= 0.234] [Ignore From Cmdb-  0 Ignore From Bulk-  0 Merge Operations-  0 Merged CIs-    0 Type Changes-    0 Max Topology Level- 1] Message: d the size limit of the attribute [attribute: name [device_id] type [string] isFactory [true] isUserUpdated [false] default value [] size limit [150]]' Customer ID='1'
Context='CMDB Context: Customer id = '1' , User ID = '911' , Caller Application = 'AutoDiscovery''} : operation com.hp.ucmdb.discovery.framework.world.operation.update.impl.WorldOperationCreateOrUpdateObjectBulk : class com.mercury.topaz.cmdb.shared.base.CmdbException :
CMDB Internal Error: Error while handling request: {request: ID='4ae760e894ab2fc785063c521e970ba0' Message='General CMDB request' Operation='com.hp.ucmdb.discovery.framework.world.operation.update.impl.WorldOperationCreateOrUpdateObjectBulk@1b88ea01' Customer ID='1'
Context='CMDB Context: Customer id = '1' , User ID = '911' , Caller Application = 'AutoDiscovery''}

 

What can i do to solve or mitigate this problem?

 

 

Thanks

 

Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Windows_device_driver, value size of attribute 'device_id'

Jump to solution

Did you try to enable auto truncate or auto trim on that attribute?

If that doesn't work (saw it before so I won't be surprised) you can try to handle the problem at the root cause.

From the log output we can see that this is from Inventory scanner and the actual attribute value is 

SWD\WPDBUSENUM\_??_USBSTOR#DISK&VEN_KINGSTON&PROD_DATATRAVELER_3.0&REV_#002618887702F0C0184B3E30&0#{53F56307-B6BF-11D0-94F2-00A0C91EFB8B})

The string is 154 long so it very close to the 150 attribute size. 

I think you can tweak a little bit the ParseEnrichedScanFile.py script to replace the ampersand (&amp) with & or + (plus sign) so the resulting string will be smaller than 150.

This is the part of the script of interest

# create windows device driver OSH
def createWindiwsDeviceDriverOSH(oshvresults, root, hostOsh):
deviceDriverWithID = {}
deviceDrivers = root.getElementsByTagName("hwOSDeviceDriverData_value")
deviceDriverArray = nodeListToArray(deviceDrivers)
propertyArray = {'hwOSDeviceDriverDataCompatID':'compat_id',
'hwOSDeviceDriverDataDescription':'description',
'hwOSDeviceDriverDataDeviceClass':'device_class',
'hwOSDeviceDriverDataDeviceID':'device_id',
'hwOSDeviceDriverDataDeviceName':'device_name',
'hwOSDeviceDriverDataDevLoader':'dev_loader',
'hwOSDeviceDriverDataDriverDate':'driver_date',
'hwOSDeviceDriverDataDriverName':'driver_name',
'hwOSDeviceDriverDataDriverProviderName':'driver_provider_name',
'hwOSDeviceDriverDataDriverVersion':'driver_version',
'hwOSDeviceDriverDataFriendlyName':'friendly_name',
'hwOSDeviceDriverDataHardWareID':'hardware_id',
'hwOSDeviceDriverDataInfName':'inf_name',
'hwOSDeviceDriverDataInstallDate':'install_date',
'hwOSDeviceDriverDataIsSigned':'is_signed',
'hwOSDeviceDriverDataLocation':'location',
'hwOSDeviceDriverDataManufacturer':'manufacturer',
'hwOSDeviceDriverDataName':'name',
'hwOSDeviceDriverDataPDO':'pdo',
'hwOSDeviceDriverDataSigner':'signer'}
for deviceDriver in deviceDriverArray:
deviceDriverOsh = ObjectStateHolder("windows_device_driver")
deviceID = None
for propertyName in propertyArray.keys():
driverAttribute = getNodeValues(propertyName, deviceDriver)[0]
if len(driverAttribute):
deviceDriverOsh.setStringAttribute(propertyArray[propertyName], driverAttribute)
if propertyName == 'hwOSDeviceDriverDataDeviceID':
deviceID = driverAttribute
deviceDriverWithID[deviceID] = deviceDriverOsh
deviceDriverOsh.setContainer(hostOsh)
oshvresults.add(deviceDriverOsh)
return deviceDriverWithID

 

 

 

 

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success

View solution in original post

Highlighted
Super Contributor.. Super Contributor..
Super Contributor..

Re: Windows_device_driver, value size of attribute 'device_id'

Jump to solution

Good news

 

Mysteriosly my co-worker could increase the value size of the attribute "device_id" of windows_device_driver in the same UCMDB.

We have changed to 500 instead of 150.

After this change, we scan a computer that contains a windows_device_driver bigger thant 150 and ucmdb reconciliates everything well

 

node.JPG

 

 

Thanks for all.

Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Windows_device_driver, value size of attribute 'device_id'

Jump to solution

That means that one of the constraints wasn't there anymore and the class model changed could be made and propagated to the data model.
500 is a high value and it will be interesting to find out if there are any performance consequences.

The long term solution is to improve the data quality from discovery.

Kind regards,
Bogdan Mureșan
EMEA CMS Technical Success
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.