fix: Disallow ISO sync on shared storage within a cluster.#421
Conversation
ISO sync might end up in confusions when using shared storage in a cluster where all data is already present for all nodes (unless explicitly excluded). Sponsored-by: credativ GmbH <https://credativ.de>
Review Summary by Qodo(Agentic_describe updated until commit cc64118)Disallow ISO/template sync on shared storage in clusters WalkthroughsDescription• Prevent ISO/template sync on shared storage within clusters • Add validation for content_type parameter in sync endpoints • Implement _get_syncable_storage() method to check storage eligibility • Filter shared storage from sync status matrix calculations Diagramflowchart LR
A["Sync Request"] --> B["Validate content_type"]
B --> C["Check Storage Eligibility"]
C --> D{Is Shared?}
D -->|Yes| E["Reject Sync"]
D -->|No| F["Proceed with Sync"]
G["Sync Status Matrix"] --> H["Filter Shared Storage"]
H --> I["Return Non-Shared Only"]
File Changes1. pegaprox/api/storage.py
|
Code Review by Qodo
1. Misleading shared-storage error
|
|
Persistent review updated to latest commit cc64118 |
fix: Disallow ISO sync on shared storage within a cluster.
ISO sync might end up in confusions when using shared
storage in a cluster where all data is already present
for all nodes (unless explicitly excluded).
Details:
This simply doesn't show up for storage types that are declared by
shared: 1, as all data is already available for all nodes.Result in UI:

ISOs on storages that are defined as shared should not be visible, as there isn't any need for a sync. Attached, an example of an ISO of 'griml' on a shared NFS which won't get shown anymore while the local ISOs on the nodes LVM are still present:
Sponsored-by: credativ GmbH https://credativ.de