You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature/4890 detect fail early upgrade (#5864) (#5978)
* feature(4890): added shouldUpgrade function in the upgrade cli file
* feature(4890): added shouldUpgrade check into the upgrade command
* feature(4890): ran gofmt
* feature(4890): added a "force" flag, marked it as hidden
* feature(4890): removed dpkg, rpm and container logic
* feature(4890): ran gofmt
* feature(4890): updated the function signature of the upgrade command, updated tests, added new tests
* feature(4890): update comments
* feature(4890): added changelog fragment
* feature(4890): added fatal log in case there is an error while marking force flag as hidden
* feature(4890): added error checks in tests
* feature(4890): updated the summary in the changelog fragment
* feature(4890): removed the shorthand flag for the force flag
* feature(4890): updated synchronization in the tests
* Update internal/pkg/agent/cmd/upgrade_test.go
Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
* feature(4890): using streams err output instead of defaulting to stderr
* feature(4890): use EXPECT instead of On
* feature(4890): moved unconfirmed upgrade error to a package var
* feature(4890): removed confirmation from upgrade check for when force flag is set
* Update internal/pkg/agent/cmd/upgrade.go
Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
* Update internal/pkg/agent/cmd/upgrade.go
Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
* feature(4890): fix errors
* Update internal/pkg/agent/cmd/upgrade.go
Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
* feature(4890): update test
* fearure(4890): replace ageninfo with state call
- updated agentinfo proto
- updated relevant generated code
- implemented state call in the upgrade cmd
* feature(4890): updated proto, client and server implementation
* feature(4890): fix struct tag
* feature(4890): added skip-verify checks
* feature(4890): ran addLicenseHeaders
* feature(4890): ran mage clean
* feature(4890): fix typo
* feature(4890): added timeout to connection
* feature(4890): changed condition check order
* feature(4890): fix unit tests
* feature(4890): refactored tests, using mock client
* Update internal/pkg/agent/cmd/upgrade.go
Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
* feature(4890): use lower case "f" in error messages to be more consistent
* feature(4890): remove duplicate line
* feature(4890): ran mage controlProto with correct protoc version
---------
Co-authored-by: Paolo Chilà <paolo.chila@elastic.co>
Co-authored-by: Craig MacKenzie <craig.mackenzie@elastic.co>
Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
(cherry picked from commit 8579474)
Co-authored-by: Kaan Yalti <kaan.yalti@elastic.co>
# - breaking-change: a change to previously-documented behavior
3
+
# - deprecation: functionality that is being removed in a later release
4
+
# - bug-fix: fixes a problem in a previous version
5
+
# - enhancement: extends functionality but does not break or fix existing behavior
6
+
# - feature: new functionality
7
+
# - known-issue: problems that we are aware of in a given version
8
+
# - security: impacts on the security of a product or a user’s deployment.
9
+
# - upgrade: important information for someone upgrading from a prior version
10
+
# - other: does not fit into any of the other categories
11
+
kind: enhancement
12
+
13
+
# Change summary; a 80ish characters long description of the change.
14
+
summary: Detect and fail-early cli upgrades if agent is fleet-managed
15
+
16
+
# Long description; in case the summary is not enough to describe the change
17
+
# this field accommodate a description without length limits.
18
+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19
+
description: This change brings restrictions on the upgrade cli command. If an agent is fleet-managed and is running in unprivileged mode, users won't be able to upgrade the agent using the cli. If an agent is fleet-managed and is running privileged, users will only be able to upgrade the agent using the cli if they provide --force flag.
20
+
21
+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22
+
component: "elastic-agent"
23
+
24
+
# PR URL; optional; the PR number that added the changeset.
25
+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26
+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27
+
# Please provide it if you are adding a fragment for a different PR.
0 commit comments