I’ve noticed there is a call for testing of the current git master. I do have experiences with lxc since a couple of years, so I decided to contribute a little bit of my time.
Building deb packages
Here are my findings:
- I do build my own deb packages. Basically, I take the existing source and modify it a little bit for no special reason.
- Using the 2.0.8 packages and doing a
uupdate -u ../lxc-2.1.0.tar.xzI realized on trusty:
- there is a dependency to python3-setuptools
- there is a dependency to graphviz/dot
- there are some issues related to bash-completion
- there are some perl warnings (
Use of uninitialized value $filename in concatenation (.) or string at /usr/share/perl5/Debian/Debhelper/Dh_Lib.pm line 410.) . ignored
- there are lots of warnings related to fix-shebang (
E: dh_python3 tools:93: fix_shebang (debian/lxc1/usr/bin/lxc-cgroup): cannot parse binary file) - ignored
Error related to bash completion
... # move the bash completion profile mkdir -p debian/tmp/usr/share/bash-completion mv debian/tmp/etc/bash_completion.d debian/tmp/usr/share/bash-completion/completions mv: Aufruf von stat für »debian/tmp/etc/bash_completion.d“ nicht möglich: Datei oder Verzeichnis nicht gefunden make: *** [override_dh_install] Fehler 1 make: Verzeichnis »/home/ubuntu/build/lxc/lxc-2.1.0« wird verlassen make: *** [binary] Fehler 2 dpkg-buildpackage: Fehler: Fehler-Exitstatus von fakeroot debian/rules binary war 2
Work around: Place a hash before the
cp command. I don’t care about command completion.
Installing the deb packages
I used to use lxc-2.0.8. Upgrading to the previously built packages works without any issue.
Using the new packages
Warning: The configuration file contains legacy configuration keys.
lxc-ls --fancy shows warnings like these:
The configuration file contains legacy configuration keys. Please update your configuration file! lxc-ls: confile.c: parse_line: 1982 Unknown configuration key "lxc.pivotdir" lxc-ls: parse.c: lxc_file_for_each_line: 58 Failed to parse config: lxc.pivotdir = lxc_putold
A lot of LXC containers are missing from the list, maybe this is related to the warning?
grep -l pivotdir */config … shows lots of containers, none of which shows up on
According to this discussion, the pivotdir isn’t needed any more. So I removed the entry, now the container shows up on
lxc-ls. Starting the container still produces a warning:
uli@ulinuc:~$ sudo lxc-start -d -n ubuntu1404-64-build The configuration file contains legacy configuration keys. Please update your configuration file!
The container seems to work nevertheless…
lxc-stop -n ubuntu1404-64-build hangs forever.
Upgrading the config file using
lxc-update-config -c .../config works. I don’t see any warning any more.
lxc-stop still hangs forever, I have to use
lxc-stop -k ...
lxc-update-config doesn’t fix all config files - lxc.net.0.ipv4
I applied lxc-update-config to all my config files:
ls */config|xargs -n1 lxc-update-config -c.
Now most of the warnings are gone. Unfortunately, new warnings show up:
uli@ulinuc:~$ sudo lxc-ls --fancy lxc-ls: parse.c: lxc_file_for_each_line: 58 Failed to parse config: lxc.net.0.ipv4 = 10.0.3.100/24 lxc-ls: parse.c: lxc_file_for_each_line: 58 Failed to parse config: lxc.net.0.ipv4 = 10.0.3.7/24 The configuration file contains legacy configuration keys. Please update your configuration file! The configuration file contains legacy configuration keys. Please update your configuration file! NAME STATE AUTOSTART GROUPS IPV4 IPV6 apache-worker STOPPED 0 - - - host-only STOPPED 0 - - - ...
The warnings related to parse.c are easy to fix by modifying the config files:
- wrong: lxc.net.0.ipv4 = 10.0.3.100/24
- ok: lxc.net.0.ipv4.address = 10.0.3.100/24
Remaining legacy configuration keys
lxc-ls --fancy still gives me the warning about legacy configuration keys. Checking this with
lxc-info shows four lxc containers. They are the most recent ones I created with lxc-2.0.8.
This line produce the warnings:
lxc.rootfs.backend = btrfs
I prepended it with a hash and the warnings disappeared.
The new version works pretty OK. I think I’ll switch to the released version now and do some tests based on this.