-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Unable to return to "Add Agent" flow in flyout when a Fleet Server policy is selected from the dropdown #130892
Comments
Pinging @elastic/fleet (Team:Fleet) |
After reviewing various offline conversations and some mockups, I believe the root fix for this issue is to more cleanly separate the "Add Agent" and "Add Fleet Server" workflows. Our existing logic to dynamically "swap out" the instruction set in the "Add Agent" flyout based on whether an agent policy containing the As part of the design discussion for #80841, @dborodyansky proposed adding a separate "Add Fleet Server" button on the Having this separate CTA specifically for adding a Fleet Server will help us avoid issues like the one reported here that come about because we're being "predictive" in our approach to onboarding with these flyouts. Proposed implementation to fix this issue:
On the last point, I'm not completely sure if this is required or desirable. Do we (or should we) support enrolling a "plain agent" in a policy that includes the |
@kpollich This proposal looks good for me, I just tested the setup/enrollment flow on main and ran into the same issue so separating the two enrollment types makes sense to me. As discussed, let's keep this enhancement within 8.3 but treat it as lower priority (like a stretch goal).
Today, a regular agent enrolled into a policy that contains |
@kpollich I noticed another potential bug when enrolling Fleet Server for the first time with docker:
|
Thanks for the detailed bug report, @juliaElastic - I think this is the same bug that we have in #131030. cc @criamico - I think you're eventually taking a look at the issue above, and the root fix may also address this issue with the Fleet Server flyout. |
We should probably not allow a user to enroll an agent in a policy with the Fleet server integration without the fleet server extra cli arguments as this will result in an unhealthy agent. |
When selecting a policy in the "Add Agent" flyout, Fleet will detect when a policy including the Fleet Server integration is selected. When a Fleet Server policy is selected from this dropdown, we display a set of instructions specific to setting up an instance of Fleet Server, rather than the "plain" agent instructions.
As of #127786, we display the new Fleet Server flyout's "Advanced" tab contents in this UI. This affords us some clean re-use of the existing interface and implementation around setting up a Fleet Server that appears elsewhere in the app.
However, the "Advanced" tab's policy selection dropdown includes logic such that it only includes policies with the Fleet Server integration. The thinking here is that when you are setting up a Fleet Server, we should only show you eligible policies against which that Fleet Server can run.
This logic introduces a "stuck" state wherein the user can perform the following
Screen.Recording.2022-04-20.at.10.53.46.AM.mov
The workaround to this "stuck" state is to simply close the flyout and restart the enrollment process.
In a conversation offline with @dborodyansky, he mentioned potentially creating a dedicated "Add Fleet Server" button in addition to our "Add Agent" button that would potentially alleviate these issues. If we excluded Fleet Server policies from the "Add Agent" flyout and only included Fleet Server policies in the "Add Fleet Server" flyout without any kind of intelligent/dynamic swap-out of the instructions for each workflow we could likely avoid this issue.
The text was updated successfully, but these errors were encountered: