Automated Sync for Data Source breaks manual sync #11479

Closed
opened 2025-12-29 21:45:49 +01:00 by adam · 5 comments
Owner

Originally created by @ed-ud on GitHub (Aug 13, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.3.5

Python Version

3.12

Steps to Reproduce

  1. Create Data Source with automated sync such as Daily.
  2. Sync button is greyed out.

Expected Behavior

Manual sync should always be available.

Observed Behavior

Sync button becomes disabled once you set a Data Source to use automated sync.

Also, if you disable the automated sync after it was already enabled for the period (e.g. more than one Day for Daily sync), it doesn't reset the Data Source back to manual sync mode, leaving the Data Source in "Queued" state.

Originally created by @ed-ud on GitHub (Aug 13, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.3.5 ### Python Version 3.12 ### Steps to Reproduce 1. Create Data Source with automated sync such as Daily. 2. Sync button is greyed out. ### Expected Behavior Manual sync should always be available. ### Observed Behavior Sync button becomes disabled once you set a Data Source to use automated sync. Also, if you disable the automated sync after it was already enabled for the period (e.g. more than one Day for Daily sync), it doesn't reset the Data Source back to manual sync mode, leaving the Data Source in "Queued" state.
adam added the netbox label 2025-12-29 21:45:49 +01:00
adam closed this issue 2025-12-29 21:45:49 +01:00
Author
Owner

@bctiemann commented on GitHub (Aug 15, 2025):

I think I agree that this is a bug; the current logic for determining whether the Sync button should be grayed out only worries about the syncing status (to prevent syncing multiple times at once):

290e4afaa0/netbox/core/models/data.py (L112-L117)

This logic can (should) be made more sophisticated to ensure that you're still prevented from hitting Sync if a sync is currently in process, but still allows you to press it manually even if automated is enabled.

Maybe just removing the self.enabled part of the condition?

@bctiemann commented on GitHub (Aug 15, 2025): I think I agree that this is a bug; the current logic for determining whether the Sync button should be grayed out only worries about the syncing status (to prevent syncing multiple times at once): https://github.com/netbox-community/netbox/blob/290e4afaa0f1547f1dfde6356d81163a482ade08/netbox/core/models/data.py#L112-L117 This logic can (should) be made more sophisticated to ensure that you're still prevented from hitting Sync if a sync is currently in process, but still allows you to press it manually even if automated is enabled. Maybe just removing the `self.enabled` part of the condition?
Author
Owner

@jeremystretch commented on GitHub (Aug 20, 2025):

Disabling manual syncs is intended behavior, and in many scenarios is desirable. (For example, an operator might want to avoid running a sync during business hours.)

I'm not necessarily opposed to changing this, but it will require a feature request citing a use case as it's reasonable to assume many users rely on the current behavior. Also note that some solution is needed to restore the original "queued" state after running an ad hoc sync where a scheduled job remains.

@jeremystretch commented on GitHub (Aug 20, 2025): Disabling manual syncs is intended behavior, and in many scenarios is desirable. (For example, an operator might want to avoid running a sync during business hours.) I'm not necessarily opposed to changing this, but it will require a [feature request](https://github.com/netbox-community/netbox/issues) citing a use case as it's reasonable to assume many users rely on the current behavior. Also note that some solution is needed to restore the original "queued" state after running an ad hoc sync where a scheduled job remains.
Author
Owner

@ed-ud commented on GitHub (Aug 21, 2025):

The workaround for still being able to do an adhoc manual sync is to disable the automatic sync, do a manual sync, and then re-enable - which I'm fine with doing.... however, that is broken currently because the Queued state never gets reset when you disable auto-sync, as I mentioned.

@ed-ud commented on GitHub (Aug 21, 2025): The workaround for still being able to do an adhoc manual sync is to disable the automatic sync, do a manual sync, and then re-enable - which I'm fine with doing.... however, that is broken currently because the Queued state never gets reset when you disable auto-sync, as I mentioned.
Author
Owner

@jeremystretch commented on GitHub (Aug 21, 2025):

however, that is broken currently because the Queued state never gets reset when you disable auto-sync, as I mentioned.

@ed-ud please open a separate bug report for this as it's a separate issue.

@jeremystretch commented on GitHub (Aug 21, 2025): > however, that is broken currently because the Queued state never gets reset when you disable auto-sync, as I mentioned. @ed-ud please open a separate bug report for this as it's a separate issue.
Author
Owner

@simonzsay commented on GitHub (Sep 25, 2025):

Hello, mates, so do you need separate bug report or not? We faced same problem after upgrading from netbox_version: "v4.3.6-3.3.0" to netbox_version: "v4.4.1-3.4.0"

Status: queued and we cant click on "sync" button anymore. Disabling \ enabling autosync doesnt help. Don`t see anything special in docker logs. Thnx!

@simonzsay commented on GitHub (Sep 25, 2025): Hello, mates, so do you need separate bug report or not? We faced same problem after upgrading from netbox_version: "v4.3.6-3.3.0" to netbox_version: "v4.4.1-3.4.0" Status: queued and we can`t click on "sync" button anymore. Disabling \ enabling autosync doesn`t help. Don`t see anything special in docker logs. Thnx!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11479