[lxc-users] Help, containers gone after upgrade to 0.24

Tycho Andersen tycho.andersen at canonical.com
Thu Dec 17 17:01:56 UTC 2015


On Thu, Dec 17, 2015 at 09:00:08AM +0000, Jamie Brown wrote:
> OK – so I’ve now discovered the database file is simply sqlite – that’s a bonus.
> 
> Running SELECT * FROM containers shows the obvious problem that the “architecture” column for the older containers is set to 0, whereas the ones created in a later release (I believe 0.23) were set as 2.
> 
> I’m not sure if the solution is quite as simple as setting this value to 2, but I guess I can at least delete the entries from the database myself to tidy things up.

Yes, I think you can just set the value to 2.

It looks like this is probably a bug in the upgrade process (hence no
warning in the release notes :); we should do something like set every
architecture that was previously UNKNOWN to whatever the current arch
is in order to allow them to start.

> I also suppose the architecture value matches a value in the following enumeration;
> 
> const (
> ARCH_UNKNOWN                     = 0
> ARCH_32BIT_INTEL_X86             = 1
> ARCH_64BIT_INTEL_X86             = 2
> ARCH_32BIT_ARMV7_LITTLE_ENDIAN   = 3
> ARCH_64BIT_ARMV8_LITTLE_ENDIAN   = 4
> ARCH_32BIT_POWERPC_BIG_ENDIAN    = 5
> ARCH_64BIT_POWERPC_BIG_ENDIAN    = 6
> ARCH_64BIT_POWERPC_LITTLE_ENDIAN = 7
> ARCH_64BIT_S390_BIG_ENDIAN       = 8
> )
> 
> Jamie
> 
> From: Jamie Brown <Jamie.Brown at mpec.co.uk<mailto:Jamie.Brown at mpec.co.uk>>
> Date: Thursday, 17 December 2015 at 08:33
> To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>>
> Subject: Re: Help, containers gone after upgrade to 0.24
> 
> I’ve (at least) managed to get my containers back up and running by creating new ones and copying the file stores.
> 
> However, the annoying thing is I can’t even delete the old containers even though they don’t appear in the list. Any command I try to issue just returns the architecture not supported message. But it won’t let me re-use the container name because it (correctly) believes it already exists.
> 
> So for now I’m stuck with all my containers being called <container_name>1.
> 
> Whilst I appreciate the frequent releases and that we’re still <1.0, a warning in the release notes about this would have been very helpful!
> 
> Is there a way to somehow force LXC to delete the incompatible containers? This is one of the major issues with the mysterious “lxd.db” file, unless I’m mistaken there is no easy way to open the database and tidy things up when things don’t quite go to plan. I’m guessing if I could read and edit this file, I probably could have manually set the architecture for the containers and got them back up and running?
> 
> Cheers,
> 
> Jamie
> 
> From: Jamie Brown <Jamie.Brown at mpec.co.uk<mailto:Jamie.Brown at mpec.co.uk>>
> Date: Thursday, 17 December 2015 at 08:05
> To: LXC users mailing-list <lxc-users at lists.linuxcontainers.org<mailto:lxc-users at lists.linuxcontainers.org>>
> Subject: Help, containers gone after upgrade to 0.24
> 
> Hello,
> 
> I’ve just upgraded to 0.24 from 0.23 and most of my containers have disappeared from lxc list and are not starting up. The two that remain in the list were those added most recently (probably in 0.23), the others were added in an earlier release.
> 
> I guess there is a problem with backwards compatibility with a configuration.
> 
> If I run lxc config show <container> on a missing container, it returns;
> 
> error: Architecture isn't supported: 0
> 
> Looking at the lxc.conf in the logs directories, there are some missing properties for these containers verses the newer containers, one of these properties being lxc.arch. However, I don’t know how I can set these properties for the missing containers.
> 
> The following properties are missing from the older lxc.conf files:
> 
>   *   Lxc.arch
>   *   Lxc.hook.pre-start
>   *   Lxc.hook.post-stop
> 
> Please help!
> 
> Many thanks,
> 
> Jamie

> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list