Problems after upgrade to ubuntu 17.10
rvanlaar opened this issue · 12 comments
I'm running into two bugs it seems.
Mainly #358 and #445.
I recently upgraded from ubuntu 17.04 to 17.10.
Didn't have problems with running vagrant-lxc while on 17.04.
Due to #445 my config files weren't updated and contained:
lxc.pivotdir = lxc_putold
lxc.kmsg = 0
This triggered #358 and poof went the metadata.
What I would like to see is an upgrade path, automatic failure,
useful error message or documentation about this.
And documentation on how to restore the .vagrant metadata directory.
How can I help to get there?
I'm using:
vagrant 2.0.1
vagrant-lxc (1.3.0)
vagrant-share (1.1.9, system)
Ubuntu 17.10
I fixed the configuration issues (#445) by running the following:
# cd /var/lib/lxc
# sed -e '/lxc.kmsg/ s/^#*/#/' -i */config
# sed -e '/lxc.pivotdir/ s/^#*/#/' -i */config
Am still running into the:
# lxc-start -n CONTAINER_NAME
The configuration file contains legacy configuration keys.
Please update your configuration file!
you'll need the following file to make the plugin recognize your existing container:
.vagrant/machines/$machine_name/lxc/id
Where $machine_name is the name of the machine in your Vagrantfile (defaults to "default", which is also the beginning part of your container name before the numbers) and the id
file contains just the name of the container with no newline (you can run echo -n $container_name > id
to make the file).
@rvanlaar did you try the lxc-update-config
program that comes with LXC? It's a much more reliable way to upgrade your config.
I'm running into the same issue.
I notice that in the scripts/lxc-template
file, there's a line that does echo "lxc.utsname = ${LXC_NAME}" >> ${LXC_PATH}/config
.
If you're running lxc 2.1 or newer, that particular key was deprecated; instead, the new key should be lxc.uts
.
@nfanta yes, the lxc-template still is in the pre-2.1 format for backward compatibility but newly created boxes in vagrant-lxc 1.3+ will be properly configured because lxc-update-config
is ran after box creation. see #445. Existing boxes have to be upgraded manually though, as we can see in this issue.
This is still an issue with 2.1.1 regardless if the box was updated with lxc-update-config
@kevcenteno what do you mean exactly, that after running lxc-update-config
on your box's config, vagrant up
still fails in a similar way than what is described in #445? What's your config, vagrant-lxc version and what's the error message you're getting?
I'm using the basic config via vagrant init fgrehm/precise64-lxc && vagrant up --provider=lxc
.
vagrant-lxc=1.4.0
lxc=2.1.0
Running vagrant up --debug
gives me something like lxc.utsname is an invalid key
.
I got the box to provision by making this change kevcenteno@e2a2c42
I also tested kevcenteno@e2a2c42 using LXC 3.0.0beta
@kevcenteno didn't you say that you were on v2.1.1? As I say in #445 (comment) , LXC 2.1.1 will not have this problem.
As of now, the version of vagrant-lxc in the 18.04 repositories seems to still have this issue. Instead of modifying the gem code, the newer version of the plugin seems to have this issue fixed. I've fixed this with gem install vagrant-lxc