[lxc-users] LXD upgrade error: no such column: creation_date
Stéphane Graber
stgraber at ubuntu.com
Thu Feb 11 23:26:50 UTC 2016
On Thu, Feb 11, 2016 at 07:40:55PM -0300, Hudson FAS wrote:
> Hello, everybody
>
> After upgrade ubuntu 15.10, my LXD don't start:
>
> systemctl status lxd.service
> ● lxd.service - Container hypervisor based on LXC
> Loaded: loaded (/lib/systemd/system/lxd.service; indirect; vendor
> preset: enabled)
> Active: activating (start-post) (Result: exit-code) since Thu 2016-02-11
> 19:20:39 BRT; 46s ago
> Process: 11522 ExecStart=/usr/bin/lxd --group lxd
> --logfile=/var/log/lxd/lxd.log (code=exited, status=1/FAILURE)
> Main PID: 11522 (code=exited, status=1/FAILURE); : 11523 (lxd)
> Memory: 404.0K
> CPU: 16ms
> CGroup: /system.slice/lxd.service
>
> Feb 11 19:20:39 vmserv systemd[1]: Starting Container hypervisor based on
> LXC...
> Feb 11 19:20:39 vmserv lxd[11522]: t=2016-02-11T19:20:39-0300 lvl=warn
> msg="CGroup memory swap accounting is disabled, swap limits will be
> ignored."
> Feb 11 19:20:39 vmserv lxd[11522]: error: no such column: creation_date
> Feb 11 19:20:39 vmserv systemd[1]: lxd.service: Main process exited,
> code=exited, status=1/FAILURE
>
> Last Log LXD:
> t=2016-02-11T19:28:12-0300 lvl=info msg="LXD is starting" path=/var/lib/lxd
> t=2016-02-11T19:28:12-0300 lvl=warn msg="CGroup memory swap accounting is
> disabled, swap limits will be ignored."
> t=2016-02-11T19:28:12-0300 lvl=info msg="Default uid/gid map:"
> t=2016-02-11T19:28:12-0300 lvl=info msg=" - u 0 165536 65536"
> t=2016-02-11T19:28:12-0300 lvl=info msg=" - g 0 165536 65536"
>
>
> Ubuntu:
>
> DISTRIB_ID=Ubuntu
> DISTRIB_RELEASE=15.10
> DISTRIB_CODENAME=wily
> DISTRIB_DESCRIPTION="Ubuntu 15.10"
>
> Kernel:
> Linux vmserv 4.2.0-27-generic #32-Ubuntu SMP Fri Jan 22 04:49:08 UTC 2016
> x86_64 x86_64 x86_64 GNU/Linux
>
> LXD/LXC:
> ii liblxc1
> 2.0.0~beta2-0ubuntu2~ubuntu15.10.1~ppa1 amd64 Linux Containers
> userspace tools (library)
> ii lxc
> 2.0.0~beta2-0ubuntu2~ubuntu15.10.1~ppa1 amd64 Linux Containers
> userspace tools
> ii lxc-templates 2.0.0~beta2-0ubuntu2~ubuntu15.10.1~ppa1
> amd64 Linux Containers userspace tools (templates)
> ii lxcfs
> 2.0.0~beta1-0ubuntu1~ubuntu15.10.1~ppa1 amd64 FUSE based filesystem
> for LXC
> ii lxd
> 2.0.0~beta2-0ubuntu1~ubuntu15.10.1~ppa1 amd64 Container hypervisor
> based on LXC - daemon
> ii lxd-client
> 2.0.0~beta2-0ubuntu1~ubuntu15.10.1~ppa1 amd64 Container hypervisor
> based on LXC - client
> ii lxd-tools
> 2.0.0~beta2-0ubuntu1~ubuntu15.10.1~ppa1 amd64 Container hypervisor
> based on LXC - extra tools
> ii python3-lxc 2.0.0~beta2-0ubuntu2~ubuntu15.10.1~ppa1
> amd64 Linux Containers userspace tools (Python 3.x bindings)
>
> Can everybody help me ?
Did you have a crash during the upgrade?
It seems like your LXD thinks that it is at revision 22 of the DB schema
when it appears that it's only at revision 21, so missing the
creation_date field.
As the DB field and schema version are updated in a single SQL
transaction, I'm a bit confused as to how this happened.
Anyway, the following should fix it for you:
sudo sqlite3 /var/lib/lxd/lxd.db "ALTER TABLE containers ADD COLUMN creation_date DATETIME NOT NULL DEFAULT 0;"
You may need to install the sqlite3 package.
--
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160211/66917a14/attachment.sig>
More information about the lxc-users
mailing list