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

Fixes for Flatcar cloud init #272

Merged
merged 4 commits into from
Apr 4, 2023

Conversation

LittleFox94
Copy link
Contributor

@LittleFox94 LittleFox94 commented Mar 10, 2023

What this PR does / why we need it:

This adds support for OperatingSystemProfileSpec.Units in cloud-init and fixes the default OSP for flatcar with cloud-init by starting the setup by using a unit instead of generic file and re-adding the configuration in /proc removed in 01829fc.

What type of PR is this?

/kind bug

Special notes for your reviewer:

I think no changelog is required, but not sure hence leaving that empty instead of writing NONE.

Does this PR introduce a user-facing change? Then add your Release Note here:

NONE

Documentation:

NONE

@kubermatic-bot kubermatic-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. sig/osm Denotes a PR or issue as being assigned to SIG OSM. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 10, 2023
@kubermatic-bot
Copy link
Contributor

Hi @LittleFox94. Thanks for your PR.

I'm waiting for a kubermatic member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kubermatic-bot kubermatic-bot added docs/none Denotes a PR that doesn't need documentation (changes). and removed do-not-merge/docs-needed Indicates that a PR should not merge because it's missing one of the documentation labels. labels Mar 10, 2023
@LittleFox94 LittleFox94 changed the title Flatcar cloud init Fixes for Flatcar cloud init Mar 10, 2023
@ahmedwaleedmalik
Copy link
Member

So the runcmd section was getting ignored? That's strange :/

@LittleFox94
Copy link
Contributor Author

LittleFox94 commented Mar 10, 2023

So the runcmd section was getting ignored? That's strange :/

yep, coreos/flatcar cloud-config does not support it: https://github.com/flatcar/coreos-cloudinit/blob/flatcar-master/Documentation/cloud-config.md

@kubermatic-bot kubermatic-bot added dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. and removed dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Mar 10, 2023
Signed-off-by: Mara Sophie Grosch <mgrosch@anexia-it.com>
Signed-off-by: Mara Sophie Grosch <mgrosch@anexia-it.com>
This time done in ExecStartPre of kubelet service.

Kubelet will not start without overcommit_memory enabled.

Signed-off-by: Mara Sophie Grosch <mgrosch@anexia-it.com>
Signed-off-by: Mara Sophie Grosch <mgrosch@anexia-it.com>
@kubermatic-bot kubermatic-bot added dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. and removed dco-signoff: no Denotes that at least one commit in the pull request doesn't have a valid DCO signoff message. labels Mar 10, 2023
@LittleFox94
Copy link
Contributor Author

Only thing I'm not sure about rn is how compatible the changed cloud-init template is with other non-coreos/flatcar operating systems, they probably don't have support for coreos.units .. if they are ok with this key being present, we could probably just add+run the setup.service unit via both file+runcmd and coreos.units

what do you think?

@ahmedwaleedmalik
Copy link
Member

@LittleFox94 Let me take a look at this PR today. My initial idea was to introduce a separate Provisioning Utility for this case since units are only supported in coreos-cloud-init not the standard one.

@ahmedwaleedmalik ahmedwaleedmalik self-assigned this Mar 27, 2023
@ahmedwaleedmalik
Copy link
Member

/ok-to-test

@kubermatic-bot kubermatic-bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Mar 27, 2023
@kubermatic-bot kubermatic-bot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 27, 2023
@ahmedwaleedmalik
Copy link
Member

@LittleFox94 we can proceed with this PR. We'll discuss internally how we want to treat units in cloud-init but that shouldn't block your PR.

@LittleFox94
Copy link
Contributor Author

@ahmedwaleedmalik sorry for the delay, what do you need from me then - only the Draft status to be removed or anything else?

@ahmedwaleedmalik ahmedwaleedmalik marked this pull request as ready for review April 4, 2023 14:23
@kubermatic-bot kubermatic-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 4, 2023
@ahmedwaleedmalik
Copy link
Member

ahmedwaleedmalik commented Apr 4, 2023

@ahmedwaleedmalik sorry for the delay, what do you need from me then - only the Draft status to be removed or anything else?

No worries, I've removed the draft status. This looks good to be merged now.

@kubermatic-bot kubermatic-bot added release-note-none Denotes a PR that doesn't merit a release note. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 4, 2023
Copy link
Member

@ahmedwaleedmalik ahmedwaleedmalik left a comment

Choose a reason for hiding this comment

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

/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 4, 2023
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 192c9b8357087b003cbbcec7ff038b2023d87ecd

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahmedwaleedmalik, LittleFox94

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 4, 2023
@kubermatic-bot kubermatic-bot merged commit 7299243 into kubermatic:main Apr 4, 2023
@LittleFox94
Copy link
Contributor Author

many thanks :)

@LittleFox94 LittleFox94 deleted the flatcar-cloud-init branch April 4, 2023 14:35
LittleFox94 added a commit to anexia/operating-system-manager that referenced this pull request Apr 5, 2023
The output redirection added in kubermatic#272 is not interpreted by systemd,
which instead just passes it as arguments to echo.

Signed-off-by: Mara Sophie Grosch <mgrosch@anexia-it.com>
kubermatic-bot pushed a commit that referenced this pull request Apr 5, 2023
The output redirection added in #272 is not interpreted by systemd,
which instead just passes it as arguments to echo.

Signed-off-by: Mara Sophie Grosch <mgrosch@anexia-it.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. docs/none Denotes a PR that doesn't need documentation (changes). kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. sig/osm Denotes a PR or issue as being assigned to SIG OSM. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants