microceph
microceph copied to clipboard
fix: prevent using the same name for local alias and remote cluster
Description
This PR introduces a validation in the remote import CLI command to prevent users from specifying the same value for the --local-name flag and the remote cluster name (positional argument). This resolves an issue where Ceph replication fails due to duplicate site names during peer bootstrap.
Additionally, the relevant documentation (Import a remote MicroCeph cluster) was updated to include a note that clarifies this requirement for users.
Fixes #559
Type of change
- Bug fix (non-breaking change which fixes an issue)
How has this been tested?
The validation was tested locally by building the microceph binary and running the remote import command with:
- Identical --local-name and remote name: correctly triggers a validation error
- Distinct values: proceeds past validation as expected