-
Notifications
You must be signed in to change notification settings - Fork 14
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
If OXIDE_HOST is not set, we choose a random host from the user's config #301
Comments
Closing as a dup of #302. |
Related: #6 |
Agreed that this behavior is lousy. What do we want to do here? I don't love |
Having the environment variables take precedence over the config file is not uncommon (AWS CLI does this as well). It would be nice to be able to set a host as default though. My thinking is that having profiles (#6) is the best way to go long term, but perhaps not something that can just be whipped up and shipped quickly. Perhaps having the user have to choose a host from the list through a flag if they are logged in to more than one silo can be a start?
|
Yes! I'm just saying that it's lousy as the primary mechanism. |
Bumping this since our own folks run into this a lot and we can expect fleet admin who operates in a multi-tenant environment may hit the issue as well. There are some suggestions on the desired behavior:
|
Erroring out in case of ambiguity is something we could do immediately while deciding between fancier solutions. |
We have a customer who will be using multiple silos to partition dev and prod workloads. The change will likely cause many end-users to have multiple silo endpoint/tokens in their host config file. This CLI issue is going to be hit a lot more frequently (right now, it affects just the fleet admin user so we've been prioritizing it low). @ahl - We need to bump up the priority of resolving this issue somehow. |
Confirmed; I have a plan that I'll prototype ASAP for feedback. |
Independent of the any end user configuration I think we could resolve the non-determinism by using a Lines 62 to 65 in 3ac6e32
|
Only reason not to is if @ahl is planning on fixing this in the next few days anyway. |
I believe this is addressed by #727. Please open a new issue if that's not the case. |
In
oxide.rs/cli/src/context.rs
Lines 49 to 60 in f0ba6a2
OXIDE_HOST
is not set, we choose a host by taking the "next" house out of a hashmap, which results in effectively a random host being chosen on each invocation (if the user has multiple host entries). This can create confusing results where the same command may succeed in one invocation and fail in the next, if the command was intended to be used with one of the specific hosts.The text was updated successfully, but these errors were encountered: