<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 20, 2013 at 4:07 PM, Serge Hallyn <span dir="ltr"><<a href="mailto:serge.hallyn@ubuntu.com" target="_blank">serge.hallyn@ubuntu.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Quoting Jay Taylor (<a href="mailto:jay@jaytaylor.com">jay@jaytaylor.com</a>):<br>
> Hey Serge,<br>
><br>
><br>
> On Tue, Aug 20, 2013 at 1:55 PM, Serge Hallyn <<a href="mailto:serge.hallyn@ubuntu.com">serge.hallyn@ubuntu.com</a>>wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > one idea that has been brought up is to support 'aliases'.  So if you're<br>
> > locally building a daily pristine container, say at 'c-2013-08-20',<br>
> > you might want to then have a 'c-latest' alias or link pointing to the<br>
> > latest container, so you can always just<br>
> ><br>
> >         sudo lxc-clone -o c-latest -n test1 -s<br>
> ><br>
> > The most obvious idea would be to use a symbolic link.  However, while<br>
> > that mostly works, it's actually not perfect - lxc_container_new()<br>
> > will be called with the name you passed in (c-latest), not with the<br>
> > symlinked name.<br>
> ><br>
> > Another idea would be to support a $lxcpath/$lxcname/config consisting<br>
> > of only 'lxc.alias = c-2013-0820'.<br>
> ><br>
> > Do people have any other ideas?<br>
><br>
><br>
> > I'm thinking symbolic link may be the simplest thing to support -<br>
> > lxc_container_new() could immediately readlink() to get the real<br>
> > container name.<br>
> ><br>
><br>
> I like the idea of using a symlink - it'd make it simple and intuitive to<br>
> understand what's going on.<br>
><br>
> What would happen when you run lxc-destroy on an alias?  Will it destroy<br>
> the symlink or the container being pointed to?<br>
<br>
</div>Good question :)  The easier thing would be to make it destroy what is<br>
being pointed to.  But I'm not sure right now - is that behavior weird,<br>
or useful?<br></blockquote><div><br></div><div>I'd prefer that it destroys the symlink - just like when when you do `rm some_symlink` in a shell, it doesn't do anything to whatever is being pointed at.</div></div>

<br></div></div>