Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Target with this name already exists" when resinstalling a cluster (Adoption?) #383

Open
jlpedrosa opened this issue Apr 1, 2024 · 0 comments

Comments

@jlpedrosa
Copy link

jlpedrosa commented Apr 1, 2024

Hi!

I'm using gitops to deploy everything in kubernetes. When reinstalling the cluster, the same pods/statefulsets/deployment are created exactly the same, which triggers the same PVCs.

This trigers the failure in the csi provider:

 failed to provision volume with StorageClass "freenas-iscsi-csi": rpc error: code = Unknown desc = received error creating iscsi target - code: 422 body: {"iscsi_target_create.name":[{"message":"Target with this name already exists","errno":22}]}

IMO it would be great if two different behaviours would be configurable:

  1. Adopt: take the target and use it as existing.
  2. Same name should not be a conflict and the naming should not be conflicting (and then Velero or any other recovery tool can be used)

Additionally: When I manually deleted the portal, CSI went ahead and provisioned the portal, and everything seems to be working. I was really surprised when the previous data was still present. I've been digging and it seems that the mapping of the extent to the dataset from the previous volume was still present, so it mapped to the old lun. This means that the system ends up in an inconsistent state if you go and tinker with things manually, which makes sense. Just added this comment to give you the info about the previous extent mapping.

pvcs: pvc-0d06a23f-b6f8-41e3-b592-3439bd3add52 and pvc-225a46ec-e677-4b61-93d3-5d0c1ef5a10b do not exist on the cluster.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant