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

host-ctr: upgrades Go dependencies #3369

Merged
merged 1 commit into from
Aug 29, 2023
Merged

Conversation

yeazelm
Copy link
Contributor

@yeazelm yeazelm commented Aug 28, 2023

Issue number: #3172

Closes #

Description of changes:
Upgrading Go Dependencies host-ctr with containerd going to 1.6.23 which will align with #3362

  • Upgrades containerd code dependencies to v1.6.23
  • Upgrades opencontainers/runtime-spec to one used by containerd v1.6.23

Testing done:
Launched instance and it connects without issue

bash-5.1# systemctl status host-containers@admin
● [email protected] - Host container: admin
     Loaded: loaded (/x86_64-bottlerocket-linux-gnu/sys-root/usr/lib/systemd/system/[email protected]; enabled; preset: enabled)
     Active: active (running) since Mon 2023-08-28 15:17:57 UTC; 5min ago
   Main PID: 1145 (host-ctr)
      Tasks: 9 (limit: 9335)
     Memory: 40.8M
        CPU: 273ms
     CGroup: /system.slice/system-host\x2dcontainers.slice/[email protected]
             └─1145 /usr/bin/host-ctr run --container-id=admin --source=328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.10.2 --superpowered=true --registry-config=/etc/host-containers/host-ctr.toml

Aug 28 15:18:00 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1145]: time="2023-08-28T15:18:00Z" level=info msg="pulled image successfully" img="ecr.aws/arn:aws:ecr:us-west-2:328549459982:repository/bottlerocket-admin:v0.10.2"
Aug 28 15:18:00 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1145]: time="2023-08-28T15:18:00Z" level=info msg="unpacking image..." img="ecr.aws/arn:aws:ecr:us-west-2:328549459982:repository/bottlerocket-admin:v0.10.2"
Aug 28 15:18:08 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1145]: time="2023-08-28T15:18:08Z" level=info msg="tagging image" img="328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.10.2"
Aug 28 15:18:08 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1145]: time="2023-08-28T15:18:08Z" level=info msg="Container does not exist, proceeding to create it" ctr-id=admin
Aug 28 15:18:08 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1145]: time="2023-08-28T15:18:08Z" level=info msg="container task does not exist, proceeding to create it" container-id=admin
Aug 28 15:18:08 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1145]: time="2023-08-28T15:18:08Z" level=info msg="successfully started container task"
Aug 28 15:18:08 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1145]: Created symlink /root/.config/systemd/user/admin.target.wants/[email protected], pointing to /etc/systemd/user/[email protected].
Aug 28 15:18:08 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1145]: Created symlink /root/.config/systemd/user/admin.target.wants/[email protected], pointing to /etc/systemd/user/[email protected].
Aug 28 15:18:08 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1145]: Created symlink /root/.config/systemd/user/admin.target.wants/sshd.service, pointing to /etc/systemd/user/sshd.service.
Aug 28 15:18:08 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1145]: Startup finished in 14ms.
bash-5.1# systemctl status host-containers@control
● [email protected] - Host container: control
     Loaded: loaded (/x86_64-bottlerocket-linux-gnu/sys-root/usr/lib/systemd/system/[email protected]; enabled; preset: enabled)
     Active: active (running) since Mon 2023-08-28 15:17:57 UTC; 6min ago
   Main PID: 1146 (host-ctr)
      Tasks: 9 (limit: 9335)
     Memory: 24.5M
        CPU: 513ms
     CGroup: /system.slice/system-host\x2dcontainers.slice/[email protected]
             └─1146 /usr/bin/host-ctr run --container-id=control --source=328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-control:v0.7.3 --superpowered=false --registry-config=/etc/host-containers/host-ctr.toml

Aug 28 15:18:09 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1146]: 2023-08-28 15:18:09 INFO [Registrar] Starting registrar module
Aug 28 15:18:09 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1146]: 2023-08-28 15:18:09 INFO [EC2Identity] no registration info found for ec2 instance, attempting registration
Aug 28 15:18:09 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1146]: 2023-08-28 15:18:09 INFO [EC2Identity] EC2 registration was successful.
Aug 28 15:18:09 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1146]: 2023-08-28 15:18:09 INFO [CredentialRefresher] credentialRefresher has started
Aug 28 15:18:09 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1146]: 2023-08-28 15:18:09 INFO [CredentialRefresher] Starting credentials refresher loop
Aug 28 15:18:09 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1146]: 2023-08-28 15:18:09 INFO EC2RoleProvider Successfully connected with instance profile role credentials
Aug 28 15:18:09 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1146]: 2023-08-28 15:18:09 INFO [CredentialRefresher] Next credential rotation will be in 30.699995224283334 minutes
Aug 28 15:18:10 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1146]: 2023-08-28 15:18:10 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] [WorkerProvider] Worker ssm-agent-worker is not running, starting worker process
Aug 28 15:18:10 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1146]: 2023-08-28 15:18:10 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] [WorkerProvider] Worker ssm-agent-worker (pid:15) started
Aug 28 15:18:10 ip-192-168-187-145.us-west-2.compute.internal host-ctr[1146]: 2023-08-28 15:18:10 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] Monitor long running worker health every 60 seconds

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.

- Upgrades containerd code dependencies to v1.6.23
- Upgrades opencontainers/runtime-spec to one used by containerd v1.6.23

Signed-off-by: Matthew Yeazel <[email protected]>
@stmcginnis
Copy link
Contributor

Something seems off about that go.sum diff, but if Go can now clean up dependencies better, or if updated packages got rid of old duplicates, that is awesome. Love any time we see the removed line count greater than the added line count. Testing should confirm if everything is good.

@yeazelm yeazelm marked this pull request as ready for review August 28, 2023 20:19
@yeazelm
Copy link
Contributor Author

yeazelm commented Aug 29, 2023

Something seems off about that go.sum diff, but if Go can now clean up dependencies better, or if updated packages got rid of old duplicates, that is awesome. Love any time we see the removed line count greater than the added line count. Testing should confirm if everything is good.

I ran go mod tidy and I wonder if folks hadn't done that in a while, many of these seem to be quite old dependencies. Or maybe Go is just better at purging the only ones. Everything seems to work great, so I think its ending in the right place.

Copy link
Contributor

@stmcginnis stmcginnis left a comment

Choose a reason for hiding this comment

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

Functionality looks good, and happy to see the clean up in go.sum.

@yeazelm yeazelm merged commit d6b5757 into bottlerocket-os:develop Aug 29, 2023
42 checks passed
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.

3 participants