Closed JedMeister closed 7 years ago
So this explains errors like :
root@lxc ~# lxc-create -n fs1 -f /etc/lxc/bridged.conf -t turnkey -- fileserver
debootstrap is /usr/sbin/debootstrap
INFO [lxc-turnkey]: checking cache download in /var/cache/lxc/turnkey/debian-8-turnkey-fileserver_14.0-1_amd64.tar.gz ...
INFO [lxc-turnkey]: downloading appliance image...
converted 'http://mirror.turnkeylinux.org/turnkeylinux/images/proxmox/debian-8-turnkey-fileserver_14.0-1_amd64.tar.gz' (ANSI_X3.4-1968) -> 'http://mirror.turnkeylinux.org/turnkeylinux/images/proxmox/debian-8-turnkey-fileserver_14.0-1_amd64.tar.gz' (UTF-8)
--2016-06-03 12:30:29-- http://mirror.turnkeylinux.org/turnkeylinux/images/proxmox/debian-8-turnkey-fileserver_14.0-1_amd64.tar.gz
Resolving mirror.turnkeylinux.org (mirror.turnkeylinux.org)... 137.226.34.46, 178.32.100.7, 131.188.12.211, ...
Connecting to mirror.turnkeylinux.org (mirror.turnkeylinux.org)|137.226.34.46|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-06-03 12:30:30 ERROR 404: Not Found.
FATAL [lxc-turnkey]: failed to download 'debian-8-turnkey-fileserver_14.0-1_amd64.tar.gz'
FATAL [lxc-turnkey]: failed to install turnkey fileserver
lxc_container: container creation template for fs1 failed
lxc_container: Error creating container fs1
All appliances seem to fail - these are my failed tests (after having created the /root/inithooks.conf
file) :
lxc-create -n fs1 -f /etc/lxc/bridged.conf -t turnkey -- fileserver
lxc-create -n nginxphp1 -f /etc/lxc/bridged.conf -t turnkey -- nginx-php-fastcgi
lxc-create -n canvas1 -f /etc/lxc/bridged.conf -t turnkey -- canvas
→ Is there any way to work around this in the meantime ?
@Paulmicha - yes exactly! And the workaround is to explicitly state the version as 14.1. E.g.
lxc-create -n fs1 -f /etc/lxc/bridged.conf -t turnkey -- fileserver -v 14.1-jessie
FWIW here are the docs: https://github.com/turnkeylinux-apps/lxc/tree/master/docs
I reckon the best way to go would be to leverage the Proxmox aplinfo.dat file. It is (re)created whenever we update the images. It is a fairly simple text file which provides a list of the current appliance library for Proxmox so would suit our purposes nicely.
FYI, I fixed this in 14.2 release.
Hey @Dude4Linux - thanks for that. Sorry I haven't merged that yet... I've been having a battle with the OVA builds which has sidetracked things a little. I do still need to update the Amazon Marketplace too, but I'm hoping that won't take too long.
Either way I'll hopefully be starting work on the next batch of ISOs really soon so will be looking at you code once I get to that stage.
Regarding this issue, how did you resolve it? (I guess I could check, but I don't want to sidetrack myself too much right now). Did you just update the version string? Or are you using the Proxmox aplinfo.dat
file (which Proxmox uses to know which versions are available for download? Or something else?
IMO using the Proxmox file would be the superior option; as then the LXC appliance will continue to work, even after we update the versions!
@JedMeister - I had to check and found that I had taken the easy route and just updated the hard-coded version number. I wasn't aware of aplinfo.dat but having the version updated automatically is a great idea.
I just pushed an update that sets the default container version to the host appliances version (turnkey-version)
version=$(cat /etc/turnkey_version | cut -d'-' -f3,4)
While I'm thinking of it, there is another change that I wanted to call to your attention. While revising the LXC appliance for 14.2, I noticed that the range of MAC addresses being used for containers was from the globally administered set of addresses. Thinking that the proper way was to issue locally administered addresses, I made a change to use local unicast addresses instead. See reference here.
* b85c476 - issue local, unicast MAC addresses instead of global addresses (4 weeks ago) <Dude4Linux
After making the change, I happened to read another post where someone described a problem where locally administered MAC addresses were being exposed to the Internet via bridging. It got me wondering if I had made a mistake and that certain use cases might require globally administered addresses.
Hey @Dude4Linux - I've assigned @qrntz to have a look at this one. Sorry I've been so slow on my code review of your current PR. Now that Anton is back on board, I'll handball all of that to him. He'll look over your existing PR and add a script to work out the version (from the proxmox index file).
As for the MAC address, you raise a good question and TBH, I'm not really sure of the answer. I'll get Anton to have a look at that too (sorry Anton...).
This issue was closed by John's PR (that I just merged). However, it doesn't implement the plan to pull the versions from the Proxmox aplinfo.dat
file. I've decided to add that as a feature request for v15.0.
@JedMeister I just noticed that in my hurry to patch the version problem, I neglected to update all the places where the default version is mentioned. Grepping through the tkldev files I see that docs/README.rst and overlay/var/www/index.html are still at "default: 14.0-jessie" and overlay/usr/share/lxc/templates/lxc-turnkey is hard coded "default: 14.2-jessie". Presumably all three should be changed to display the computed version. Since you have already merged my changes for 14.2, I'll wait to hear from you if you want me to address this. Hope it's not too late to make the 14.2 release.
Hey @Dude4Linux - sorry for slow reply.
Unfortunately I've already published the v14.2 LXC appliance earlier this week (see the blog post). I'm in the process of the final clean up of v14.2 with the last few appliances (inc OpenVAS) almost complete (ISOs built already, just need to build optimized builds).
We should probably fix the README asap (and I'll fix the website). I'll open a new issue for that.
In the meantime, we should document what needs fixing so that v14.2 end users can adjust if they want. Assuming that we include #878 for v15.0 - we should consider rewording that stuff anyway.
FWIW, this will fix v14.2 index.html
:
sed -i "s|14.0-jessie|14.2-jessie|" /var/www/index.html
update: We're now going to use the Proxmox
aplinfo.dat
file (which Proxmox uses to know which versions are available for download).I.e. LXC v14.1 should default to downloading v14.1 images. It appears that currently the version is hardcoded somewhere as by default the v14.1 appliance is trying to download v14.0 appliances (which now no longer exist on the mirror).