Skip to content

cgroup quota shows up as -1 #8427

Closed
Closed

Description

@bparees

https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/14128/testReport/(root)/Extended/_builds__Conformance__s2i_build_with_a_quota_Building_from_a_template_should_create_an_s2i_build_with_a_quota_and_run_it/

build knows the quota limit is 6000:

 I0407 00:33:34.039640       1 builder.go:145] Running build with cgroup limits: api.CGroupLimits{MemoryLimitBytes:209715200, CPUShares:61, CPUPeriod:100000, CPUQuota:6000, MemorySwap:209715200}

build creates a container with a quota value of 6000:

 Creating container with options {Name:"" Config:&{Hostname: Domainname: User: Memory:0 MemorySwap:0 MemoryReservation:0 KernelMemory:0 CPUShares:0 CPUSet: AttachStdin:false AttachStdout:true AttachStderr:false PortSpecs:[] ExposedPorts:map[] StopSignal: Tty:false OpenStdin:true StdinOnce:true Env:[OPENSHIFT_BUILD_NAME=s2i-build-quota-1 OPENSHIFT_BUILD_NAMESPACE=extended-test-s2i-build-quota-73hkx-7vwau] Cmd:[/bin/sh -c tar -C /tmp -xf - && /tmp/scripts/assemble] DNS:[] Image:centos/ruby-22-centos7:latest Volumes:map[] VolumeDriver: VolumesFrom: WorkingDir: MacAddress: Entrypoint:[] NetworkDisabled:false SecurityOpts:[] OnBuild:[] Mounts:[] Labels:map[]} HostConfig:&{Binds:[] CapAdd:[] CapDrop:[KILL MKNOD SETGID SETUID SYS_CHROOT] GroupAdd:[] ContainerIDFile: LxcConf:[] Privileged:false PortBindings:map[] Links:[] PublishAllPorts:false DNS:[] DNSOptions:[] DNSSearch:[] ExtraHosts:[] VolumesFrom:[] NetworkMode:container:b03447dab75ae8295f5acc07474232038a65f0b95de206775138835ba0699138 IpcMode: PidMode: UTSMode: RestartPolicy:{Name: MaximumRetryCount:0} Devices:[] LogConfig:{Type: Config:map[]} ReadonlyRootfs:false SecurityOpt:[] CgroupParent: Memory:209715200 MemorySwap:209715200 MemorySwappiness:0 OOMKillDisable:false CPUShares:61 CPUSet: CPUSetCPUs: CPUSetMEMs: CPUQuota:6000 CPUPeriod:100000 BlkioWeight:0 Ulimits:[] VolumeDriver: OomScoreAdj:0}}

the container dumps the cgroup filesystem value and sees -1:

    I0407 00:33:36.030147       1 sti.go:581] MEMORY=209715200
    I0407 00:33:36.031367       1 sti.go:581] MEMORYSWAP=209715200
    I0407 00:33:36.032448       1 sti.go:581] QUOTA=-1
    I0407 00:33:36.033398       1 sti.go:581] SHARES=61
    I0407 00:33:36.034333       1 sti.go:581] PERIOD=100000

