Enhancement/4811 fips to fips upgrade#7312
Conversation
|
This pull request does not have a backport label. Could you fix it @kaanyalti? 🙏
|
d07a634 to
01f3068
Compare
|
💛 Build succeeded, but was flaky
Failed CI StepsHistory
cc @kaanyalti |
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
* Fix typo in error message * enhancement(4811): added fips in the package manifest * enhancement(4811): prelimenary commit to prepare for implementation * enhancement(4811): added fips to fips check for upgrades * enhancement(4811): update fips check * enhancment(4811): refactored upgrade version checks * enhancement(4811): added tests for checkUpgrade * enhancement(4811): added fips test case for sameReleaseVersion function * enhancement(4811): added changelog * enhancement(4811): remove unnecessary comment * enhancement(4811): remove comment --------- Co-authored-by: Pierre HILBERT <pierre.hilbert@elastic.co> (cherry picked from commit 5b45c94)
* Fix typo in error message * enhancement(4811): added fips in the package manifest * enhancement(4811): prelimenary commit to prepare for implementation * enhancement(4811): added fips to fips check for upgrades * enhancement(4811): update fips check * enhancment(4811): refactored upgrade version checks * enhancement(4811): added tests for checkUpgrade * enhancement(4811): added fips test case for sameReleaseVersion function * enhancement(4811): added changelog * enhancement(4811): remove unnecessary comment * enhancement(4811): remove comment --------- Co-authored-by: Pierre HILBERT <pierre.hilbert@elastic.co> (cherry picked from commit 5b45c94)
| var ( | ||
| ErrWatcherNotStarted = errors.New("watcher did not start in time") | ||
| ErrUpgradeSameVersion = errors.New("upgrade did not occur because it is the same version") | ||
| ErrFipsNotUpgradedToFips = errors.New("cannot upgrade from a fips compliant agent to a non-compliant one") |
There was a problem hiding this comment.
The wording of the error should cover both cases:
(1) fips -> non-fips
(2) non-fips -> fips
In checkUpgrade it actually fails for both cases, but the error that will be logged would be confusing if someone tries to upgrade from non-fips to fips.
Also, we should be careful with wording and avoid fips compliant. I would suggest using a more neutral language, something along the lines of cannot switch fips mode when upgrading.
There was a problem hiding this comment.
I'll create a PR to update the wording here
* Fix typo in error message * enhancement(4811): added fips in the package manifest * enhancement(4811): prelimenary commit to prepare for implementation * enhancement(4811): added fips to fips check for upgrades * enhancement(4811): update fips check * enhancment(4811): refactored upgrade version checks * enhancement(4811): added tests for checkUpgrade * enhancement(4811): added fips test case for sameReleaseVersion function * enhancement(4811): added changelog * enhancement(4811): remove unnecessary comment * enhancement(4811): remove comment --------- Co-authored-by: Pierre HILBERT <pierre.hilbert@elastic.co> (cherry picked from commit 5b45c94)
* Fix typo in error message * enhancement(4811): added fips in the package manifest * enhancement(4811): prelimenary commit to prepare for implementation * enhancement(4811): added fips to fips check for upgrades * enhancement(4811): update fips check * enhancment(4811): refactored upgrade version checks * enhancement(4811): added tests for checkUpgrade * enhancement(4811): added fips test case for sameReleaseVersion function * enhancement(4811): added changelog * enhancement(4811): remove unnecessary comment * enhancement(4811): remove comment --------- Co-authored-by: Pierre HILBERT <pierre.hilbert@elastic.co> (cherry picked from commit 5b45c94)
* Fix typo in error message * enhancement(4811): added fips in the package manifest * enhancement(4811): prelimenary commit to prepare for implementation * enhancement(4811): added fips to fips check for upgrades * enhancement(4811): update fips check * enhancment(4811): refactored upgrade version checks * enhancement(4811): added tests for checkUpgrade * enhancement(4811): added fips test case for sameReleaseVersion function * enhancement(4811): added changelog * enhancement(4811): remove unnecessary comment * enhancement(4811): remove comment --------- Co-authored-by: Pierre HILBERT <pierre.hilbert@elastic.co> (cherry picked from commit 5b45c94) Co-authored-by: Kaan Yalti <kaan.yalti@elastic.co>
* Fix typo in error message * enhancement(4811): added fips in the package manifest * enhancement(4811): prelimenary commit to prepare for implementation * enhancement(4811): added fips to fips check for upgrades * enhancement(4811): update fips check * enhancment(4811): refactored upgrade version checks * enhancement(4811): added tests for checkUpgrade * enhancement(4811): added fips test case for sameReleaseVersion function * enhancement(4811): added changelog * enhancement(4811): remove unnecessary comment * enhancement(4811): remove comment --------- Co-authored-by: Pierre HILBERT <pierre.hilbert@elastic.co> (cherry picked from commit 5b45c94) Co-authored-by: Kaan Yalti <kaan.yalti@elastic.co>




What does this PR do?
Updates the upgrade process to prevent fips to non-fips upgrades
Why is it important?
upgrading to non-fips agent is not going to be supported
Checklist
[ ] I have made corresponding changes to the documentation[ ] I have made corresponding change to the default configuration files./changelog/fragmentsusing the changelog tool[ ] I have added an integration test or an E2E testHow to test this PR locally
Related issues