Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-43328

Fixed inherited cgroup

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When container is ran with --parent-cgroup to inherit restrictions from another container, the resulting cgroup looks like :

      6:memory:/docker/4193df6bcf5fce75f3fc77f303b2ac06fb664adeb269b959b7ae17b3f8dcf329/14d7240da87b145e4992654c908a8631dbf179abb7f88115ea72743e1192d07d

       

      CGROUP_MATCHER_PATTERN don't catch this and won't be able to extract the container ID

       

        Attachments

          Activity

          Hide
          ndeloof Nicolas De Loof added a comment -

          how to reproduce:

          run a container to create initial cgroup `docker run -d -m 128M ubuntu true`
          capture container ID
          run a container for the build to use --parent-cgroup <containerID> 

          `docker run --parent-cgroup <containerID> jenkins/slave java -jar jenkins.jar...`

          run a docker pipeline `inside` on this slave, it won't discover the container ID 

          Show
          ndeloof Nicolas De Loof added a comment - how to reproduce: run a container to create initial cgroup `docker run -d -m 128M ubuntu true` capture container ID run a container for the build to use --parent-cgroup <containerID>  `docker run --parent-cgroup <containerID> jenkins/slave java -jar jenkins.jar...` run a docker pipeline `inside` on this slave, it won't discover the container ID 
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nicolas De Loof
          Path:
          src/main/java/org/jenkinsci/plugins/docker/workflow/client/DockerClient.java
          src/test/java/org/jenkinsci/plugins/docker/workflow/client/DockerClientTest.java
          http://jenkins-ci.org/commit/docker-workflow-plugin/c4b916be7ccede9d2950aaff84a606cc52886400
          Log:
          JENKINS-43328 detect container ID when ran with --parent-group

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/org/jenkinsci/plugins/docker/workflow/client/DockerClient.java src/test/java/org/jenkinsci/plugins/docker/workflow/client/DockerClientTest.java http://jenkins-ci.org/commit/docker-workflow-plugin/c4b916be7ccede9d2950aaff84a606cc52886400 Log: JENKINS-43328 detect container ID when ran with --parent-group
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/org/jenkinsci/plugins/docker/workflow/client/DockerClient.java
          src/test/java/org/jenkinsci/plugins/docker/workflow/client/DockerClientTest.java
          http://jenkins-ci.org/commit/docker-workflow-plugin/eb4193c33d0a1a3c1f09b4197b5052729f97dcbb
          Log:
          Merge pull request #92 from ndeloof/JENKINS-43328

          JENKINS-43328 Detect container ID when run with --parent-group

          Compare: https://github.com/jenkinsci/docker-workflow-plugin/compare/5d1c03b5903c...eb4193c33d0a

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/docker/workflow/client/DockerClient.java src/test/java/org/jenkinsci/plugins/docker/workflow/client/DockerClientTest.java http://jenkins-ci.org/commit/docker-workflow-plugin/eb4193c33d0a1a3c1f09b4197b5052729f97dcbb Log: Merge pull request #92 from ndeloof/ JENKINS-43328 JENKINS-43328 Detect container ID when run with --parent-group Compare: https://github.com/jenkinsci/docker-workflow-plugin/compare/5d1c03b5903c...eb4193c33d0a

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              ndeloof Nicolas De Loof
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: