An OpenConfig resynchronization event is a Cisco IOS XR automation feature that
-
automatically restores consistency between OpenConfig and running configurations after system events,
-
generates system logs to notify administrators about synchronization issues and the status of resynchronization attempts,
and
-
eliminates the need for manual replacement of OpenConfig configurations when discrepancies occur.
Table 5. Feature History Table
|
Feature Name
|
Release Information
|
Feature Description
|
|
Automatic resynchronization of OpenConfig configuration
|
Release 7.11.1
|
OpenConfig infrastructure can now reapply all the OpenConfig configurations automatically if there are any discrepancies in
the running configuration.
With this feature, there is no need for manual replacement of the OpenConfig configuration using Netconf or gNMI.
The re-sync operation is triggered if the running configurations and the OpenConfig configuration go out of sync after any
system event that removes some running configurations from the system. A corresponding system log gets generated to indicate
the re-sync status.
|
Automated OpenConfig synchronisation in Cisco IOS XR
In Cisco IOS XR, OpenConfig and running configurations can go out of sync during certain operations, such as interface breakout,
software installation, or new line card insertion. Previously, restoring sync required a full replacement of the OpenConfig
configuration using Netconf or gNMI.
From the Cisco IOS XR Software Release 7.11.1, if the OpenConfig configurations and running configurations go out of sync, or any activities takes place which may result
in the two configurations to go out of sync, the system automatically reapplies all the OpenConfig configurations and resolve
the sync issue. If there is a synchronization issue between the running configuration and the OpenConfig configuration, a
corresponding system log is generated to indicate it. Similarly, a corresponding system log is generated indicating the status
of the re-synchronization attempt.
This feature is enabled by default. This process is completely automated.
From the Cisco IOS XR Software Release 24.1.1, the new Cisco-IOS-XR-yiny-oper YANG model displays the OpenConfig configuration which is out of sync with the running configuration, including the error
associated with each out of sync configuration.
The Cisco-IOS-XR-yiny-oper operational data is a snapshot of the current system status, rather than a record of all past failures. That is, if an item
of configuration is out of sync and is later resolved, such as through a resynchronization or another configuration operation,
then this configuration is no longer considered out of sync and is removed from the snapshot.
Automatic re-synchronization of OpenConfig and running configurations
Starting with Cisco IOS XR Software Release 7.11.1, if OpenConfig and running configurations go out of sync, the system automatically reapplies all OpenConfig configurations
to resolve the issue. System logs are generated to indicate any synchronization issues and re-synchronization attempts, which
are performed automatically by default.
Viewing out-of-sync OpenConfig configurations
From Cisco IOS XR Release 24.1.1, the Cisco-IOS-XR-yiny-oper YANG model allows viewing of any OpenConfig configurations that are out of sync with the running
configuration, including the associated errors. The model provides a snapshot of the current system status, displaying only
present inconsistencies rather than a record of past sync issues.
Operations that remove running configuration
Here are three types of operation that can have the effect of removing running configuration from the system. Running configurations
are either affected because they directly remove configuration in the system or because they result in configuration failing
to be accepted by the system during start-up.
-
Install operations: Running configuration can be removed during non-reload and reload install operations. During non-reload install, running
configuration is removed when it is incompatible with the new software. In this case, it is directly removed by the Install
infra. The configuration is removed during reload install operations if the attempt to restore the startup configuration is
partially successful.
-
Breakout interfaces configuration: When breakout interfaces are configured or de-configured, all the existing configuration on interfaces is affected. The
affect may be creation or deletion of the parent and child interfaces. This results in an inconsistency between the running
configuration and the OpenConfig datastore for any of the removed configurations that was mapped from OpenConfig configuration.
The automatic restoration of OpenConfig configuration resolves this inconsistency by re-adding that removed configuration.
-
New line card insertion: On insertion of a new line card into the system, any pre-configuration for that card is verified for the first time and
may be rejected, causing it to be removed. This results in an inconsistency between the running configuration and the OpenConfig
datastore.
In any of the above scenarios, if there is a sync issue, system logs are generated and the system tries to reapply all the
OpenConfig configurations. If the re-sync attempt is successful, the configurations which were removed earlier, are re-applied.
If the re-sync attempt fails, this means that some of the OpenConfig configuration is no longer valid.

