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

migrations: adds necessary migrations for settings.network #1258

Merged
merged 1 commit into from
Jan 7, 2021

Conversation

etungsten
Copy link
Contributor

@etungsten etungsten commented Jan 5, 2021

Issue number:
N/A

Description of changes:

This adds the migration related to #1204 and #1231.

Author: Erikson Tung <etung@amazon.com>
Date:   Tue Jan 5 17:45:43 2021 -0800

    migrations: adds necessary migrations for `settings.network`
    
    Adds new migrations for migrating new settings and affected service
    settings. We also added new service settings for docker and
    host-containerd to incorporate restart commands for those services.

Testing done:

Built a custom TUF repository with a v1.0.5 aws-k8s-1.18 image.
Launched a v1.0.4 aws-k8s-1.18 host with a custom root.json and upgraded it to v1.0.5.
The instance came up fine and is able to run pods. Checked the settings and they got migrated as expected.
Rolled back the instance to v1.0.4, the host came back fine and is able to run pods. Backwards migration run successfully, all settings expected to be migrated got migrated.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@etungsten etungsten requested review from tjkirch and zmrow January 5, 2021 03:20
Copy link
Contributor

@tjkirch tjkirch left a comment

Choose a reason for hiding this comment

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

This looks fine, but won't we also need migrations to change the configuration-files lists for containerd, host-containerd, docker, and kubernetes to add proxy-env? I think you can do it with ReplaceListMigration, similar to the sysctl-subcommand migration.

[edit] I missed #1231 - also need to remove the restart commands for containerd and kubernetes, and the whole services.docker and services.host-containerd trees, I think.

Would you please test on an instance with a real repo? It's easier to do now with pubsys.

@etungsten etungsten marked this pull request as draft January 5, 2021 19:43
@etungsten
Copy link
Contributor Author

New migrations to address #1258 (review) are pending changes in #1262 to be merged.

@etungsten etungsten force-pushed the migrate-network-proxy branch from 1b42c6d to 3bcca14 Compare January 6, 2021 22:31
@etungsten
Copy link
Contributor Author

Push above adds two new migrations for migrating the new restart-commands and configuration-file settings.

Updated PR description with new testing.

@etungsten etungsten changed the title Add migration for settings.network migrations: adds necessary migrations for settings.network Jan 6, 2021
@etungsten etungsten marked this pull request as ready for review January 6, 2021 22:35
Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

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

🦺

@gregdek gregdek added the status/needs-triage Pending triage or re-evaluation label Jan 7, 2021
@tjkirch tjkirch removed the status/needs-triage Pending triage or re-evaluation label Jan 7, 2021
Release.toml Outdated Show resolved Hide resolved
Adds new migrations for migrating new settings and affected service
settings. We also added new service settings for docker and
host-containerd to incorporate restart commands for those services.
@etungsten etungsten force-pushed the migrate-network-proxy branch from 3bcca14 to 7a10053 Compare January 7, 2021 20:56
@etungsten
Copy link
Contributor Author

Push above changes the name of the migrations to address #1258 (comment)

@etungsten etungsten requested a review from tjkirch January 7, 2021 21:21
@etungsten etungsten merged commit bff72eb into bottlerocket-os:develop Jan 7, 2021
@etungsten etungsten deleted the migrate-network-proxy branch January 7, 2021 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants