Allen Andreas, Our ServiceNow Community MVP at Knowledge 2022

How To Utilize And Participate In The ServiceNow Community!

itd-dave1
Community Manager
Community Manager

Cloning instances in ServiceNow is a crucial part of maintaining development, test, and production environments. It allows administrators to replicate production data and configurations to non-production instances for development or testing. While the cloning process is generally straightforward, there are several lesser-known issues that can arise, potentially causing disruptions. Understanding these unknown issues is essential to ensure smooth cloning operations.

 

1. Unintended Overwrite of Configuration Data

Issue: When cloning a production instance to a development or test instance, custom configurations or specific settings that only exist in the target environment can get overwritten, leading to unexpected behavior.

Example: Suppose a development instance has custom business rules or integrations not yet deployed to production. During a clone from production to development, these customizations may be overwritten by production configurations, resulting in lost work. For example, an integration with a third-party service in the development instance could stop functioning after the clone because the integration configurations were overwritten with production settings that don’t account for the third-party service.

Solution: Use the "Exclude Tables" feature to prevent overwriting specific configurations that are unique to the development or test environment. Make sure to document any changes in your development environment and regularly back up custom configurations.

 

2. Data Inconsistencies Between Environments

Issue: Data inconsistencies can occur when certain tables are excluded from the cloning process, either intentionally or unintentionally. This can lead to broken workflows or inaccurate testing conditions.

Example: If tables related to incident management workflows are excluded during a clone from production to development, the incident-related data may not be synchronized. This can result in discrepancies when testing new incident workflows in the development environment, as they won’t reflect the production environment's conditions.

Solution: Review the "Exclude Tables" list carefully before cloning to ensure that critical data tables are included. Avoid excluding tables that are essential to the processes or workflows being tested.

 

3. Loss of Personal or Development Data

Issue: Cloning a production instance can lead to the loss of personal or development data, including developer notes, test records, or personal task lists that are unique to non-production instances.

Example: Developers might store personal work-in-progress data, such as active test cases or prototype configurations, in the development instance. When a clone is performed from production, this data can be overwritten, causing loss of important development work. For instance, a developer may have created test records for a new feature, but after the clone, these records are replaced with production data, leading to unnecessary rework.

Solution: To prevent loss of personal data, developers should export any critical data before a clone and re-import it afterward. Another approach is to create snapshots or backups of the data using update sets.

 

4. Impact on Integrations and External Connections

Issue: Integrations that are configured in a non-production instance may stop functioning after a clone, as they may rely on instance-specific credentials, tokens, or URLs that are overwritten by production values.

Example: A test environment may be connected to a different external API for testing purposes, with specific tokens or credentials. After cloning from production, the development environment may inherit the production tokens or API URLs, which can cause failures when attempting to connect to the external service.

Solution: Use the "Exclude Tables" functionality to prevent integration-specific tables from being overwritten. Alternatively, after the clone, be sure to update any API credentials or tokens to match the non-production environment.

 

5. Notification Storms

Issue: Notifications configured in production, such as email alerts or SMS messages, may inadvertently trigger in the non-production environment after a clone, leading to a flood of unnecessary messages.

Example: Suppose email notifications for incident updates are active in production. After cloning the production instance to development, these notifications may remain active, leading to test users or administrators receiving hundreds of unnecessary incident emails when testing in the development instance.

Solution: Always deactivate email notifications and outbound email in non-production environments before cloning. ServiceNow provides a post-clone script that can be customized to turn off outbound emails after a clone.

 

6. Security Role Misalignment

Issue: Clone processes can disrupt role-based access controls (RBAC) in the target environment. Custom security roles or assignments that exist in the development or test instance but not in production might be overwritten, leading to security inconsistencies.

Example: In a development environment, a custom security role might grant access to specific tables or workflows for testing purposes. After a production-to-development clone, this role may be overwritten or lost, leading to permission errors for developers or testers.

Solution: Document and back up custom security roles. Use the post-clone process to manually restore roles and access settings that were specific to the target environment.

 

7. Post-Clone Script Failures

Issue: ServiceNow allows administrators to configure post-clone scripts that automatically execute after a clone to perform tasks such as disabling notifications, resetting credentials, or updating configurations. However, if these scripts fail, they may leave the instance in an inconsistent state.

Example: A post-clone script designed to disable outbound email might fail due to a syntax error or outdated API references, resulting in active email notifications in the development instance. This could lead to unintended emails being sent from a test environment, causing confusion or disrupting workflows.

Solution: Regularly test and update post-clone scripts to ensure they run correctly. Consider automating a validation step after a clone to verify that key configurations (such as notifications and integrations) have been properly adjusted.

 

Conclusion

Cloning in ServiceNow is a powerful tool for maintaining consistency across environments, but it comes with potential risks. By being aware of the lesser-known issues such as configuration overwrites, data loss, and integration failures, administrators can mitigate the impact of these issues. Proactive planning, careful use of exclusion lists, and thorough post-clone validation can help ensure successful and smooth cloning processes across all ServiceNow environments.