When intaking some assets that dont properly report capacity on their interfaces in LSHW, it appears there is a bug in collins that will blindly insert rows for hardware attributes without checking for duplicates. I didnt specify the lshw.defaultNicCapacity, so each LSHW submission was failing with:
Exception Class: class collins.util.parsers.AttributeNotFoundException Exception Message: Could not find capacity for network interface for MYNETWORKINTERFACEHERE Message: Exception updating asset
The interesting bit is when you look at the hardware details page once i fixed submission by setting a default capacity, you can see each nic or harddrive was inserted multiple times (one for each lshw submission failure).
If we can wrap the LSHW insertion in a transaction, that would be simplest.
When intaking some assets that dont properly report capacity on their interfaces in LSHW, it appears there is a bug in collins that will blindly insert rows for hardware attributes without checking for duplicates. I didnt specify the
lshw.defaultNicCapacity
, so each LSHW submission was failing with:The interesting bit is when you look at the hardware details page once i fixed submission by setting a default capacity, you can see each nic or harddrive was inserted multiple times (one for each lshw submission failure).
If we can wrap the LSHW insertion in a transaction, that would be simplest.