Skip to content

Add 'extras' virtual package to fix kernel upgrade fallback from aufs to devicemapper - #10860

Merged
jessfraz merged 1 commit into
moby:masterfrom
mbentley:curl-install-fix
Mar 17, 2015
Merged

jessfraz merged 1 commit into
moby:masterfrom
mbentley:curl-install-fix

Conversation

@mbentley

Copy link
Copy Markdown
Contributor

Signed-off-by: Matt Bentley [email protected]

@mbentley

Copy link
Copy Markdown
Contributor Author

PR for discussion of #10859

@jessfraz

Copy link
Copy Markdown
Contributor

hmmm ping @tianon idk what the virtual extras do

@tianon

tianon commented Feb 23, 2015

Copy link
Copy Markdown
Member

https://packages.debian.org/sid/linux-image-extra-virtual is a 404 -- where does this package virtual come from? Is it Ubuntu-specific?

@mbentley

Copy link
Copy Markdown
Contributor Author

@tianon

tianon commented Feb 23, 2015

Copy link
Copy Markdown
Member

Oh right, the || true makes sure that works regardless.

However, this is potentially more dangerous than the other one is -- this package will install linux-image-generic (http://packages.ubuntu.com/vivid/linux-image-generic), which could then install a different kernel from what the user is currently using/intended to use. I guess we could argue that if they care about the way their system is configured, they shouldn't be running a random "install" script off the internet (which is what I'd rather encourage anyhow -- IMO this script needs to go away completely at some point).

@tianon

tianon commented Feb 23, 2015

Copy link
Copy Markdown
Member

@unclejack what do you think?

@unclejack

Copy link
Copy Markdown
Contributor

@tianon Perhaps we should prompt for the installation of the generic-extra kernel when detecting the virtual kernel without aufs on Ubuntu?

@tianon

tianon commented Feb 23, 2015

Copy link
Copy Markdown
Member

That sounds reasonable to me! 👍

@GordonTheTurtle

Copy link
Copy Markdown
Contributor

Can you please sign your commits following these rules:

https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work

The easiest way to do this is to amend the last commit:

$ git clone -b "curl-install-fix" [email protected]:mbentley/docker.git somewhere
$ cd somewhere
$ git rebase -i HEAD~2
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

This will update the existing PR, so you do not need to open a new one.

@mbentley

Copy link
Copy Markdown
Contributor Author

I added some logic to check and see if the following were true:

  1. The current kernel was a -generic kernel
  2. That a linux-image-*-generic package was installed

This should verify that the packages linux-image-extra-$(uname -r) and linux-image-extra-virtual won't install a different kernel than what is currently running and ensure that the package is really installed and that someone just don't have -generic in the name of their custom compiled kernel.

If the kernel doesn't match, it will just give a warning and suggest installing linux-image-virtual (which will install the linux-image-generic package) and linux-image-extra-virtual for proper AUFS support.

Comment thread project/install.sh Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This could be simplified somewhat, couldn't it? (and catch the edge case of linux-image-*-generic somehow matching files in the user's current directory)

if uname -r | grep -q -- '-generic' && dpkg -l 'linux-image-*-generic' | grep -q '^ii' 2>/dev/null; then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm, indeed. Not sure what exactly I was doing with the echo there but yes, that's great, thanks for catching that!

@tianon

tianon commented Mar 3, 2015

Copy link
Copy Markdown
Member

👍 for the new logic! 😄

@tianon

tianon commented Mar 5, 2015

Copy link
Copy Markdown
Member

LGTM

cc @jfrazelle @unclejack

@thaJeztah

Copy link
Copy Markdown
Member

@mbentley I think this needs a rebase; project/install.sh was moved to hack/install.sh

… to devicemapper

Added checks for the proper kernel support before blindly installing extras package

Fixes #10859

Signed-off-by: Matt Bentley <[email protected]>
@mbentley

Copy link
Copy Markdown
Contributor Author

thanks @thaJeztah. Rebased.

@jessfraz

Copy link
Copy Markdown
Contributor

LGTM

jessfraz pushed a commit that referenced this pull request Mar 17, 2015
Add 'extras' virtual package to fix kernel upgrade fallback from aufs to devicemapper
@jessfraz
jessfraz merged commit ea25582 into moby:master Mar 17, 2015
@dredknight

Copy link
Copy Markdown

Same issue but the docker OS is centos7. How to fix it there?

@mbentley
mbentley deleted the curl-install-fix branch May 12, 2015 11:28
@mbentley

Copy link
Copy Markdown
Contributor Author

Are you certain that you started with aufs support on CentOS 7? I wouldn't think so unless you compiled your own kernel as CentOS 7 and RHEL 7 are not shipping with aufs support to the best of my knowledge.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants