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: upgrade to go 1.19 and bump dependencies #2450

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

jpmcb
Copy link
Contributor

@jpmcb jpmcb commented Sep 23, 2022

Issue number:

Related: #2420

Description of changes:

Since go 1.19 was included in the latest version of the sdk, this patch bumps host-ctr to use the go 1.19 build directive. This can be done out of band from updating the actual sdk in use in bottlerocket itself since older versions of Go can still build with newer build directives (as long as no breaking changes exist between those versions):

cd sources/host-ctr & go1.18.6 build

Testing done:

Built an ECS ami and deployed to my ECS cluster. Able to disable and enable host containers on the host and they look to be running:

bash-5.1# systemctl status host-containers@admin
● [email protected] - Host container: admin
     Loaded: loaded (/aarch64-bottlerocket-linux-gnu/sys-root/usr/lib/systemd/system/[email protected]; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-09-23 21:25:27 UTC; 1min 53s ago
   Main PID: 554 (host-ctr)
      Tasks: 10 (limit: 9236)
     Memory: 37.8M
     CGroup: /system.slice/system-host\x2dcontainers.slice/[email protected]
             └─554 /usr/bin/host-ctr run --container-id=admin --source=328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.9.0 --superpowered=true --registry-config=/etc/host-containers/host-ctr.toml

Sep 23 21:25:30 ip-172-31-42-95.us-west-2.compute.internal host-ctr[554]: time="2022-09-23T21:25:30Z" level=info msg="pulled image successfully" img="ecr.aws/arn:aws:ecr:us-west-2:328549459982:repository/bottlerocket-admin:v0.9.0"
Sep 23 21:25:30 ip-172-31-42-95.us-west-2.compute.internal host-ctr[554]: time="2022-09-23T21:25:30Z" level=info msg="unpacking image..." img="ecr.aws/arn:aws:ecr:us-west-2:328549459982:repository/bottlerocket-admin:v0.9.0"
Sep 23 21:25:35 ip-172-31-42-95.us-west-2.compute.internal host-ctr[554]: time="2022-09-23T21:25:35Z" level=info msg="tagging image" img="328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-admin:v0.9.0"
Sep 23 21:25:35 ip-172-31-42-95.us-west-2.compute.internal host-ctr[554]: time="2022-09-23T21:25:35Z" level=info msg="Container does not exist, proceeding to create it" ctr-id=admin
Sep 23 21:25:35 ip-172-31-42-95.us-west-2.compute.internal host-ctr[554]: time="2022-09-23T21:25:35Z" level=info msg="container task does not exist, proceeding to create it" container-id=admin
Sep 23 21:25:35 ip-172-31-42-95.us-west-2.compute.internal host-ctr[554]: time="2022-09-23T21:25:35Z" level=info msg="successfully started container task"
Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[554]: Created symlink /root/.config/systemd/user/admin.target.wants/[email protected], pointing to /etc/systemd/user/[email protected].
Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[554]: Created symlink /root/.config/systemd/user/admin.target.wants/[email protected], pointing to /etc/systemd/user/[email protected].
Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[554]: Created symlink /root/.config/systemd/user/admin.target.wants/sshd.service, pointing to /etc/systemd/user/sshd.service.
Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[554]: Startup finished in 22ms.
bash-5.1# systemctl status host-containers@control
● [email protected] - Host container: control
     Loaded: loaded (/aarch64-bottlerocket-linux-gnu/sys-root/usr/lib/systemd/system/[email protected]; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-09-23 21:25:27 UTC; 2min 0s ago
   Main PID: 559 (host-ctr)
      Tasks: 9 (limit: 9236)
     Memory: 39.1M
     CGroup: /system.slice/system-host\x2dcontainers.slice/[email protected]
             └─559 /usr/bin/host-ctr run --container-id=control --source=328549459982.dkr.ecr.us-west-2.amazonaws.com/bottlerocket-control:v0.6.1 --superpowered=false --registry-config=/etc/host-containers/host-ctr.toml

Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[559]: 2022-09-23 21:25:35 INFO Agent will take identity from EC2
Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[559]: 2022-09-23 21:25:35 INFO [amazon-ssm-agent] using named pipe channel for IPC
Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[559]: 2022-09-23 21:25:35 INFO [amazon-ssm-agent] using named pipe channel for IPC
Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[559]: 2022-09-23 21:25:35 INFO [amazon-ssm-agent] using named pipe channel for IPC
Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[559]: 2022-09-23 21:25:35 INFO [amazon-ssm-agent] amazon-ssm-agent - v3.1.1476.0
Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[559]: 2022-09-23 21:25:35 INFO [amazon-ssm-agent] OS: linux, Arch: arm64
Sep 23 21:25:36 ip-172-31-42-95.us-west-2.compute.internal host-ctr[559]: 2022-09-23 21:25:35 INFO [CredentialRefresher] Identity does not require credential refresher
Sep 23 21:25:37 ip-172-31-42-95.us-west-2.compute.internal host-ctr[559]: 2022-09-23 21:25:36 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] [WorkerProvider] Worker ssm-agent-worker is not running, starting worker process
Sep 23 21:25:37 ip-172-31-42-95.us-west-2.compute.internal host-ctr[559]: 2022-09-23 21:25:36 INFO [amazon-ssm-agent] [LongRunningWorkerContainer] [WorkerProvider] Worker ssm-agent-worker (pid:15) started
Sep 23 21:25:37 ip-172-31-42-95.us-west-2.compute.internal host-ctr[559]: 2022-09-23 21:25:36 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.

@jpmcb jpmcb merged commit 8d73105 into bottlerocket-os:develop Sep 26, 2022
@jpmcb jpmcb deleted the host-ctr-go-1.19 branch September 26, 2022 15:31
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