-
Notifications
You must be signed in to change notification settings - Fork 412
Use docker ps to detect absence of docker permissions #336
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The plugin BOM agents seem to have the `docker` command available but the user running the agent is not authorized to use the `docker` command. Previously that was detected by calling `docker ps` and detecting the failure. Restores a change made in * jenkinsci#331 Testing done Confirmed that I could see the same failure on a local computer as is seen on https://ci.jenkins.io/job/Tools/job/bom/job/master/3968/testReport/org.jenkinsci.plugins.docker.workflow/DockerDSLTest/ The computer had Docker CE installed by the specific user running the test did not have permission to access Docker. Prior to this change, the tests failed with the message: CANNOT CONNECT TO THE DOCKER DAEMON AT UNIX:///VAR/RUN/DOCKER.SOCK. IS THE DOCKER DAEMON RUNNING? After making this change, the tests pass on that computer with the specific user that does not have permission to access Docker.
docker ps
to detect absence of docker permissions
docker ps
to detect absence of docker permissions
MarkEWaite
added a commit
to MarkEWaite/bom
that referenced
this pull request
Feb 16, 2025
The 595.v60cec912059b_ tests fail on the ci.jenkins.io agents that are used for BOM builds. The failure message is: > java.lang.IllegalArgumentException: No enum constant > org.jenkinsci.plugins.docker.workflow.DockerTestUtil.DockerOsMode. > CANNOT CONNECT TO THE DOCKER DAEMON AT UNIX:///VAR/RUN/DOCKER.SOCK. IS > THE DOCKER DAEMON RUNNING? A pull request has been proposed to resolve the failure by skipping those tests on machines that have the docker executable available but the user does not have permission to use docker. The pull request is: * jenkinsci/docker-workflow-plugin#336
6 tasks
MarkEWaite
added a commit
to MarkEWaite/bom
that referenced
this pull request
Feb 16, 2025
The 595.v60cec912059b_ tests fail on the ci.jenkins.io agents that are used for BOM builds. The failure message is: > java.lang.IllegalArgumentException: No enum constant > org.jenkinsci.plugins.docker.workflow.DockerTestUtil.DockerOsMode. > CANNOT CONNECT TO THE DOCKER DAEMON AT UNIX:///VAR/RUN/DOCKER.SOCK. IS > THE DOCKER DAEMON RUNNING? A pull request has been proposed to resolve the failure by skipping those tests on machines that have the docker executable available but the user does not have permission to use docker. The pull request is: * jenkinsci/docker-workflow-plugin#336 This commit tests that build in plugin BOM
This was referenced Feb 16, 2025
@basil could you review this and let me know if the approach is reasonable or if another approach should be used? |
MarkEWaite
added a commit
to jenkinsci/bom
that referenced
this pull request
Feb 17, 2025
The 595.v60cec912059b_ tests fail on the ci.jenkins.io agents that are used for BOM builds. The failure message is: > java.lang.IllegalArgumentException: No enum constant > org.jenkinsci.plugins.docker.workflow.DockerTestUtil.DockerOsMode. > CANNOT CONNECT TO THE DOCKER DAEMON AT UNIX:///VAR/RUN/DOCKER.SOCK. IS > THE DOCKER DAEMON RUNNING? A pull request has been proposed to resolve the failure by skipping those tests on machines that have the docker executable available but the user does not have permission to use docker. The pull request is: * jenkinsci/docker-workflow-plugin#336
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use
docker ps
to detect absence of docker permissionsThe plugin BOM agents seem to have the
docker
command available but the user running the agent is not authorized to use thedocker
command. Previously that was detected by callingdocker ps
and detecting the failure.Restores a change made in
Testing done
Plugin BOM draft pull request to check it on weekly:
org.jenkins-ci.plugins:docker-workflow
from 592.v1001d948426c to 596.v3e6972b_46b_e2 in/bom-weekly
bom#4473Confirmed that I could see the same failure on a local computer as is seen on https://ci.jenkins.io/job/Tools/job/bom/job/master/3968/testReport/org.jenkinsci.plugins.docker.workflow/DockerDSLTest/
The computer had Docker CE installed by the specific user running the test did not have permission to access Docker. Prior to this change, the tests failed with the message:
After making this change, the tests pass on that computer with the specific user that does not have permission to access Docker.
Submitter checklist