Changes not related to rolling upgrade
UI Remove licence restrictions for bulk selection
@criamico #130981
Currently we restrict bulk actions to user with gold plus licence, (note we only restrict this in the UI, API allow bulk actions without validating licence
UI Move the bulk actions from the table to actions button
@criamico #131133
We want to move the bulk actions from the table to an action button near the add agent button when agents are selected
UI/API Add additional version option for "Upgrade" action on agent list
We want to allow the user to specify the version he want to upgrade too, we should allow a user to upgrade to a version <= kibana version.
Also we should not allow to upgrade agents before Fleet server are upgraded
API
Note: the eol json doesn't have information about the elastic agent package, we'll likely need to find another source for this info - currently investigating how to get the info from https://www.elastic.co/downloads/past-releases#elastic-agent
UI Misc

Rolling upgrade changes
This depends on the .fleet-agent-actions schema to be updated:
UI




API
@nchaulet
.fleet-agent-actions document for an upgrade (@michel-laterman to confirm)
{
"action_id": "action2",
"@timestamp": "..",
"expiration": "END_DATE",
"start_time": "START_DATE",
"minimum_execution_period": 123123,
"type": "UPGRADE",
"agents": [ "agent1" ],
"data": { "version": "8.3.0", "source_uri": "nonmandatory" }
}
{
"action_id": "action2",
"@timestamp": "..",
"expiration": "..",
"type": "CANCEL",
"agents": [ "agent1" ],
"data": { "target_id": "action1" }
}
Testing
Changes not related to rolling upgrade
UI Remove licence restrictions for bulk selection
@criamico #130981
Currently we restrict bulk actions to user with gold plus licence, (note we only restrict this in the UI, API allow bulk actions without validating licence
UI Move the bulk actions from the table to actions button
@criamico #131133
We want to move the bulk actions from the table to an action button near the add agent button when agents are selected
UI/API Add additional version option for "Upgrade" action on agent list
We want to allow the user to specify the version he want to upgrade too, we should allow a user to upgrade to a version <= kibana version.
Also we should not allow to upgrade agents before Fleet server are upgraded
API
@criamico [Fleet] Changes to bulk upgrade api for allowing rolling upgrades #131947
Depends on https://github.com/elastic/website-development/issues/9331
GET /api/fleet/agents/available_upgrade_versions. This API should fetch data from an internal kibana endpoint and fallback to an hardcorded|configured list of version.8.0.0-alpha1Note: theeoljson doesn't have information about the elastic agent package, we'll likely need to find another source for this info - currently investigating how to get the info from https://www.elastic.co/downloads/past-releases#elastic-agentUI Misc
Rolling upgrade changes
This depends on the
.fleet-agent-actionsschema to be updated:UI
EuiComboBoxto search among the versions instead of the simple dropdownrollout_duration_seconds) (bulk upgrade only) and pass that to the upgrade APIDefines the duration of time available to perform the upgrade. The agent upgrades are spread uniformly across this duration in order to avoid exhausting network resources.Immediately(no wait between upgrades)Immediately(as it might impact upgrades of big batches)API
@nchaulet
start_time) in the bulk upgrade API. And use that when creating.fleet-actionsdocument. Behind the scenes the upgrade API should:.fleet-actionsdocument withagent_idsinstead of one per agent [Fleet] Cleanup action types and use one document per action instead of one per agent #131826start_time,expirationandminimum_execution_periodto the.fleet-actions(minimum_execution_periodwill be hardcoded in Kibana to give enough time for last agent to get scheduled to have a chance to complete the upgrade) [Fleet] Allow to specify an upgrade window for rolling upgrade #131964.fleet-agent-actions document for an upgrade (@michel-laterman to confirm)
{ "action_id": "action2", "@timestamp": "..", "expiration": "END_DATE", "start_time": "START_DATE", "minimum_execution_period": 123123, "type": "UPGRADE", "agents": [ "agent1" ], "data": { "version": "8.3.0", "source_uri": "nonmandatory" } }Add a current upgrade API
GET /api/fleet/current-upgrades[Fleet] Add new API to get current upgrades #132276.fleet-actionswith theUPGRADEtype that are not expired to get the action id and expected number of agent to upgrade and will then query.fleet-actions-resultsto know how many of these agents completed the upgrade.Add an API to abort current upgrades
POST /api/fleet/actions/{upgradeActionId}/cancel. This will create a new.fleet-actionsof typeCANCELwith the target action id to cancel and the agent ids that should be cancelled (we could reuse the agent ids from the action to cancel to populate that).fleet-agent-actions document for a cancellation (@michel-laterman to confirm) [Fleet] Allow to cancel agent actions #132168
{ "action_id": "action2", "@timestamp": "..", "expiration": "..", "type": "CANCEL", "agents": [ "agent1" ], "data": { "target_id": "action1" } }Testing