Palani Chockali
ServiceNow Employee
ServiceNow Employee

IRE loads the relationship type from the meta data(OOB). It is currently loading the display value of the relationship type in local language which happens to be Japanese in the customer cases we have handled so far. Since IRE requires English value of the relationship type, it fails and does not create the relationship for Disk or Network Adapters. Since Disk and Network Adapters are dependent CIs, IRE could not create these CIs in CMDB.

This issue is fixed in San Diego. The attached workaround script can be run in the meantime to fix this issue. This will update the metadata configuration by adding an explicit relationship type to bypass the Japanese relationship type lookup so IRE can create the CIs. This in turn, will override the relationship lookup by providing the actual English relationship value instead of the Japanese Display relationship value. 


The work around is automated via a script include (sys_script_include_d69fa42505477090f8774875153ad4f1.xml) now. Please see attached.

 

Important Notes: 
Note1:
Please do not run this script directly in production without proper validation in test/uat/dev. The test/dev/uat, where this is going to be tested, must preferably be a clone of production

Note2: 
Please make sure you are running the script in your application scope and not in 'Global' scope. Being in the background script screen, click on the 'in scope' dropdown and choose your application scope. For example, if the fix needs to be applied to 'Service Graph Connector for Microsoft SCCM' scoped application, then you need to choose the 'sn_sccm_integrate' scope. 

Note3:
This fix will not work if the scoped application uses nested payloads

Steps below on how to run the script include:

1. Click on the gear icon on the top right and click on 'Developer' on the left nav menu
2. Under the 'Application' drop down menu, choose your scoped application name. For example, it will be
   'Service Graph Connector for Microsoft SCCM' for SCCM.
3. Click on the 'X' at the top right to close out of the screen
4. Import the script include xml file in to the test instance. 
5. Type in 'cmdb_inst_application_feed.list' in the navigation
6. Click on the datasource that has 'Network Adapter' entity. In the case of SCCM, it will be
    'SG-SCCM Network Adapter'
7. Click on the entity that has network relationship mapping. In the case of SCCM, it will be
   'SCCM Network - Network Rel'
8. Select the entry by clicking on the check box which contains 'type' as value for the 'Field/Path' column.
    In the case of SCCM, it will be 'sccm_network_rel.type' record. 
9. Under the 'Actions on selected rows' drop down, choose 'Delete' to delete this one record with 'Field/Path'
    of 'type'. You must be left with only two records here with 'Field/Path' of 'child' and 'parent'.
10. Open up the 'System Definition' -> 'Scripts Background' to run a back ground script. Also make sure you
      are in the correct application scope. Please see Note2 above.
11. Run the script include like below and passing in the discovery source of your scoped application as a
      parameter. In the case of SCCM, the discovery source will be  'SG-SCCM'. you should not check
      'Execute in sandbox' or 'Execute as scriptlet'
     
       var util = new CMDBIntegrationMetaDataFixUtil();
       util.addRelTypeMapping("Plug in the name of the discovery source here");

       For example, to run the script for SCCM scoped application:
       var util = new CMDBIntegrationMetaDataFixUtil();
       util.addRelTypeMapping("SG-SCCM");


12. The above script run will create the necessary meta data to fix this translation issue and send 
      some debug output messages to the screen. It typically runs very quick under a minute.
13. Capture that info messages in to a text file for any reference later in case of an issue
14. Go to your scoped application import schedule and kick off the parent job. For example, the computer
     identity will be the parent job for SCCM which will run all the children as well.
15. Validate the output like you normally will for your application run, especially checking if the relationship
      were correctly created in cmdb_rel_ci table
16. Perform any other validations as necessary.

 

Q&As from case tasks:

1. Will it resolve the issue once we apply the script?
    Yes, it needs to be run as a background script within your application scope

2. Can we recognize that we can apply the script on our Rome and Japanese environment?
    Yes, it can be applied to Rome and the language of the running user does not matter

3. Could you please let me know the way how to apply the scripts?
    The steps are documented under 'Steps below on how to run the script include:' section documented
    above in this post.

4. If we apply the scripts then does it have official support?
    The script is provided as a work around for a single issue. Yes, the SG connector will still be supported. All
    we request is that you test the script in a dev/uat/test with your production like data to make sure it
    resolves the translation issue first before applying this directly in a production instance as a safeguard for
    any unforeseen issues.

5. Could you please let us know the notification points. For example, when we make upgrade from Rome to
    San Diego then we need to delete the scripts in advance?
    If you prefer, you may delete the script but it is not necessary. The script is only run by a user and on
    demand. On upgrade, the changes made by the script will still exist. There won't be any impact with
    respect to this change and the integration will run as normal.
    

1 Comment