Skip to content

Conversation

@clnperez
Copy link
Contributor

This uncomments the TasksMax line in the docker.service file if it's a known release that uses a systemd that supports it.

Verify by:

  1. docker run --rm -it --privileged -v pwd:/go/src/github.com/docker/docker docker ./hack/make.sh dynbinary build-deb
  2. cd bundles/latest/build-deb/
  3. cd into one of the distros that built
  4. untar the docker bundle
  5. check that the TasksMax value is either commented or uncommented in the docker.service file under bundles/latest/build-deb//docker/contrib/init/systemd/

Verify more quickly by deleting some of the releases under contrib/builder/deb/amd64/ (e.g. all but ubuntu-wily and ubuntu-xenial, so you can check that wily is still commented out but xenial isn't).

hedgehog

Since we can't just add the TasksMax value into the docker.service
file, we can add it in at buildtime.

See /pull/21491 for some background.

Signed-off-by: Christy Perez [email protected]

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It isn't going to change anything about the version string. It just conditionally adds a line to Dockerfile.build

Copy link
Member

Choose a reason for hiding this comment

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

But this changes of a Dockerfie will result of a dirty working directory as there will be a changes not commited. I think @thaJeztah is right on this, this probably result of a -unsupported build.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, this whole script is actually creating the Dockerfile.build. I just re-ran to make sure that that unsupported message doesn't show up (just as a sanity check) and it didn't. Are you guys seeing it?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is all good folks.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @tiborvass 😻

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for checking! Sorry, I wasn't sure, and thought I'd leave a comment before we overlook it 👍

@clnperez clnperez force-pushed the systemd-tasksmax-workaround branch from 0b7a541 to 95a8d75 Compare March 30, 2016 16:27
@clnperez
Copy link
Contributor Author

I just rebased since PR #21491 (which added #TasksMax=infinity) got merged.

@tiborvass
Copy link
Contributor

LGTM

Copy link
Member

Choose a reason for hiding this comment

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

Since these and everything after them will support it, would it be better to swap this list and list the ones that don't have the newer systemd? (ie, only update this list when we remove unsupported distros, not for every new one we add?)

Copy link
Contributor

Choose a reason for hiding this comment

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

Good point 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that is a good idea. That way, we've got a list, and we don't have to change it to pick up the value for any new release. And if an old release is removed (edit: from contrib/builder/deb/), we don't have to change the list then either. Testing this now. Thanks @tianon!

@clnperez clnperez force-pushed the systemd-tasksmax-workaround branch from 95a8d75 to 15e1486 Compare March 30, 2016 21:33
@clnperez
Copy link
Contributor Author

All tested, and only the two not in the list get the sed line in their Dockerfile.build. PTAL

Copy link
Member

Choose a reason for hiding this comment

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

typo: s/releses/releases/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

@clnperez clnperez force-pushed the systemd-tasksmax-workaround branch from 15e1486 to 7ad362d Compare March 30, 2016 22:40
@thaJeztah
Copy link
Member

ping @tianon PTAL ❤️

@tianon
Copy link
Member

tianon commented Mar 30, 2016

LGTM

@clnperez
Copy link
Contributor Author

clnperez commented Apr 4, 2016

@thaJeztah, does this one need a re-LGTM since it's been through a couple of edits?

@thaJeztah
Copy link
Member

@clnperez let me check with @tiborvass

Copy link
Contributor

Choose a reason for hiding this comment

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

why escape the / ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A remnant of a previous mistake in my sed command. Fixed, thanks!

Since we can't use the TasksMax value in the docker.service
file by default, we can uncomment it at buildtime.

See moby/pull/21491 for some background.

Signed-off-by: Christy Perez <[email protected]>
@clnperez clnperez force-pushed the systemd-tasksmax-workaround branch from 7ad362d to 2b849e0 Compare April 7, 2016 16:16
@tianon
Copy link
Member

tianon commented Apr 7, 2016

LGTM

1 similar comment
@tiborvass
Copy link
Contributor

LGTM

debian-jessie|debian-wheezy|ubuntu-precise|ubuntu-trusty|ubuntu-wily)
;;
*)
echo "RUN sed -i -- 's/#TasksMax=infinity/TasksMax=infinity/' contrib/init/systemd/docker.service" >> "$DEST/$version/Dockerfile.build"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just found out that this leads to an armhf deb package for raspbian-jessie with binaries marked as "unsupported". The armhf debian-jessie is fine without that "unsupported" marker.
I'll make a PR for line 92 to make #21895 work again.

Copy link
Contributor

Choose a reason for hiding this comment

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