Activity

  1. added
    kind/bug
    on Apr 8, 2016
  2. bparees commented on Apr 8, 2016

    @bparees
    ContributorAuthor

    @smarterclayton fyi. i made it a p2 since the exposure is that some builds might be able to exceed an enforced cpu quota. move up if you think it should be higher.

  3. smarterclayton commented on Apr 8, 2016

    @smarterclayton
    Contributor

    Is that not a blocker for online?

  4. bparees commented on Apr 8, 2016

    @bparees
    ContributorAuthor

    i don't know. it could be, i'd say it depends on how frequently it occurs and whether that makes it an avenue for abuse. if 1/100 builds run w/o cpu quota i'm not sure that's a problem? if it's frequent enough that someone could explicitly take advantage of it, maybe it is. hence my putting the question to you :) i wouldn't argue against p1, but i wasn't going to make it one either.

  5. mrunalp commented on Apr 8, 2016

    @mrunalp
    Member

    We have added #8406 to gather additional debugging information.

  6. mrunalp commented on Apr 8, 2016

    @mrunalp
    Member

    @bparees I am not sure if that is available in the link that you posted in this bug as the link doesn't open right now.

  7. bparees commented on Apr 8, 2016

    @bparees
    ContributorAuthor

    @mrunalp looks like jenkins is down at the moment. and of course the build itself may get cleared at some point. but i put the relevant details from the failure in the description.

  8. mrunalp commented on Apr 8, 2016

    @mrunalp
    Member

    @bparees Were you able to capture the output of /proc/self/cgroup that we added?

  9. bparees commented on Apr 8, 2016

    @bparees
    ContributorAuthor

    @mrunalp sorry if i confused you, the job i linked was the original case where @smarterclayton hit it, it is not a new incident w/ your debugging added.

  10. mrunalp commented on Apr 8, 2016

    @mrunalp
    Member
  11. mrunalp commented on Apr 13, 2016

    @mrunalp
    Member

    @bparees Thanks! I am looking into it.

  12. mrunalp commented on Apr 19, 2016

    @mrunalp
    Member

    Looking into systemd as possible cause per the debug output.

  13. 35 remaining items

  14. mrunalp commented on Nov 7, 2016

    @mrunalp
    Member

    Yes the fix is in the 7.3 kernel. If we saw the latest instance on 7.3 then I will follow up with kernel team.

    On Nov 7, 2016, at 10:46 AM, Andy Goldstein [email protected] wrote:

    This was fixed in the 7.3 kernel, right?

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub, or mute the thread.

  15. ncdc commented on Nov 7, 2016

    @ncdc
    Contributor

    I was more asking in hopes of being able to close this now :-)

  16. mrunalp commented on Nov 7, 2016

    @mrunalp
    Member

    Oh okay :) maybe close now and we could reopen if necessary?

    On Nov 7, 2016, at 10:49 AM, Andy Goldstein [email protected] wrote:

    I was more asking in hopes of being able to close this now :-)

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub, or mute the thread.

  17. ncdc commented on Nov 7, 2016

    @ncdc
    Contributor

    SGTM.

  18. mrunalp commented on Apr 13, 2017

    @mrunalp
    Member
  19. openshift-bot commented on Feb 10, 2018

    @openshift-bot
    Contributor

    Issues go stale after 90d of inactivity.

    Mark the issue as fresh by commenting /remove-lifecycle stale.
    Stale issues rot after an additional 30d of inactivity and eventually close.
    Exclude this issue from closing by commenting /lifecycle frozen.

    If this issue is safe to close now please do so with /close.

    /lifecycle stale

  20. added
    lifecycle/stale
    on Feb 10, 2018
  21. openshift-bot commented on Mar 14, 2018

    @openshift-bot
    Contributor

    Stale issues rot after 30d of inactivity.

    Mark the issue as fresh by commenting /remove-lifecycle rotten.
    Rotten issues close after an additional 30d of inactivity.
    Exclude this issue from closing by commenting /lifecycle frozen.

    If this issue is safe to close now please do so with /close.

    /lifecycle rotten
    /remove-lifecycle stale

  22. added
    lifecycle/rotten
    and removed
    lifecycle/stale
    on Mar 14, 2018
  23. openshift-bot commented on Apr 13, 2018

    @openshift-bot
    Contributor

    Rotten issues close after 30d of inactivity.

    Reopen the issue by commenting /reopen.
    Mark the issue as fresh by commenting /remove-lifecycle rotten.
    Exclude this issue from closing again by commenting /lifecycle frozen.

    /close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

component/containerskind/bugkind/test-flakelifecycle/rottenpriority/P1

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions