Skip to content
This repository was archived by the owner on Feb 18, 2025. It is now read-only.

Forget instance: accept fuzzy/partial hostnames #886

Merged
merged 2 commits into from
May 13, 2019

Conversation

shlomi-noach
Copy link
Collaborator

@shlomi-noach shlomi-noach commented May 13, 2019

Previously, forget required fqdn of the instance to forget. The reasoning was that we wanted to avoid resolving the name, which would lead us to forgetting a different name than the name submitted to be forgotten, e.g. if we wanted to forget an old DNS name.

This PR now allows fuzzy/partial names in forget. orchestrator will attempt to find a single-matching instance, and without running name resolving.

Thus, orchestrator-client -c forget -i my-host-123 will succeed if a hostname my-host-123456.example.com exists and is the only server to match the partial name.

If both my-host-123456.example.com and my-host-123abc.example.com exist, that's an ambiguity and the operation aborts.

cc @ggunson

@shlomi-noach shlomi-noach merged commit d4a98c3 into master May 13, 2019
@shlomi-noach shlomi-noach deleted the forget-instance-fuzzy branch May 13, 2019 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant