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

Update GCP agents to current Go versions #1826

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Update GCP agents to current Go versions #1826

wants to merge 14 commits into from

Conversation

jepio
Copy link
Member

@jepio jepio commented Apr 2, 2024

Update GCP agents to current Go versions

  • Import ebuilds from COS (Container Optimized OS)
  • Patch for compatibility with our eclass
  • Replace oem-gce contents
  • Remove unused ebuilds

TODO:

  • Quality Assurance (ask a GCP user to test the image)
  • Check if we need to introduce an enable-os-login service that users can mask
  • Check if we need /var/ -> /var/lib patch (we do), and figure out if we want to patch it use a symlink.

How to use

[ describe what reviewers need to do in order to validate this PR ]

Testing done

[Describe the testing you have done before submitting this PR. Please include both the commands you issued as well as the output you got.]

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

jepio added 14 commits April 2, 2024 12:33
Import google-guest-agent, google-guest-configs, google-osconfig-agent
and oslogin packages from COS. These are sourced from the Git repo:
https://cos.googlesource.com/cos/overlays/board-overlays, commit
8a6d617d85df03028c9c6d51a1bb3a3bc2eb0933, folder project-lakitu.

Signed-off-by: Jeremi Piotrowski <[email protected]>
eutils is not supported by the latest EAPIs, but COS hasn't noticed. We
also need CC/CXX exported to use the correct tools.

Signed-off-by: Jeremi Piotrowski <[email protected]>
It is no longer needed in the image, oslogin can be included in the
GCP sysext. Remove the unused ebuild as well.

Signed-off-by: Jeremi Piotrowski <[email protected]>
Signed-off-by: Jeremi Piotrowski <[email protected]>
The Go-based agents imported from COS are up-to-date and apply all the
required configuration automatically.

Signed-off-by: Jeremi Piotrowski <[email protected]>
Nothing depends on it any longer.

Signed-off-by: Jeremi Piotrowski <[email protected]>
So that they can be included in a sysext.

Signed-off-by: Jeremi Piotrowski <[email protected]>
Google-compute-engine used to depend on boto, but it has been booted
from our tree so we can remove boto as well.

Signed-off-by: Jeremi Piotrowski <[email protected]>
We now rely on GCP agents taking care of instance configuration.

Signed-off-by: Jeremi Piotrowski <[email protected]>
@pothos
Copy link
Member

pothos commented Apr 2, 2024

Quality Assurance (ask a GCP user to test the image)

I think kola spawn could be of use for that when started the same way Jenkins starts kola run

Copy link

github-actions bot commented Apr 2, 2024

@pothos
Copy link
Member

pothos commented Apr 2, 2024

I think we need to add an ExecStartPre to one of the services to clean up state created from the old setup-oem.service.
It had this:

ExecStart=-/usr/bin/ln --symbolic --force /usr/share/gce/hosts /etc/hosts
ExecStart=-/usr/bin/ln --symbolic /usr/share/gce/google-cloud-sdk.sh /etc/profile.d/google-cloud-sdk.sh

Maybe remove /etc/profile.d/google-cloud-sdk.sh but what about /etc/hosts? Would the new software set it up or doesn't it need a special setup anymore? If it should be reverted to Flatcar's defaults then the removal would have to be done in the upperdir but since this is not recommended during use, one can rather rely on the duplicate cleanup logic in the initrd and reset the file by copying from /usr/share/flatcar/etc/hosts so that after a reboot this manual upcopy should be gone.

@jepio
Copy link
Member Author

jepio commented Apr 2, 2024

Quality Assurance (ask a GCP user to test the image)

I think kola spawn could be of use for that when started the same way Jenkins starts kola run

I did try kola spawn, and tested the oslogin functionality but I'm not confident that i managed to cover everything. I'm not super familiar with GCP.

@jepio
Copy link
Member Author

jepio commented Apr 2, 2024

I think we need to add an ExecStartPre to one of the services to clean up state created from the old setup-oem.service. It had this:

ExecStart=-/usr/bin/ln --symbolic --force /usr/share/gce/hosts /etc/hosts
ExecStart=-/usr/bin/ln --symbolic /usr/share/gce/google-cloud-sdk.sh /etc/profile.d/google-cloud-sdk.sh

Maybe remove /etc/profile.d/google-cloud-sdk.sh but what about /etc/hosts? Would the new software set it up or doesn't it need a special setup anymore? If it should be reverted to Flatcar's defaults then the removal would have to be done in the upperdir but since this is not recommended during use, one can rather rely on the duplicate cleanup logic in the initrd and reset the file by copying from /usr/share/flatcar/etc/hosts so that after a reboot this manual upcopy should be gone.

Yes, we need to think a bit more about what happens when upgrading.

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.

2 participants