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

CI: Run Nvidia workflow on UC22 #217

Merged
merged 11 commits into from
Jan 25, 2025
Merged

CI: Run Nvidia workflow on UC22 #217

merged 11 commits into from
Jan 25, 2025

Conversation

locnnil
Copy link
Contributor

@locnnil locnnil commented Jan 20, 2025

Currently, the OS used on the Nvidia tests is hardcoded:

However, we already have mechanisms in place to support testing on UC22 as well:

setup_core() {
sudo snap install nvidia-core22
sudo snap install nvidia-assemble --channel 22/stable
}
setup() {
. /etc/os-release
install_docker
if [[ $ID == "ubuntu" ]]; then
setup_classic
elif [[ $ID == "ubuntu-core" ]]; then
setup_core

This PR updates the workflow to include tests for UC22 alongside the existing tests for Noble.

[skip ci]

@locnnil locnnil added the CI Continuous integration label Jan 20, 2025
@locnnil locnnil force-pushed the fix-hardcoded-os branch 2 times, most recently from d853657 to 2ac873f Compare January 20, 2025 16:46
@locnnil locnnil requested review from farshidtz and removed request for farshidtz January 20, 2025 20:50
.github/workflows/nvidia-test.yml Outdated Show resolved Hide resolved
.github/workflows/nvidia-test.yml Outdated Show resolved Hide resolved
.github/workflows/testflinger/nvidia-job.yaml Outdated Show resolved Hide resolved
.github/workflows/nvidia-test.yml Outdated Show resolved Hide resolved
[skip ci]

Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
@farshidtz
Copy link
Member

I've done some manual testing and there are a few other issues causing failure on Ubuntu Core 22, such as:

  • kernel and core snaps being refreshed and device rebooted after first boot, during the test setup
  • docker daemon not ready right after reboot
  • docker run command ran interactively

@locnnil I will commit fixes directly to your branch.

@farshidtz farshidtz marked this pull request as draft January 24, 2025 16:55
@farshidtz farshidtz force-pushed the fix-hardcoded-os branch 2 times, most recently from a23ebf0 to f9cdb77 Compare January 24, 2025 17:12
* Wait for snap changes
* Wait for docker daemon after reboot
* Run docker commands with sudo
* Docker run in non-interactive mode
@farshidtz
Copy link
Member

farshidtz commented Jan 24, 2025

I still get this error randomely, on every 2-3 runs:

+ sudo snap install docker --channel=latest/edge
error: cannot perform the following tasks:
- Run install hook of "docker" snap if present (run hook "install": cannot perform operation: mount -t tmpfs /tmp/snap.rootfs_8C1znV: Permission denied)

Trying directly on the failing device gives the same result:

$ snap changes
ID   Status  Spawn               Ready               Summary
1    Done    today at 15:51 UTC  today at 15:51 UTC  Initialize system state
2    Done    today at 15:51 UTC  today at 15:51 UTC  Initialize device
3    Done    today at 15:51 UTC  today at 15:54 UTC  Auto-refresh snaps "core22", "pc-kernel"
4    Done    today at 15:54 UTC  today at 15:54 UTC  Hold auto-refreshes for all snaps
5    Error   today at 15:54 UTC  today at 15:55 UTC  Install "docker" snap from "latest/edge" channel

$ snap change 5
Status  Spawn               Ready               Summary
Done    today at 15:54 UTC  today at 15:55 UTC  Ensure prerequisites for "docker" are available
Undone  today at 15:54 UTC  today at 15:55 UTC  Download snap "docker" (3051) from channel "latest/edge"
Done    today at 15:54 UTC  today at 15:55 UTC  Fetch and check assertions for snap "docker" (3051)
Undone  today at 15:54 UTC  today at 15:55 UTC  Mount snap "docker" (3051)
Undone  today at 15:54 UTC  today at 15:55 UTC  Copy snap "docker" data
Undone  today at 15:54 UTC  today at 15:55 UTC  Setup snap "docker" (3051) security profiles
Undone  today at 15:54 UTC  today at 15:55 UTC  Make snap "docker" (3051) available to the system
Undone  today at 15:54 UTC  today at 15:55 UTC  Automatically connect eligible plugs and slots of snap "docker"
Undone  today at 15:54 UTC  today at 15:55 UTC  Set automatic aliases for snap "docker"
Undone  today at 15:54 UTC  today at 15:55 UTC  Setup snap "docker" aliases
Error   today at 15:54 UTC  today at 15:55 UTC  Run install hook of "docker" snap if present
Hold    today at 15:54 UTC  today at 15:55 UTC  Start snap "docker" (3051) services
Hold    today at 15:54 UTC  today at 15:55 UTC  Run configure hook of "docker" snap if present
Hold    today at 15:54 UTC  today at 15:55 UTC  Run health check of "docker" snap
Undone  today at 15:55 UTC  today at 15:55 UTC  Connect docker:network to snapd:network
Undone  today at 15:55 UTC  today at 15:55 UTC  Connect docker:support to snapd:docker-support
Undone  today at 15:55 UTC  today at 15:55 UTC  Connect docker:firewall-control to snapd:firewall-control
Undone  today at 15:55 UTC  today at 15:55 UTC  Connect docker:network-bind to snapd:network-bind
Undone  today at 15:55 UTC  today at 15:55 UTC  Connect docker:opengl to snapd:opengl
Undone  today at 15:55 UTC  today at 15:55 UTC  Connect docker:network-control to snapd:network-control
Undone  today at 15:55 UTC  today at 15:55 UTC  Connect docker:privileged to snapd:docker-support
Undone  today at 15:55 UTC  today at 15:55 UTC  Connect docker:docker-cli to docker:docker-daemon
Undone  today at 15:55 UTC  today at 15:55 UTC  Connect docker:home to snapd:home
Undone  today at 15:55 UTC  today at 15:55 UTC  Setup snap "docker" (3051) security profiles for auto-connections

......................................................................
Run install hook of "docker" snap if present

2025-01-24T15:55:10Z ERROR run hook "install": cannot perform operation: mount -t tmpfs /tmp/snap.rootfs_eLyHAI: Permission denied

$ sudo snap install docker --channel=latest/edge
error: cannot perform the following tasks:
- Run install hook of "docker" snap if present (run hook "install": cannot perform operation: mount -t tmpfs /tmp/snap.rootfs_llcWsv: Permission denied)

$ cat /etc/os-release 
NAME="Ubuntu Core"
VERSION="22"
ID=ubuntu-core
PRETTY_NAME="Ubuntu Core 22"
VERSION_ID="22"
HOME_URL="https://snapcraft.io/"
BUG_REPORT_URL="https://bugs.launchpad.net/snappy/"

$ snap info docker
...
snap-id: sLCsFAO8PKM5Z0fAKNszUOX0YASjQfeZ
channels:
  latest/stable:    27.2.0   2024-11-22 (2963) 146MB -
  latest/candidate: ↑                                
  latest/beta:      27.4.1   2025-01-06 (2994) 149MB -
  latest/edge:      27.5.0   2025-01-23 (3051) 149MB -
  core18/stable:    20.10.17 2023-03-13 (2746) 146MB -
  core18/candidate: ↑                                
  core18/beta:      ↑                                
  core18/edge:      ↑                                

$ sudo snap install docker --channel=latest/beta
error: cannot perform the following tasks:
- Run install hook of "docker" snap if present (run hook "install": cannot perform operation: mount -t tmpfs /tmp/snap.rootfs_zFkq1W: Permission denied)

@farshidtz
Copy link
Member

farshidtz commented Jan 24, 2025

@farshidtz
Copy link
Member

Successful run: https://github.com/canonical/docker-snap/actions/runs/12959400493/job/36160117804

@farshidtz farshidtz marked this pull request as ready for review January 25, 2025 08:22
Copy link
Member

@farshidtz farshidtz left a comment

Choose a reason for hiding this comment

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

@locnnil please review my changes and merge if you agree. Thanks

Note that PR description is out of date.

Copy link
Contributor Author

@locnnil locnnil left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you very much @farshidtz.

@locnnil locnnil merged commit 69554a0 into main Jan 25, 2025
3 of 4 checks passed
@locnnil locnnil deleted the fix-hardcoded-os branch January 25, 2025 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants