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

Problems after upgrade to ubuntu 17.10 #452

Closed
rvanlaar opened this issue Jan 25, 2018 · 12 comments
Closed

Problems after upgrade to ubuntu 17.10 #452

rvanlaar opened this issue Jan 25, 2018 · 12 comments
Labels

Comments

@rvanlaar
Copy link

rvanlaar commented Jan 25, 2018

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

@rvanlaar
Copy link
Author

rvanlaar commented Jan 25, 2018

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!

@ccope
Copy link
Contributor

ccope commented Jan 25, 2018

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).

@ghost
Copy link

ghost commented Jan 26, 2018

@rvanlaar did you try the lxc-update-config program that comes with LXC? It's a much more reliable way to upgrade your config.

@nfanta
Copy link

nfanta commented Jan 30, 2018

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.

@ghost
Copy link

ghost commented Jan 30, 2018

@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.

@kevcenteno
Copy link

This is still an issue with 2.1.1 regardless if the box was updated with lxc-update-config

@ghost
Copy link

ghost commented Mar 25, 2018

@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?

@kevcenteno
Copy link

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

@kevcenteno
Copy link

I also tested kevcenteno@e2a2c42 using LXC 3.0.0beta

@ghost
Copy link

ghost commented Mar 25, 2018

@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.

@btilma
Copy link

btilma commented Oct 24, 2018

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

@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.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants