11 Replies Latest reply on Mar 20, 2019 9:57 AM by Shraddha Madye

    User error in extension  In call to sync.rel.BMC_Component, 'Destination' is not a target CI

    Alicia Wright
      Share:|

      HI

       

      I am getting the following error in message in CMDB sync of a CI

       

      Error occurred during transformation     2017-10-29 19:07:28    

      User error in extension 'CMDB.FunctionalComponent_ConcreteCollection.FunctionalComponent_ConcreteCollection': CMDB.FunctionalComponent_ConcreteCollection.FunctionalComponent_ConcreteCollection:74:

       

      In call to sync.rel.BMC_Component, 'Destination' is not a target CI

       

      I am new to this, can someone help me understanding it?

        • 1. Re: User error in extension  In call to sync.rel.BMC_Component, 'Destination' is not a target CI
          Andrew Waters

          What version of Discovery and TKU are you using?

          1 of 1 people found this helpful
          • 3. Re: User error in extension  In call to sync.rel.BMC_Component, 'Destination' is not a target CI
            Bertrand Imbert

            Hello

             

            We have also this problem with cmdb sync since we updated TKU september 17, we are in 11.1.0.5

             

            User error in extension 'CMDB.SoftwareInstance_Product.SoftwareInstance_Product': CMDB.SoftwareInstance_Product.SoftwareInstance_Product:134: In call to sync.rel.BMC_Dependency, 'Destination' is not a target CI

             

             

            Thanks for the help

            • 4. Re: User error in extension  In call to sync.rel.BMC_Component, 'Destination' is not a target CI
              Bertrand Imbert

              I think that we found the issue.

               

              We have an override pattern for CMDB.SoftwareInstance_Product and as there is a change in TKU 09, we had the issue, we adapted the pattern and now all is fine.

              3 of 3 people found this helpful
              • 5. Re: User error in extension  In call to sync.rel.BMC_Component, 'Destination' is not a target CI
                Shraddha Madye

                Hi Andrew,

                 

                I am getting similar error messages when trying to sync discovered filesystems to CMDB. In a call to sync.rel.BMC_HostedSystemComponents

                 

                error.jpg

                 

                Thanks,

                Shraddha

                • 6. Re: User error in extension  In call to sync.rel.BMC_Component, 'Destination' is not a target CI
                  Duncan Grisby

                  There is nothing similar about your error and the ones mentioned in this thread.

                   

                  If you want much help, you will have to post the mapping you are trying to use, not just a screenshot of the errors. It is clear, though, that your mapping is referring to a variable named "fsystem" in a context where it is not defined.

                  1 of 1 people found this helpful
                  • 8. Re: User error in extension  In call to sync.rel.BMC_Component, 'Destination' is not a target CI
                    Shraddha Madye

                    Hi Duncan,

                     

                    I have uploaded the syncmapping code. Please verify and let me know what changes are suggested

                    • 9. Re: User error in extension  In call to sync.rel.BMC_Component, 'Destination' is not a target CI
                      Duncan Grisby

                      It's not very easy to tell from screenshots of the code -- it would have been better to attach the actual text!

                       

                      It looks as though you are specifying the BMC_LocalFileSystem CI inside an if block, but then creating the relationship to it after the end of the if block. In the situation that the if block does not execute, it will still try to create a relationship but fsystem is not set to anything. You need to move the sync.rel.BMC_HostedSystemComponents(...) call into the if block.

                      2 of 2 people found this helpful
                      • 10. Re: User error in extension  In call to sync.rel.BMC_Component, 'Destination' is not a target CI
                        Shraddha Madye

                        Thanks Duncan, The suggested code modification has been implemented successfully and we are no longer getting such kinds of error. However, there's another issue regarding the same syncmapping tpl. Multiple instances are getting appended to CMDB BMC_LocalFileSystem form. Example – Host xxx has 6 discovered filesystems. On 1st sync, 6 records got created On 2nd sync, same 6 got appended again = 12 records But on later syncs (3rd, 4th ,…..) the count is remaining constant (no more FS additions, hence,12 records) and so the shadow copy query (12 records) Shadow copy query also shows all 12 records. Query used for shadow copy – search in '_Sync_Dev_Cons_to_Dev_BMC_ADDM_IMPORT' BMC_LocalFileSystem where Name has subword  "xxx"  show Company, Name, HostName, TokenId, __instance_id, key, Category, Type, Item, PrimaryCapability, Domain, SerialNumber, SystemOID, ManufacturerName, Model, NameFormat, Description, LastScanDate Attaching screenshot. SYNC MAPPING PATTERN - tpl 1.12 module CMDB.Extension.Host_FileSystem; metadata origin := "TKU"; tree_path := "Chevron", "FileSystem", "Local and Remote FileSystem"; end metadata; from CMDB.Host_ComputerSystem import Host_ComputerSystem 2.2; syncmapping Host_FileSystem 1.0 """ FileSystem mapped to BMC_LocalFileSystem or BMC_RemoteFileSystem. """ overview tags CMDB, Extended_Mapping, UKHC; end overview; mapping from Host_ComputerSystem.host as host traverse Mounter:FileSystemMount:MountedFileSystem:FileSystem as fsmount fsystem -> BMC_FileSystem; end traverse; end mapping; body computersystem := Host_ComputerSystem.computersystem; log.info("Map FileSystem to host %host.name%"); for each fsmount do fs_size := 0; fs_free := 0; log.info("Map FileSystem %fsmount% to host %host.name%"); // Check whether the kind is LOCAL or REMOTE if fsmount.fs_kind = "LOCAL" then if not fsmount.size then fs_size := 0; else fs_size := fsmount.size / 1048576; end if; if not fsmount.free then fs_free := 0; else fs_free := fsmount.free / 1048576; end if; fsystem := sync.BMC_LocalFileSystem( key := fsmount.key, Name := "%fsmount.mount% on %host.name%", NameFormat := "FileSystem:HostName", ShortDescription := fsmount.fs_name, Description := "%host.name%: %fsmount.fs_name%: %fsmount.mount%", FileSystemSize := fs_size, AvailableSpace := fs_free, FileSystemType := fsmount.fs_type, BlockSize := 0, Category := "Miscellaneous", Type := "File System", Item := "Local File System", TokenId := "%host.name%:%host.local_fqdn%:%fsmount.fs_name%%fsmount.mount%" // Extended Attributes // //FileSystemUsed := fsmount.used, //FileSystemUsedPct := fsmount.used_percentage, //FileSystemFreePct := fsmount.free_percentage, ); sync.rel.BMC_HostedSystemComponents( Source := computersystem, Destination := fsystem, Name := "HOSTEDFILESYSTEM" ); end if; end for; end body; end syncmapping;

                        • 11. Re: User error in extension  In call to sync.rel.BMC_Component, 'Destination' is not a target CI
                          Shraddha Madye

                          Hi all please ignore previous post

                           

                          Thanks Duncan,

                           

                          The suggested code modification was implemented successfully. We are no longer getting errors. Thanks allot.

                           

                          However we are stuck with another issue regarding same sync mapping pattern.

                          Multiple instances are getting appended to CMDB.

                          Example - Host XXX has 6 discovered filesystems

                           

                          On 1st sync, 6 instances got created

                          On 2nd sync, same 6 got appended again = 12 records

                          But on later syncs (3rd, 4th.....) the count is remaining constant i.e no more addition of filesystems to CMDB. Hence, 12 records.

                           

                          Shadow copy also retrieves 12 records.

                           

                          123.jpg

                           

                          ************************************SYNC MAPPING PATTERN*****************************************************

                           

                          tpl 1.12 module CMDB.Extension.Host_FileSystem:

                          metadata

                          origin := "TKU";

                          tree_path := "Chexxx", "FileSystem", "Local and Remote Filesystem";

                          end metadata;

                           

                          from CMDB.Host_ComputerSystem import Host_ComputerSystem 2.2;

                          syncmapping Host_FileSystem 1.0

                           

                          """"

                          FileSystem mapped to local or Remote Filesystem

                          """"

                          overview

                          tags CMDB, Extended_Mapping, UKHC;

                          end overview;

                           

                          mapping from Host_ComputerSystem.host as host

                          traverse Mounter:FileSystemMount:MountedFileSystem:FileSystem as fsmount

                          fsystem -> BMC_FileSystem;

                          end traverse;

                          end mapping;

                           

                          body

                           

                          computersystem := Host_ComputerSystem,computersystem;

                          log.info("Map filesystem to host %host.name%");

                           

                          for each fsmount do

                          fs_size := 0;

                          fs_free := 0;

                           

                          log.info("Map filesystem %fsmount% to host %host.name%");

                          //Check whether the kind is local or remote

                           

                          if fsmount.fs_kind = "LOCAL" then

                           

                          if not fsmount.size then

                          fs_size := 0;

                          else

                          fs_size := fsmount.size / 1048576;

                          end if;

                           

                          if not fsmount.free then

                          fs_free := 0;

                          else

                          fs_free := fsmount.free / 1048576;

                          end if;

                           

                          fsystem := sync.BMC_LocalFileSystem(

                          key := fsmount.key,

                          Name := "%fsmount.mount% on %host.name%",

                          NameFormat := "FileSystem:HostName",

                          ShortDescription := fsmount.fs_name,

                          Description := "%host.name%: %fsmount.fs_name%: %fsmount.mount%",

                          FileSystemSize := fs_size,

                          AvailableSpace := fs_free,

                          FileSystemType := fsmount.fs_type,

                          BlockSize := 0,

                          Category := "Miscellaneous",

                          Type := "File System",

                          Item := "Local File System",

                          TokenId := "%host.name%:%host.local_fqdn%:%fsmount.fs_name%%fsmount.mount%"

                          );

                           

                           

                          sync.rel.BMC_HostedSystemComponents(

                          Source := computersystem,

                          Destination := fsystem,

                          Name := "HOSTEDFILESYSTEM"

                          );

                           

                           

                          end if;

                          end for;

                          end body;

                          end syncmapping;