Note
|
The above scenarios are invalid if there are no OpenConfig configuration present in the system.
|
System logs Indicating out-of-sync configuration
System log messages are generated due to the above operations that can lead to discrepancies in configurations on the router.
Listed are examples of system log messages raised if any such discrepancies occur.
Table 6. Examples of system log messages generated due to Out-of-Sync Configurations :
|
Event Name Displayed in the System Log
|
Description
|
|
unexpected commit errors
|
When an unexpected commit errors in case of a SysDB server crash.
|
|
config rollback (to a commit ID created using a different software version)
|
When a configuration rollbacks back to a commit ID created using a different software version.
|
|
inconsistent configuration
|
This system log is generated when an inconsistency alarm is raised due to failure in restoring the start-up configurations
after activities like system reload or insertion of a new line card. Re-synchronization of the configuration is triggered
only after the alarm is cleared.
|
|
configuration removal (triggered on 0/2/CPU0 by the last config operation for interface GigabitEthernet0/2/0/0 and 6 other
interfaces)
|
When interface configuration is removed in response to a change in interface breakout configuration.
|
|
configuration removal (to prepare for an install operation)
|
Configuration is removed from the system during a non-reload install operation due to incompatibility with the new software.
|
Alarms for out-of-sync OpenConfig configuration
-
Inconsistency alarm: When a there is a failure in restoring the start-up configurations after a system reload or insertion of a new line card,
inconsistency alarm is raised. If the inconsistency alarm is raised, you can see an informational system log is generated
which indicates that the OpenConfig configuration and running configuration may be out of sync. A re-sync attempt will be
made when the configuration inconsistency alarm is cleared. This system log is an early warning that the system is potentially
out of sync.
Inconsistency alarm message:
NMI OpenConfig configuration is potentially out of sync with the running configuration (details: system configuration become
inconsistent during OIR restore on 0/0/CPU0). An automatic reapply of the OpenConfig configuration will be performed when
the inconsistency alarm is cleared.
-
Missing item in the OpenConfig datastore alarm: If there are missing items in the configurations which could not be added to the OpenConfig datastore while loading in a
snapshot from disk, you can see an error system log is raised which indicates that there are some items which are absent in
the running OpenConfig configuration. This scenario occurs when the yang schema is changed from the time the snapshot was
created.
Item missing alarm message:
gNMI OpenConfig configuration is potentially out of sync with the running configuration: 3 failed to be applied to the system
(details: snapshot 2 was created with a different schema version). The system may contain config items mapped from OC that
no longer exist in the OC datastore. Automatic attempts to reapply OC will not remove these items, even if they otherwise
succeed. Config should be replaced manually using a GNMI Replace operation.
System logs from configuration resynchronization
When an attempt to re-apply OpenConfig (resynchronization) is complete, the following informational system logs are generated
to indicate the user that the OpenConfig and running configuration were out of sync, and whether the attempt to resolve this
was successful.
-
Successful re-sync:
As a result of configuration removal (to prepare for an install operation), the gNMI OpenConfig configuration has been successfully
reapplied.
-
Unsuccessful re-sync:
As a result of configuration removal (to prepare for an install operation), an attempt to reapply the gNMI configuration was
made, but some items remain out of sync with the running configuration. The configuration should be reapplied manually using
a GNMI Replace operation.
-
Re-sync failure during mapping of OpenConfig configurations to XR configurations:
As a result of configuration removal (to prepare for an install operation), the attempt to reapply the gNMI OpenConfig configuration
failed, and the out of sync configuration could not be updated. gNMI OpenConfig configuration is potentially out of sync with
the running configuration. Configuration should be reapplied manually using a GNMI Replace operation
Re-sync failure during mapping of OpenConfig configurations to XR configurations is a rare scenario. When there is a failure
in the re-sync process while mapping the OpenConfig configuration to XR items, it causes the re-sync request to aborted. This
scenario is only possible after an install which changes the OpenConfig mappings such that some configuration is no longer
supported.