i wonder if you couldnt just do the sed in the raspbian-jessie dockerfile instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also thought this should be "deep" enough. But the git commit check seems to run afterwards.

This is the relevant output of a make deb building current rc1 on armhf:

Step 14 : RUN sed -i -- 's/#TasksMax=infinity/TasksMax=infinity/' contrib/init/systemd/docker.service
 ---> Running in 708e5b0729ec
 ---> fd894af223c8
Removing intermediate container 708e5b0729ec
Step 15 : RUN dpkg-buildpackage -uc -us -I.git
 ---> Running in eb84d00712e7
dpkg-buildpackage: source package docker-engine
dpkg-buildpackage: source version 1.12.0~rc1-0~jessie
dpkg-buildpackage: source distribution jessie
dpkg-buildpackage: source changed by Docker <[email protected]>
 dpkg-source -I.git --before-build docker
dpkg-buildpackage: host architecture armhf
 debian/rules clean
dh clean --with=bash-completion --with=systemd
   dh_testdir
   dh_auto_clean
   dh_clean
 dpkg-source -I.git -b docker
dpkg-source: warning: no source format specified in debian/source/format, see dpkg-source(1)
dpkg-source: warning: source directory 'docker' is not <sourcepackage>-<upstreamversion> 'docker-engine-1.12.0~rc1'
dpkg-source: info: using source format `1.0'
dpkg-source: info: building docker-engine in docker-engine_1.12.0~rc1-0~jessie.tar.gz
dpkg-source: info: building docker-engine in docker-engine_1.12.0~rc1-0~jessie.dsc
 debian/rules build
dh build --with=bash-completion --with=systemd
   dh_testdir
   dh_auto_configure
   debian/rules override_dh_auto_build
make[1]: Entering directory '/usr/src/docker'
./hack/make.sh dynbinary

# WARNING! I don't seem to be running in a Docker container.
# The result of this command might be an incorrect build, and will not be
# officially supported.
#
# Try this instead: make all
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# GITCOMMIT = 1f136c1-unsupported
# The version you are building is listed as unsupported because
# there are some files in the git repository that are in an uncommited state.
# Commit these changes, or add to .gitignore to remove the -unsupported from the version.
# Here is the current list:
 M contrib/init/systemd/docker.service
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bundles/1.12.0-rc1 already exists. Removing.

Copy link
Member

@tianon tianon Jun 15, 2016 via email

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

But this sed is wrong for any platform, right?
Is it possible to revert this PR then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

....and also this isn't in 1.11.2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry for one more message, but I finally got the build-deb script to finish without crashing b/c of some flaky repo, and it did build docker-engine_1.12.0rc1-0stretch_amd64.deb.

That said, do what you think makes the most sense. But for some reason it's only affecting the raspbian builds.

Copy link
Member

Choose a reason for hiding this comment

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

If we can use @tianon's approach #21628 (comment), perhaps it's better (but I don't know how that should be implemented 😊)

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry to disturb once more. I've done a make deb with the 1.12.0-rc2 tag and checked both debian-jessie and debian-stretch for amd64.

The docker binary for debian-stretch shows the "unsupported" string and the debian-jessie binary is fine:

root@00b88863593e:/tmp/jessie/usr/bin# ./docker --version
Docker version 1.12.0-rc2, build 906eacd

root@00b88863593e:/tmp/stretch/usr/bin# ./docker --version
Docker version 1.12.0-rc2, build 906eacd-unsupported

So how should we proceed with fix for raspbian? I would like to send a PR to revert this one as it does not seem to work as intended as the sed changes the source tree and the binaries in the deb package are marked as unsupported.

Copy link
Contributor

Choose a reason for hiding this comment

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

I also installed the test package 1.12.0-rc2 in an ubuntu/xenial64 Vagrant box with curl -fsSL https://test.docker.com/ | sh and it also shows the unsupported tag:

+ sh -c docker version
Client:
 Version:      1.12.0-rc2
 API version:  1.24
 Go version:   go1.6.2
 Git commit:   906eacd-unsupported
 Built:        Fri Jun 17 21:21:56 2016
 OS/Arch:      linux/amd64

Server:
 Version:      1.12.0-rc2
 API version:  1.24
 Go version:   go1.6.2
 Git commit:   906eacd-unsupported
 Built:        Fri Jun 17 21:21:56 2016
 OS/Arch:      linux/amd64

If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker your-user

Remember that you will have to log out and back in for this to take effect!

root@ubuntu-xenial:/home/ubuntu# 

The same steps with a debian/jessie64 Vagrant box shows clean binaries.
So it seems that this is not only a raspbian problem.

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.

8 participants