Migrating to a New Hardware Type Model<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #6e9db4; } a:visited { font-size: 12pt; color: #7057C7; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: block; max-width: 500px !important; width: auto; height: auto; } } Description This KB article explains the process for migrating to the new hardware type model. Index OverviewRelease VersionPrerequisitesSteps to Migrate to New Hardware Type Model Steps to clean the old Model hardware type recordsIssue with the Update set solution prior to 1.6.0Pattern Execution Flow Overview Hardware types are configuration items (CI)s that represent pre-defined virtual machine types provided by cloud vendors. Cloud vendors provide several hundreds of out-of-box types. In most cases, customers are using the out-of-box types(Example- t2.nano, t2.micro, t2.large in AWS). Old Hardware Type Model This model uses the class cmdb_ci_compute_template (label: Hardware Type). This class is a dependent class on cmdb_ci_logical_datacenter.The result of this modeling is that each out-of-box hardware type is modeled in the CMDB N times where N = number of service accounts * number of logical datacenters.Customers with hundreds of service accounts end up discovering millions of hardware type records in the CMDB. This slows down discovery and other related flows that can cause performance issues.Hence, customers are puzzled by the fact that hundreds of hardware types present in the cloud (AWS, AZURE, GCP) result in millions of records being persisted in the CMDB. New Hardware Type Model This model reduces the number of hardware type records in the CMDB.Hardware types are populated in cmdb_ci_cloud_hardware_type (label: Cloud Hardware Type). This is an independent class. It will create one record for each hardware type irrespective of the Service account and data center.This will reduce the millions of hardware type records to hundreds of records. Release Version This feature is available starting from: Release Version: Discovery and Service Mapping Patterns store app version 1.6.0 (June 2023) or later. Note: We recommend upgrading the discovery and Service Mapping Patterns store app to version 1.6.0 or later to adopt the new solution to migrate to New ModelFor versions prior to 1.6.0, an Update Set was provided to migrate to a hardware type model for AWS, Azure, and GCP. If you have already migrated using the Update Set, no further action is required. Prerequisites Before migrating to the new model, the following criteria should be met: Discovery and Service Mapping Patterns Store App: It should be Active and at version 1.6.0 or laterAWS/Azure Customers: This new model is applicable only to customers who have already migrated from CPG to Patterns. This prerequisite is not applicable to GCP customers, as GCP follows a direct Patterns flow without a migration from CPG.Cloud Insights Store App: If the Cloud Insights app is active, it supports this feature starting from plugin version 2.2.0 or later. Steps to Migrate New Hardware Type Model This solution is applicable for AWS, Azure, and GCP customers. Migration Steps: 1. Set the System Property: To migrate to a new hardware type model, set the System Property "sn_itom_pattern.use a single hardware type for cloud data centers" to true. Navigate to Filter Navigator and go to: sys_properties.listSearch for the follwoing property: sn_itom_pattern.use a single hardware type for cloud data centersOpen the property and set its value to true Click Update Note: Once this property is enabled, future discoveries will populate records in the new model table (cmdb_ci_cloud_hardware_type). Restrictions and Important Notes: Starting from version1.6.0, the following patterns will no longer be updated. Only the new model patterns will receive updates. "Amazon AWS - Hardware Type (LP)""Azure - Hardware Type (LP)" 2. Once the property is enabled, reverting it back to false is not supported.(You cannot switch from the new model back to the old model.) Steps to clean the old Model hardware type records Perform these steps only if you're migrating to the new hardware type model and want to remove Old model records from the cmdb_ci_compute_template table. If old model hardware type records have not been deleted after migrating to the new model and running Cloud Discovery, you may see both old and new model records and relationships in the CMDB. Cleanup Steps To delete the old model hardware type records, follow the steps below: Import the Update Set: Import the update set in Global ScopeOnce Imported, Commit the update set to apply the changes. Activate the Scheduled Job Navigate to System Definition -> Scheduled JobsSearch for the Job named: "Old Hardware Types Model records Mark as Absent"Open the schedule job, check the "Active" boxClick "Update" to save your changes. How It Works This scheduled job will periodically mark old model CIs (from the cmdb_ci_compute_template table) with a status of Absent.Once marked as Absent, the Table Cleaner will automatically delete these records. Note: You can adjust the repeat interval and follow system property values to optimize the performance. However, please note that the following system properties are not listed in the 'sys_properties' table. Should you wish to update these properties, you can either add them to the 'sys_properties' table or directly modify values within the scheduled job script. sn_itom_pattern_delete_old_hardware_type_job_count - Defines the number of jobs executed simultaneously. The default value is set to 10sn_itom_pattern_delete_old_hardware_type_batch_size - Specifies the number of records processed by each job. The default value set to 10000 Considerations for Running the 'Old Hardware Types Model records Mark as Absent' Scheduled Job: When running the scheduled job that marks old hardware type model records as absent, consider the following to avoid potential performance issues: System Resource Management: For instances with large datasets, schedule this job during off-peak times to reduce the load on the system. Ensure that no other scheduled jobs are running concurrently, and verify that the instance has adequate resources available.Table Cleaner Operation: Once records are marked as absent, the Table Cleaner process will continuously scan and remove these records. Although it works in regular intervals, this constant background activity may lead to performance degradation, especially if a large number of records need to be processed.Performance Impact: Since the Table Cleaner may take time to process absent records, it can put additional load on your instance, potentially affecting overall performance. Best Practice: To reduce performance risks and prevent further impact on instance performance, manually schedule this job during low-activity periods, ideally for couple of hours when system load is minimal. Rather than marking all CIs as absent at once, break the job into multiple intervals, processing smaller batches of data during each run for the Table Cleaner. This approach helps avoid significant performance degradation. Issue with the Update set solution prior to 1.6.0 For versions prior to 1.6.0, migrating to the new hardware type model using the Update Set requires the execution of a fix script provided in the update set.The fix script will: Enable the system property "sn_itom_pattern.use a single hardware type for cloud data centers"Implement necessary orchestration changes to AWS (Amazon AWS - Hardware Type (LP)) and Azure (Azure - Hardware Type (LP)) patterns. Important: Any changes made by the fix script will be treated as customizations and will not be included in future updates. Be aware that these customizations will need to be maintained separately. Pattern Execution Flow Note: GCP cloud discovery use the 'Google Cloud Platform (GCP) - Virtual Server' pattern for both old and new flows to populate the cmdb_ci_compute_template and cmdb_ci_cloud_hardware_type table based on System property value. In the 1.6.0 version, two new patterns were introduced: Amazon AWS - Cloud Hardware Type (LP)Azure - Cloud Hardware Type (LP) CloudNew PatternCorresponding Old PatternAWSAmazon AWS - Cloud Hardware Type (LP)Amazon AWS - Hardware Type (LP)AzureAzure - Cloud Hardware Type (LP)Azure - Hardware Type (LP) Before the 1.6.0 release, AWS and Azure customers executed a fix script to implement the necessary orchestration changes. Depending on the migration scenario, customers may observe the following behaviors: Scenario Old Pattern BehaviourNew Pattern BehaviourNot migrated to New hardware type modelProcess the patternPattern is not launchedMigrated to New hardware type model before 1.6.0 version (via Fix Scripts)Process the patternPattern is not launchedMigrated to New hardware type model version 1.6.0 or laterPattern is not launchedProcess the pattern Flow Diagram: ***** END ******