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

[Fleet] Fix error with creating agent policy during add integration #83993

Merged
merged 2 commits into from Nov 23, 2020

Conversation

jen-huang
Copy link
Contributor

Summary

Fixes #83990. With at least one agent enrolled in Default policy, trying to create a new agent policy during Add integration throws an error. After I fixed that, another issue came up where Saving the integration would give the "Save and deploy changes" modal, even though the newly created policy does not have any agents enrolled yet.

This PR fixes both of those issues. I cleaned up some eslint-disable-next-line too while I was in the area.

Nov-20-2020 14-08-10

@jen-huang jen-huang added bug Fixes for quality problems that affect the customer experience release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v7.11.0 v7.10.1 labels Nov 20, 2020
@jen-huang jen-huang requested a review from a team November 20, 2020 22:09
@jen-huang jen-huang self-assigned this Nov 20, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ingest-management (Team:Ingest Management)

@jen-huang
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
fleet 1.1MB 1.1MB +525.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@nchaulet nchaulet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jen-huang jen-huang merged commit cf255e4 into elastic:master Nov 23, 2020
@jen-huang jen-huang deleted the ingest/fix/create-policy-inline branch November 23, 2020 20:53
jen-huang added a commit to jen-huang/kibana that referenced this pull request Nov 23, 2020
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx
#	x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx
jen-huang added a commit that referenced this pull request Nov 24, 2020
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/index.tsx
#	x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx
jen-huang added a commit that referenced this pull request Nov 24, 2020
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@ghost
Copy link

ghost commented Dec 2, 2020

Hi @jen-huang

We have validated this ticket on 7.10.1 BC1 Kibana cloud environment(deployed from staging platform) with 7.10.1 BC1 Windows x64 agent and found it fixed.

Build details:
Kibana Commit: 1d4cfde288ede0c4bc6277b4d589ca0cb96b231f
Build : 36050
7.10.1 BC1 Windows x64 agent package link: https://staging.elastic.co/7.10.1-ce3b40e6/downloads/beats/elastic-agent/elastic-agent-7.10.1-windows-x86_64.zip

Prerequisite:

  1. 'elastic' superuser should be logged-in to 7.10.1 BC1 kibana cloud environment.
  2. 7.10.1 BC1 Windows x64 agent should be installed(using './elastic-agent install' command) with Default policy.

Steps followed:

  1. Click on left hand 'Fleet' link and navigate to Integrations tab

  2. Click on 'System' integration and navigate to its detail page.

  3. Click on 'Add System' link and navigate to 'Add System integration' detail page.

  4. Click on 'Create new agent policy' link.

  5. Provide new policy name(say rahul_new_policy) having no agents enrolled and unselect 'Collect system metrics' checkbox on 'Create agent policy' flyout.

  6. Click on 'Create agent policy' button and observe that "Agent policy 'rahul_new_policy' created" toast message is successfully displayed with no errors.
    Screenshot:
    create_policy_while_adding_integration

  7. Click on 'Save integration' button and observe that "Save and deploy changes" modal is not displayed and system integration is added in 'rahul_new_policy' policy.
    Screenshot:
    save_integration

Hence, we are closing this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience release_note:fix Team:Fleet Team label for Observability Data Collection Fleet team v7.10.1 v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Trying to create a new policy during add integration throws error
4 participants