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

Bump github.com/containerd/cgroups from 1.0.4 to 1.1.0 in /agent #3623

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 27, 2023

Bumps github.com/containerd/cgroups from 1.0.4 to 1.1.0.

Release notes

Sourced from github.com/containerd/cgroups's releases.

v1.1.0

What's Changed

New Contributors

Full Changelog: containerd/cgroups@v1.0.4...v1.1.0

Commits
  • fe7323f Merge pull request #249 from austinvazquez/upgrade-gha-runner
  • 08db267 Update GitHub actions CI workflow
  • ed6600a Merge pull request #248 from austinvazquez/upgrade-go-compiler
  • bacc99b Upgrade Go compiler to 1.19
  • 724eb82 Merge pull request #246 from kzys/no-ioutil
  • e3fea41 Merge pull request #228 from jseba/delete_empty_cgroups_only
  • 98dc9d9 Don't use ioutil
  • 38b9b00 Merge pull request #243 from yaoyinnan/242/cgroupv2-addThread
  • e8a4323 Merge pull request #231 from jellor/main
  • 640c206 Support cgroup.AddThread in cgroupv2 manager
  • Additional commits viewable in compare view

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot requested a review from a team as a code owner March 27, 2023 11:58
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Mar 27, 2023
@sparrc
Copy link
Contributor

sparrc commented Mar 27, 2023

@dependabot rebase

@dependabot dependabot bot force-pushed the dependabot/go_modules/agent/dev/github.com/containerd/cgroups-1.1.0 branch from 2c8f550 to 1ad0674 Compare March 27, 2023 17:14
@mythri-garaga
Copy link
Contributor

Looking into integration test failure

1680288838249059514 [Debug] Removing cgroup cgroupPath=/ecs/testCgroup
1680288838250229201 [Warn] logger=structured msg="Unable to cleanup resource" task="testCgroup" resource="cgroup" error="resource: cleanup cgroup: unable to remove cgroup at /ecs/testCgroup: cgroup remove: unable to delete cgroup: lstat /sys/fs/cgroup/net_prio/ecs/testCgroup: no such file or directory"
1680288838250294353 [Info] logger=structured msg="Finished removing task data, removing task from managed tasks" task="testCgroup"
1680288839245124866 [Debug] Checking existence of cgroup cgroupPath=/ecs/testCgroup
--- FAIL: TestStartStopWithCgroup (6.28s)
    engine_sudo_linux_integ_test.go:157: 
        	Error Trace:	/opt/amazon-ecs-agent/go/src/github.com/aws/amazon-ecs-agent/agent/engine/engine_sudo_linux_integ_test.go:157
        	Error:      	Should be false
        	Test:       	TestStartStopWithCgroup

@mythri-garaga
Copy link
Contributor

mythri-garaga commented Apr 5, 2023

Cgroup resource cleaning fails due to change introduced in containerd/cgroups#228 .

// Delete will remove the control group from each of the subsystems registered
func (c *cgroup) Delete() error {
	c.mu.Lock()
	defer c.mu.Unlock()
	 ...
	for _, s := range c.subsystems {
		// kernel prevents cgroups with running process from being removed, check the tree is empty
		procs, err := c.processes(s.Name(), true, cgroupProcs)
		if err != nil {
			return err
		}
		if len(procs) > 0 {
			errs = append(errs, fmt.Sprintf("%s (contains running processes)", string(s.Name())))
			continue
		}

If there is an error is retrieving processes for a cgroup subsystem, delete function exits and rest of the resources are not cleaned up.

To fix the issue, continue iterating over remaining resources to delete them and just append the error it fails to get running processes for a cgroup subsytem.

func (c *cgroup) Delete() error {
	c.mu.Lock()
	defer c.mu.Unlock()
	 ...
	for _, s := range c.subsystems {
		// kernel prevents cgroups with running process from being removed, check the tree is empty
		procs, err := c.processes(s.Name(), true, cgroupProcs)
		if err != nil {
			errs = append(errs, fmt.Sprintf("%s (failed to retrieve running processes)", string(s.Name())))
			continue
		}
		if len(procs) > 0 {
			errs = append(errs, fmt.Sprintf("%s (contains running processes)", string(s.Name())))
			continue
		}

@singholt
Copy link
Contributor

@dependabot rebase

Bumps [github.com/containerd/cgroups](https://github.com/containerd/cgroups) from 1.0.4 to 1.1.0.
- [Release notes](https://github.com/containerd/cgroups/releases)
- [Commits](containerd/cgroups@v1.0.4...v1.1.0)

---
updated-dependencies:
- dependency-name: github.com/containerd/cgroups
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/go_modules/agent/dev/github.com/containerd/cgroups-1.1.0 branch from 1ad0674 to a49d766 Compare May 30, 2023 17:21
@singholt
Copy link
Contributor

singholt commented Jun 1, 2023

closing this since it requires a test fix while we incorporate this update

@singholt singholt closed this Jun 1, 2023
@dependabot dependabot bot deleted the dependabot/go_modules/agent/dev/github.com/containerd/cgroups-1.1.0 branch June 1, 2023 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants