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

Fix: issue cri-dockerd runtime not being found #1899

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

FlikweertvisionVadym
Copy link

Ⅰ. Describe what this PR does

Within this pull request, support for extra case of cri-dockerd.sock location was proposed to add.

if _, err = os.Stat(fmt.Sprintf("%s/cri-dockerd/cri-dockerd.sock", varRunPath)); err == nil {
			cfgs = append(cfgs, runtimeConfig{
				runtimeType:      ContainerRuntimeCommonCRI,
				runtimeRemoteURI: fmt.Sprintf("unix://%s/cri-dockerd/cri-dockerd.sock", varRunPath),
			})
		}

This change absolutely follows the format how it was done for other runtimes.

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. Describe how to verify it

Using k3s with different runtimes at different nodes the issue was that for each runtime a folder made.
Runtimes location is: /var/run/k3s. Was not able to use cri-dockerd/cri-dockerd.sock before this change.

Ⅳ. Special notes for reviews

This change absolutely follows the format how it was done for other runtimes.

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.97%. Comparing base (0d0031a) to head (739d50b).
Report is 145 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1899      +/-   ##
==========================================
+ Coverage   47.91%   50.97%   +3.05%     
==========================================
  Files         162      192      +30     
  Lines       23491    24961    +1470     
==========================================
+ Hits        11256    12724    +1468     
+ Misses      11014    10934      -80     
- Partials     1221     1303      +82     
Flag Coverage Δ
unittests 50.97% <ø> (+3.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@furykerry furykerry left a comment

Choose a reason for hiding this comment

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

plz sign your commit

@@ -208,6 +208,12 @@ func detectRuntime(varRunPath string) (cfgs []runtimeConfig) {
runtimeRemoteURI: fmt.Sprintf("unix://%s/cri-dockerd.sock", varRunPath),
})
}
if _, err = os.Stat(fmt.Sprintf("%s/cri-dockerd/cri-dockerd.sock", varRunPath)); err == nil {
Copy link
Member

Choose a reason for hiding this comment

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

can you leave comment above the code about the k3s runtime folder setup ?

Copy link
Author

@FlikweertvisionVadym FlikweertvisionVadym Jan 29, 2025

Choose a reason for hiding this comment

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

Commit was signed, comment added.

Signed-off-by: Vadym Tartakovskyi <[email protected]>
Signed-off-by: Vadym Tartakovskyi <[email protected]>
Signed-off-by: Vadym Tartakovskyi <[email protected]>
Signed-off-by: Vadym Tartakovskyi <[email protected]>
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