Re: [pve-devel] Include name of template in LXC conf file?

2016-10-17 Thread Brendan Jurd
On Mon, 17 Oct 2016 at 15:26 Dietmar Maurer  wrote:

> > Is there any reason why the LXC conf file should not retain the name of
> the
> > original template file?  I am prepared to submit a patch for this, if
> that
> > would be acceptable.
>
> We only store the OS type, for example:
>
> ostype: debian
> arch: amd64
>
> Storing the original template seems misleading to me, because users
> often update the container, so the template does not contain the
> same content as the container.
>
>
Did anybody find it misleading with OpenVZ containers?

I think the normal usage of the word "template" gives exactly the right
impression here.  Just as with a document template or a database template,
you create a new thing based on a template, and then you go on to modify
the thing.  I don't see how somebody would arrive at the idea that the
container must be perpetually identical to the template.

Would it alleviate your concern if the config variable were named something
like "original_template" or "creation_template"?

I guess it would be better to use the latest available
> template instead?
>

Not necessarily.  Say for example you've got a legacy application that is
only known to work under Debian 7, or you run heavily customised templates,
or you've used one of the Virtual Appliance templates.  In any of those
cases just starting with "latest available Debian" would not be the smart
move.

Cheers,
BJ
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


Re: [pve-devel] Include name of template in LXC conf file?

2016-10-16 Thread Dietmar Maurer
> Is there any reason why the LXC conf file should not retain the name of the
> original template file?  I am prepared to submit a patch for this, if that
> would be acceptable.

We only store the OS type, for example:

ostype: debian
arch: amd64

Storing the original template seems misleading to me, because users
often update the container, so the template does not contain the 
same content as the container.

I guess it would be better to use the latest available 
template instead?

___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


[pve-devel] Include name of template in LXC conf file?

2016-10-16 Thread Brendan Jurd
Hello,

With Proxmox 3 / OpenVZ, it was possible to see the name of the template
file that was originally used to create the container, from
/etc/pve/openz/.conf.

It seems that the LXC conf file lacks this feature.  I haven't found
anywhere in Proxmox 4 which retains the name of the original template for
LXC nodes.  If such a thing exists, I'd be glad to know where to find it.

This is of interest because we want to be able to re-create an LXC
container based on its configuration file, and then bring the container up
to spec by running Ansible against it.  We are planning for disaster
recovery scenarios where it is not feasible to restore whole containers
from vzdumps.

We could keep track of the template used separately, but it would be
simpler all around if that information were stored in the LXC conf file.

Is there any reason why the LXC conf file should not retain the name of the
original template file?  I am prepared to submit a patch for this, if that
would be acceptable.

Thanks for your time,
Brendan Jurd
___
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel