A rollback is to be done of some changes in the IMM model and a CCB for that is created by smf. The CCB seems to be correct since IMM do not protest against any of the modifications added to the CCB. The problem happens when the CCB is applied and is an OI (cannot see for what service) that fails validation and returns BAD OPERATION in its completed callback function resulting in a validation error. This validation error also triggers a coredump in SmfImmUtils::doImmOperations (trying to call a function using a nullptr)
The lists of IMM operations that are created in many places may contain object
create operations for objects that already exists in the IMM model.
The lists may also contain more than one create operation for the same object. If
a create operation for any of the duplicates is added to the CCB, ERR_EXSIST will
be returned. To avoid this it must be checked for each create operation if the IMM
model already contains the object and also that the same object create is not added
twice to the CCB.
Also if a duplicate object to create is found the rollbackData that is created
for all IMM operations must be deleted if the corresponding operation is a
duplicate. See doImmOperations() in SmfUtil.cc
The patch contains a new class that is used to check if an object to be created
exist in the IMM model. This class can be found in the new SmfUtils_ObjExist.*
files. A test program for the class is created and can be found in
.../imm_modify_demo/test_objexist.cc. A shell command, test_objexist, is created
and installed if --enble-tests is used with the configure script.
To make sure duplicate object create requests is not added the ccb descriptor is
updated so that a duplicate create descriptor is not added. The ccb decriptor
AddCreate() method will also return false if a create descriptor is not added. See
../imm_modify_config/immccb.h
commit e179caed7df7f41aefd31c08065af854dd9e6cd4
Author: Lennart Lund lennart.lund@ericsson.com
Date: Thu Jun 7 15:45:18 2018 +0200