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

CASMINST-4471 adjust init script for podman load behavior #14

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

jacobsalmela
Copy link
Contributor

@jacobsalmela jacobsalmela commented Apr 25, 2022

podman load no longer allows the tagging of the image during a load op: containers/podman#7387

podman load no longer accepts a name and tag. Instead you must load the image, and then run a separate podman tag command.

I also check the labels of the image to ensure a match is found and the correct image is tagged:

BASECAMP_IMAGE_ID=$(podman images --noheading --format "{{.Id}}" --filter label="org.label-schema.name=$BASECAMP_CONTAINER_NAME")

KillMode=none was changed to KillMode=control-group to prevent the errors seen here: https://www.suse.com/support/kb/doc/?id=000020394

Signed-off-by: Jacob Salmela [email protected]

Summary and Scope

Issue Type
  • Bugfix Pull Request

Tested on redbull:

redbull-ncn-m001-pit:~ # systemctl start basecamp
redbull-ncn-m001-pit:~ # echo $?
0
redbull-ncn-m001-pit:~ # systemctl status basecamp
● basecamp.service - Basecamp cloud-init server
     Loaded: loaded (/usr/lib/systemd/system/basecamp.service; disabled; vendor preset: disabled)
     Active: active (running) since Thu 2022-04-28 12:23:18 UTC; 3s ago
       Docs: https://github.com/Cray-HPE/metal-basecamp/blob/main/README.md
    Process: 34061 ExecStartPre=/usr/sbin/basecamp-init.sh /run/basecamp.service-pid /run/basecamp.service-cid basecamp (code=exited, status=0>
    Process: 34126 ExecStart=/usr/bin/podman start basecamp (code=exited, status=0/SUCCESS)
   Main PID: 34184 (conmon)
      Tasks: 2
     CGroup: /system.slice/basecamp.service
             └─34184 /usr/bin/conmon --api-version 1 -c d818ee9060c54e69ce8f3bd8388ccd6c9c6190ce2a54a5c349c84d7e90c949cb -u d818ee9060c54e69ce>

Apr 28 12:23:18 redbull-ncn-m001-pit basecamp-init.sh[34075]: ++ cut -f 1 -d :
Apr 28 12:23:18 redbull-ncn-m001-pit basecamp-init.sh[34061]: + mkdir -pv /var/www/ephemeral/static
Apr 28 12:23:18 redbull-ncn-m001-pit basecamp-init.sh[34061]: + podman inspect basecamp
Apr 28 12:23:18 redbull-ncn-m001-pit podman[34126]: time="2022-04-28T12:23:18Z" level=warning msg="Path \"/etc/SUSEConnect\" from \"/etc/conta>
Apr 28 12:23:18 redbull-ncn-m001-pit podman[34126]: time="2022-04-28T12:23:18Z" level=warning msg="Path \"/etc/zypp/credentials.d/SCCcredentia>
Apr 28 12:23:18 redbull-ncn-m001-pit podman[34126]: 2022-04-28 12:23:18.727161835 +0000 UTC m=+0.249755938 container init d818ee9060c54e69ce8f>
Apr 28 12:23:18 redbull-ncn-m001-pit podman[34126]: 2022-04-28 12:23:18.748682564 +0000 UTC m=+0.271276670 container start d818ee9060c54e69ce8>
Apr 28 12:23:18 redbull-ncn-m001-pit podman[34126]: basecamp
Apr 28 12:23:18 redbull-ncn-m001-pit conmon[34184]: 2022/04/28 12:23:18 Severing static files located here:  ./static/
Apr 28 12:23:18 redbull-ncn-m001-pit systemd[1]: Started Basecamp cloud-init server.

Prerequisites

  • I have included documentation in my PR (or it is not required)
  • I tested this on internal system (x) (if yes, please include results or a description of the test)

Idempotency

N/A

Risks and Mitigations

Low

podman load no longer allows the tagging of the image during a load op: containers/podman#7387

to adjust the script for this, I filter the images to match metal-basecamp, get
the image id, and then tag it in a separate command after the image has loaded

Signed-off-by: Jacob Salmela <[email protected]>

prevent error
```
Apr 25 20:58:20 redbull-ncn-m001-pit systemd[1]: /usr/lib/systemd/system/basecamp.service:14: Unit configured to use KillMode=none. Support for KillMode=none is deprecated and will be eventually removed in future SLE versions. Please see SUSE TID https://www.suse.com/support/kb/doc/?id=000020394 for more details.
```
by setting the killmode to control-group

Signed-off-by: Jacob Salmela <[email protected]>
@jacobsalmela jacobsalmela marked this pull request as ready for review April 28, 2022 14:11
@jacobsalmela jacobsalmela merged commit 08bc700 into main Apr 28, 2022
@jacobsalmela jacobsalmela deleted the CASMINST-4471-realz branch April 28, 2022 15:11
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