Configure Automatic Channels Synchronization

By default, channels are automatically synchronized with the upstream repositories to ensure that clients have access to the latest content and updates. However, in some cases, you may want to disable this automatic synchronization for specific channels.

This chapter explains how to disable automatic synchronization for a channel.

1. Verify channel synchronization status

To check if a channel is set to be automatically synchronized user can call an API.

To check the synchronization status of a channel using the API, use the following command. Replace <Channel_Label> with the actual label of the channel you want to check

spacecmd api -- --args "<Channel_Label>" channel.software.isAutoSync
INFO: Connected to http://localhost/rpc/api as admin
[
  true
]

The command will return true if automatic synchronization is enabled, or false if it is disabled.

This information is also available in the Web UI. To check the synchronization status, navigate to the channel details page and look for the field Automatic Repository Synchronization.

2. Set a channel to skip automatic synchronization

To enable or disable automatic synchronization for a channel, you can use the API call channel.software.setAutoSync.

Here is an example of how to set a channel to skip automatic synchronization using the API (replace <Channel_Label> with the actual label of the channel you want to update):

spacecmd api -- --args '["<Channel_Label>", false]' channel.software.setAutoSync
INFO: Connected to http://localhost/rpc/api as admin
[
  false
]

To re-enable automatic synchronization, set the second parameter to true:

spacecmd api -- --args '["<Channel_Label>", true]' channel.software.setAutoSync
INFO: Connected to http://localhost/rpc/api as admin
[
  true
]

3. Manually synchronize a channel

Even if you have disabled automatic synchronization for a channel, you can still manually synchronize it whenever needed.

Use mgrctl term before running steps inside the server container.

To manually synchronize a channel, you can use the command(replace <Channel_Label> with the actual label of the channel you want to synchronize):

spacewalk-repo-sync -c <Channel_Label>