Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

aa_allow_incomplete required on Ubuntu 14.10 #333

Closed
bryanlarsen opened this issue Dec 20, 2014 · 15 comments
Closed

aa_allow_incomplete required on Ubuntu 14.10 #333

bryanlarsen opened this issue Dec 20, 2014 · 15 comments

Comments

@bryanlarsen
Copy link

I had to add this to my Vagrantfile to allow it to work with a Ubuntu 14.10 host

  config.vm.provider :lxc do |lxc|
    lxc.customize "aa_allow_incomplete", 1
  end
@onionjake
Copy link

I also had to add that option on Ubuntu 14.10.

@fgrehm
Copy link
Owner

fgrehm commented Jan 8, 2015

I'm not sure what is the best way to solve this, lemme think a bit more and get a 14.10 host ready to test things out.

@fgrehm fgrehm modified the milestone: v1.1.0 Jan 8, 2015
@fgrehm
Copy link
Owner

fgrehm commented Jan 12, 2015

Confirmed that this is an issue on Ubuntu 14.10. Does anyone know why is that needed?

@jvanoostveen
Copy link

The change to the Vagrantfile is also breaking provisioning for < 14.10. Actually breaking LXC at a whole for the container (lxc-ls and friends will no longer work for the created container). Only solution to get to a sane state is removing the files from /var/lxc/...

@fgrehm
Copy link
Owner

fgrehm commented Jan 12, 2015

Looks like that config was introduced on lxc 1.1.0.alpha2: lxc/lxc@7aff4f4

Which lxc version have you guys got up there?

@fgrehm
Copy link
Owner

fgrehm commented Jan 12, 2015

Just to make things clear: @jvanoostveen that is kinda of expected because you are probably using a lxc version that does not support that config.

@jvanoostveen
Copy link

That might be true, but it makes it hard to commit this line in the repository.

The version installed on my system is 1.1.0.alpha2. It was required to even be able to run lxc as I can recall.

@fgrehm
Copy link
Owner

fgrehm commented Jan 12, 2015

Yup, I'm not planning to add any logic around this to the plugin right now since it is not required on pre 1.1.0 (which is what I believe most people are still using these days as 1.0.X is what ships on 14.04 LTS)

Tagged this as a documentation change so it reminds me of adding instructions around this to the README.

@onionjake
Copy link

I added a check for the LXC version to the Vagrantfile like so:

LXC_VERSION = `lxc-ls --version`.strip
Vagrant.configure("2") do |config|
  config.vm.box = "trusty64"
  config.vm.provider :lxc do |lxc|
    if LXC_VERSION != '1.0.6'
      lxc.customize 'aa_allow_incomplete', '1'
    end
    lxc.customize 'network.mtu','1400'
  end
end

You could make the comparison a bit more intelligent, but this worked for what I needed.

@fgrehm fgrehm modified the milestone: v1.1.0 Jan 14, 2015
@stucki
Copy link
Contributor

stucki commented Jan 27, 2015

This seems to work:

LXC_VERSION = `lxc-ls --version`.strip unless defined? LXC_VERSION
if LXC_VERSION >= "1.1.0"
  # Allow start without AppArmor, otherwise Box will not Start on Ubuntu 14.10
  # see https://github.com/fgrehm/vagrant-lxc/issues/333
  lxc.customize 'aa_allow_incomplete', 1
end

@fgrehm
Copy link
Owner

fgrehm commented Mar 3, 2015

Cool, and what you guys described can be easily added to the global $HOME/.vagrant.d/Vagrantfile ;-)

@stucki
Copy link
Contributor

stucki commented Mar 3, 2015

Things like this should work out of the box don't you think?

@fgrehm
Copy link
Owner

fgrehm commented Mar 3, 2015

It might... I need some time to better understand what that flag is actually doing, in the meantime, lxc 1.1.0+ users can work around that by adding the following to $HOME/.vagrant.d/Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.provider :lxc do |lxc|
    lxc.customize 'aa_allow_incomplete', 1
  end
end

@nvtkaszpir
Copy link

nvtkaszpir commented Mar 14, 2017

If anyone uses test-kitchen https://github.com/test-kitchen/test-kitchen with vagrant-lxc and your containers require aa_allow_incomplete to be set to 1, the you can use customize section for lxc driver, for example:

.kitchen.local.lxc:

driver_plugin: lxc

driver:
  name: vagrant
  provider: lxc
  customize:
    aa_allow_incomplete: 1

- name: debian.7-lxc
  platform: linux
  driver:
    box: debian7lxc
  driver_config:
    username: root # defaults to "root"
    password: root # defaults to "root"

suites:
  - name: api

Of course you can also use per specific platform/suite overrides, refer to test-kitchen docs.

@fgrehm fgrehm added the ignored label Nov 17, 2022
@fgrehm
Copy link
Owner

fgrehm commented Nov 17, 2022

Hey, sorry for the silence here but this project is looking for maintainers 😅

As per #499, I've added the ignored label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue 👋

@fgrehm fgrehm closed this as completed Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants