Skip to content

Conversation

@Supplementing
Copy link
Contributor

@Supplementing Supplementing commented Jun 13, 2025

Summary

Closes #217618

  • Added bulk migration endpoint to allow migration agents from one cluster to another in bulk.

POST /api/fleet/agents/bulk_migrate

The params are:
agents(required) - an array of Agent ID's
enrollment_token (required) - the enrollment token retrieved from the remote cluster
uri (required) - the URL of the remote cluster to enroll the agents into
settings (optional) -additional settings such as certificate authorities, etc

Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

  • Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support
  • Documentation was added for features that require explanation or tutorials
  • Unit or functional tests were updated or added to match the most common scenarios
  • If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker list
  • This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The release_note:breaking label should be applied in these situations.
  • Flaky Test Runner was used on any tests changed
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Identify risks

N/A

Release Notes

  • Added endpoint allowing a user to migrate an bulk agents to another cluster by specifying the URL and Enrollment Token. Note: tamper protected and fleet agents can not be migrated and attempting to do so will return a 403 status code.

@Supplementing Supplementing added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Jun 13, 2025
@Supplementing Supplementing requested a review from a team as a code owner June 13, 2025 17:03
@Supplementing Supplementing added the Team:Fleet Team label for Observability Data Collection Fleet team label Jun 13, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@Supplementing
Copy link
Contributor Author

@elasticmachine merge upstream

elasticmachine and others added 6 commits June 13, 2025 19:09
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --update'
@Supplementing
Copy link
Contributor Author

@elasticmachine merge upstream

kibanamachine and others added 4 commits June 16, 2025 18:14
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --update'
Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM

certificate_authorities: schema.maybe(schema.string()),
elastic_agent_cert: schema.maybe(schema.string()),
elastic_agent_cert_key: schema.maybe(schema.string()),
elastic_agent_cert_key_passphrase: schema.maybe(schema.string()),
Copy link
Contributor

Choose a reason for hiding this comment

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

I see that these are in the requirements, but it's not clear to me what they're needed for. Are they just passed to the action? Are they saved somewhere afterwards?
I'm asking because we might have issues if we store these keys as plain text, they should be saved as secrets in that case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see that these are in the requirements, but it's not clear to me what they're needed for. Are they just passed to the action? Are they saved somewhere afterwards? I'm asking because we might have issues if we store these keys as plain text, they should be saved as secrets in that case.

They're passed to the action as additional settings. Maybe @michalpristas can expand more if needed.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
fleet 1425 1426 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
fleet 167.6KB 167.6KB +48.0B
Unknown metric groups

API count

id before after diff
fleet 1554 1555 +1

History

@Supplementing Supplementing mentioned this pull request Jun 17, 2025
7 tasks
@Supplementing Supplementing merged commit e2770f3 into elastic:main Jun 18, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bulk migration - API endpoint

5 participants