Clarify error message about multiple datastores#4692
Clarify error message about multiple datastores#4692europaul wants to merge 1 commit intolf-edge:masterfrom
Conversation
EVE currently doens't support multiple datastores for OCI images. This commit adds a more descriptive error message to the error that is returned when multiple datastores are detected. For reasons behind this limitation, see commit 34ae228 Signed-off-by: Paul Gaiduk <paulg@zededa.com>
eriknordmark left a comment
There was a problem hiding this comment.
Re-reading the old commit you cited, I think it is overly conservative.
The logic in it assumes that if one datastore is an OCI registry then all of them should be, but it doesn't explicitly check for that but instead checks that there is only one.
I don't think it would be hard to fix that by checking that all or none are OCI. Can you look into this as an alternative approach?
| if status.IsOCIRegistry { | ||
| if len(status.DatastoreIDList) > 1 { | ||
| err := fmt.Sprintf("doUpdateContentTree(%s) name %s: OCI registry along with the fallback datastores list is not supported", | ||
| err := fmt.Sprintf("doUpdateContentTree(%s) name %s: EVE doesn't support multiple datastores for OCI registry. Please use only one datastore", |
There was a problem hiding this comment.
The error message now uses 'OCI registry', but the PR title and description reference OCI images; consider aligning the terminology for consistency.
| err := fmt.Sprintf("doUpdateContentTree(%s) name %s: EVE doesn't support multiple datastores for OCI registry. Please use only one datastore", | |
| err := fmt.Sprintf("doUpdateContentTree(%s) name %s: EVE doesn't support multiple datastores for OCI images. Please use only one datastore", |
OhmSpectator left a comment
There was a problem hiding this comment.
@europaul what's the status of this PR?
| I'm going to do what @eriknordmark suggested, but I haven't started yet. |
Got it, thanks for the clarification! |
EVE currently doens't support multiple datastores for OCI images. This commit adds a more descriptive error message to the error that is returned when multiple datastores are detected.
For reasons behind this limitation, see commit
34ae228