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

Added support for cgroup_parent #2114

Closed
wants to merge 1 commit into from
Closed

Conversation

mohitsoni
Copy link

This change adds cgroup-parent support to compose project. It allows
each service to specify a 'cgroup_parent' option.

Related:

  1. Added support for cgroup parent docker-py#716 (Enables this PR)
  2. Add cgroup support mohitsoni/compose-executor#3 (Depends on this PR)

@mnowster
Copy link

mnowster commented Oct 5, 2015

Thanks for the contribution @mohitsoni

The cgroup-parent option will need adding to the docs as well. https://github.com/docker/compose/blob/master/docs/yml.md.

If you do a git rebase -i HEAD~2 then you can fixup the typo commit into the previous one.

This change adds cgroup-parent support to compose project. It allows
each service to specify a 'cgroup_parent' option.

Signed-off-by: Mohit Soni <mosoni@paypal.com>
service.image = lambda: {'Id': 'abc123'}

service.create_container(do_build=False, cgroup_parent='test')
self.assertFalse(self.mock_client.build.called)
Copy link

Choose a reason for hiding this comment

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

I don't see how this test is testing that our cgroup_parent option was passed in correctly. I think this is the the wrong place to write the test for the option.

Maybe something along the lines to this test, https://github.com/docker/compose/blob/master/tests/unit/service_test.py#L111
where we can see that the cgroup_parent, if specified, is sent to create_host_config.

@mnowster
Copy link

mnowster commented Oct 6, 2015

The test needs updating, other than that, the rest is LGTM 👍

@mnowster mnowster added this to the 1.5.0 milestone Oct 6, 2015
@mnowster
Copy link

Closing in favour of #2189

I picked up and did the test change, so we can get this in for 1.5

@mnowster mnowster closed this Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants