robertfantini's picture

Hello

 I'm testing turnkey-lxc  using kvm  on proxmox .

when I try to create a lxc using info  from https://github.com/turnkeylinux-apps/lxc/tree/master/docs i get file not found error:


# lxc-create -n wp2 -f /etc/lxc/natbridge.conf -t turnkey -- wordpress -i /root/inithooks.conf -x http://192.168.121.1:3142
debootstrap is /usr/sbin/debootstrap
INFO [lxc-turnkey]: checking cache download in /var/cache/lxc/turnkey/debian-8-turnkey-wordpress_14.0-1_amd64.tar.gz ...
INFO [lxc-turnkey]: downloading appliance image...
converted 'http://mirror.turnkeylinux.org/turnkeylinux/images/proxmox/debian-8-turnkey-wordpress_14.0-1_amd64.tar.gz' (ANSI_X3.4-1968) -> 'http://mirror.turnkeylinux.org/turnkeylinux/images/proxmox/debian-8-turnkey-wordpress_14.0-1_amd64.tar.gz' (UTF-8)
--2016-06-26 11:52:09--  http://mirror.turnkeylinux.org/turnkeylinux/images/proxmox/debian-8-turnkey-wordpress_14.0-1_amd64.tar.gz
Resolving mirror.turnkeylinux.org (mirror.turnkeylinux.org)... 131.188.12.211, 137.226.34.46, 178.32.100.7, ...
Connecting to mirror.turnkeylinux.org (mirror.turnkeylinux.org)|131.188.12.211|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-06-26 11:52:09 ERROR 404: Not Found.

FATAL [lxc-turnkey]: failed to download 'debian-8-turnkey-wordpress_14.0-1_amd64.tar.gz'
FATAL [lxc-turnkey]: failed to install turnkey wordpress
lxc_container: container creation template for wp2 failed
lxc_container: Error creating container wp2

 

the issue is caused by debian-8-turnkey-wordpress_14.0-1_amd64.tar.gz  does not exist

debian-8-turnkey-wordpress_14.1-1_amd64.tar.gz does exist.

 

How do I change the version  lxc-create  looks for?

Forum: 
robertfantini's picture

using version: turnkey-lxc-14.1

Jeremy Davis's picture

Liraz recently cleaned up the mirror so only v14.1 is available now. But unfortunately when we upgraded the LXC appliance for v14.0 we inadvertently hardcoded it to default to download v14.0.

So the workaround is to specify the version as v14.1 as noted in the bug. E.g.:

lxc-create -n wp2 -f /etc/lxc/natbridge.conf -t turnkey -- wordpress -i /root/inithooks.conf -x http://192.168.121.1:3142 -v 14.1-jessie
John Carver's picture

While I was sleeping I see that Jeremy responded to your question.  In my investigation, I think I found two bugs. One is what Jeremy noted that the default version is set to 14.0 when is probably should have been updated to 14.1.  I think I can write a patch to set the default container verstion to be the same as the lxc appliance. It might be useful to extend the turnkey-version utility to return a list of available versions, but that is out of scope for now.  The second bug I discovered is that the /etc/turnkey_version file wasn't updated either.  I found what I thought was a 14.1 appliance that was returning 14.0-jessie as the version.

If you wish, you can fix both of these bugs by editing /etc/turnkey_version

turnkey-lxc-14.1-jessie-amd64

and /usr/share/lxc/templates/lxc-turnkey

...

# default app (core)
app_name="core"
arch=$(dpkg --print-architecture)
hostarch=${arch}
version="14.1-jessie"
inithooks="/root/inithooks.conf"

...

After installing the 14.1 version, it appears to be working, but when I try to access the site through the nginx-proxy, I get "400 Bad Request – Request Header Or Cookie Too Large" errors.  I'm still working on this one.  Please let me know if you're also getting the 400 Bad Request errors.

Information is free, knowledge is acquired, but wisdom is earned.

John Carver's picture

Forget what I said about the turnkey-version being wrong.  I accidentally reinstalled a version 14.0 appliance.  Tiny print on Proxmox and my old eyes. Guess I'll have to increase the font size. :)

Information is free, knowledge is acquired, but wisdom is earned.

Jeremy Davis's picture

Great work. I haven't had time to dig in much deeper than I already had, so thank you so much for chipping in and adding greater detail. I agree that longer term it would be really cool to check what versions are available first, but as you say that's a job for another day.

Actually, 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. I'll repost this bit on the issue tracker...

Jeremy Davis's picture

Yep that'll do it!

I still think that the best fix is to leverage the Proxmox index file which will always return the current versions (regardless of what version LXC host app you are using).

John Carver's picture

The easiest way to access a container from the LXC host is to use lxc-attach, but the container must be running first.

root@lxc ~# lxc-ls -f
NAME                    STATE    IPV4  IPV6  AUTOSTART  
------------------------------------------------------
wp2                     STOPPED  -     -     NO        

root@lxc ~# lxc-start -d -n wp2
root@lxc ~# lxc-ls -f wp2
NAME  STATE    IPV4             IPV6  AUTOSTART  
-----------------------------------------------
wp2   RUNNING  192.168.121.200  -     NO         

root@lxc ~# lxc-attach -n wp2
root@wp2 ~# turnkey-version 
turnkey-wordpress-14.1-jessie-amd64
root@wp2 ~# exit

You can connect to a stopped container using lxc-console, but it's a little harder to detach while the container is running.

 

 

Information is free, knowledge is acquired, but wisdom is earned.

Jeremy Davis's picture

And John (Blair), John (Carver) is probably our best LXC resource! He knows what he's talking about! :) He's the one that did all the heavy lifting to vastly improved our LXC appliance for v14.x!

Add new comment