LXD snap: Call for testing

Introduction

We’ve been working pretty hard on improving the LXD snap package.
Our goal was to make it to the point where we’re comfortable with users running it in production and can support it in the same way we support people using native packages.

With LXD 2.17, this should now be the case and we expect the LXD experience to be identical whether you’re using our snap package or a native package from your distribution.

However before we start updating documentation and push more people towards the snap, we’d like to get some user feedback.

Why a snap?

The snap packaging format lets us as the upstream publish a tested, blessed build of LXD and anything that it needs which can be used on a wide range of Linux distributions.

This makes it easy to get the exact same experience regardless of Linux distribution and greatly simplifies support on our end as we can reproduce bit for bit any installation.

Moving forward, we will be phasing out our Ubuntu PPAs and then our backports to older Ubuntu releases. Both of those use cases will be transitioned over to the snap.

This will significantly reduce the amount of time we have to spend on building and testing all of those packages and the machinery used to publish them.

Channels and tracks

For the LXD snap, we use the following channels:

  • edge: Automatically built from upstream “git” after automated CI
  • candidate: Staging area for stable, usually about a 24h delay
  • stable: Latest LXD release

The default track is “latest” which means the latest LXD feature release (2.17 at time of writing).
We also have a second track called “2.0” which contains builds of the LXD 2.0 LTS release.
This track won’t be production ready with the snap until LXD 2.0.11 is released.

The only channels we’ll be officially supporting are our “stable” channels.

Installing the snap

First you’ll want to make sure that you don’t have an old LXD installation around.
Wipe your existing LXD installation clean, then remove its packages from your system.

Then install snapd for your Linux distribution, you can find instructions here.

Once everything is clean, you can install LXD with:

snap install lxd

After a few seconds (LXD needs to generate some certificates), you can then run:

lxd init

And then start using LXD.

asciicast

Snap specific configuration

The LXD snap has a few configuration options which you can set through “snap set”.

  • daemon.debug [default=“false”]: If set to “true”, enables LXD debug logging
  • daemon.group [default=“lxd”]: What group should be allowed to interact with LXD
  • ceph.builtin [default=“false”]: If set to “true”, a separate ceph configuration directory will be used for the snap
  • openvswitch.builtin [default=“false”]: If set to “true”, spawn a LXD-specific Open vSwitch daemon

For example, to enable debugging, do:

snap set lxd daemon.debug=true
systemctl reload snap.lxd.daemon

Next steps

Our plan for the next few weeks/months regarding the snap is:

  • Get the “2.0” track to production ready state too (with the upcoming LXD 2.0.11).
  • Slowly get our PPA users to move to the snap too.
  • Deprecated our PPAs, saving us quite a bit of effort in maintaining those.
  • Slowly get our backports users to move the snap too.

The transition from deb to snap will be done through a script which will let you move your existing environment to the snap without loosing anything. We’ll initially just prompt users on package upgrade, suggesting that they switch to the snap. Then after a few months of that, will just auto-transition the remaining users before we deprecate the deb package.

For those using LXD in Ubuntu and who aren’t using our PPA or backports, nothing will change. We are committed to supporting those packages until the Ubuntu release reaches its end of life.

Feedback

Tell us how your snap experience felt.
Either by choosing one of the options below, or by replying to this post with your experience.

  • Worked perfectly
  • Worked but needed some adjustments
  • Started but couldn’t launch containers
  • Installed but wouldn’t start
  • Failed to install

0 voters

Useful information to include in a comment:

  • Linux distribution (lsb_release -a)
  • Architecture (uname -a)
  • Version of snapd (snap version)
  • Version of the LXD snap (snap list)
  • Storage backend(s) in use
  • Content of /var/snap/lxd/common/lxd/logs/lxd.log

Thanks!

2 Likes

Thanks for this. One of the things that were showstoppers for me are fixed with this relese especially the bash-completion. The LXD 2.17 snap has been working fine for me since yesterday. Added the logs incase they are of use.

om26er@chaotic:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.3 LTS
Release:	16.04
Codename:	xenial
om26er@chaotic:~$ uname -a
Linux chaotic 4.10.0-32-generic #36~16.04.1-Ubuntu SMP Wed Aug 9 09:19:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
om26er@chaotic:~$ snap version
snap    2.26.14
snapd   2.26.14
series  16
ubuntu  16.04
kernel  4.10.0-32-generic
om26er@chaotic:~$ cat /var/snap/lxd/common/lxd/logs/lxd.log
lvl=info msg="LXD 2.17 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-08-23T19:35:26+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-08-23T19:35:26+0000
lvl=info msg="Kernel uid/gid map:" t=2017-08-23T19:35:26+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-08-23T19:35:26+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-08-23T19:35:26+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-08-23T19:35:26+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-08-23T19:35:26+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-08-23T19:35:26+0000
lvl=info msg="Expiring log files" t=2017-08-23T19:35:26+0000
lvl=info msg="Done expiring log files" t=2017-08-23T19:35:26+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-08-23T19:35:26+0000
lvl=info msg="LXD isn't socket activated" t=2017-08-23T19:35:30+0000
lvl=info msg="REST API daemon:" t=2017-08-23T19:35:30+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-23T19:35:30+0000
lvl=info msg="Pruning expired images" t=2017-08-23T19:35:30+0000
lvl=info msg="Done pruning expired images" t=2017-08-23T19:35:30+0000
lvl=info msg="Updating images" t=2017-08-23T19:35:30+0000
lvl=info msg="Updating instance types" t=2017-08-23T19:35:30+0000
lvl=info msg="Done updating images" t=2017-08-23T19:35:30+0000
lvl=info msg="Done updating instance types" t=2017-08-23T19:35:44+0000
lvl=info msg="Asked to shutdown by API, shutting down containers." t=2017-08-23T19:39:14+0000
lvl=info msg="Stopping REST API handler:" t=2017-08-23T19:39:14+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-23T19:39:14+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-08-23T19:39:14+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-08-23T19:39:14+0000
lvl=info msg="Unmounting temporary filesystems" t=2017-08-23T19:39:14+0000
lvl=info msg="Done unmounting temporary filesystems" t=2017-08-23T19:39:14+0000
lvl=info msg="Closing the database" t=2017-08-23T19:39:14+0000
lvl=info msg="Saving simplestreams cache" t=2017-08-23T19:39:14+0000
lvl=info msg="Saved simplestreams cache" t=2017-08-23T19:39:14+0000
lvl=info msg="LXD 2.17 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-08-23T19:40:27+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-08-23T19:40:27+0000
lvl=info msg="Kernel uid/gid map:" t=2017-08-23T19:40:27+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-08-23T19:40:27+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-08-23T19:40:27+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-08-23T19:40:27+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-08-23T19:40:27+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-08-23T19:40:27+0000
lvl=info msg="Expiring log files" t=2017-08-23T19:40:27+0000
lvl=info msg="Done expiring log files" t=2017-08-23T19:40:27+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-08-23T19:40:27+0000
lvl=info msg="LXD isn't socket activated" t=2017-08-23T19:40:27+0000
lvl=info msg="REST API daemon:" t=2017-08-23T19:40:27+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-23T19:40:27+0000
lvl=info msg="Updating images" t=2017-08-23T19:40:27+0000
lvl=info msg="Pruning expired images" t=2017-08-23T19:40:27+0000
lvl=info msg="Done pruning expired images" t=2017-08-23T19:40:27+0000
lvl=info msg="Done updating images" t=2017-08-23T19:40:27+0000
lvl=info msg="Updating instance types" t=2017-08-23T19:40:27+0000
lvl=info msg="Done updating instance types" t=2017-08-23T19:40:37+0000
lvl=info msg="Asked to shutdown by API, shutting down containers." t=2017-08-23T19:45:22+0000
lvl=info msg="Stopping REST API handler:" t=2017-08-23T19:45:22+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-23T19:45:22+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-08-23T19:45:22+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-08-23T19:45:22+0000
lvl=info msg="Unmounting temporary filesystems" t=2017-08-23T19:45:22+0000
lvl=info msg="Done unmounting temporary filesystems" t=2017-08-23T19:45:22+0000
lvl=info msg="Closing the database" t=2017-08-23T19:45:22+0000
lvl=info msg="Saving simplestreams cache" t=2017-08-23T19:45:22+0000
lvl=info msg="Saved simplestreams cache" t=2017-08-23T19:45:22+0000
lvl=info msg="LXD 2.17 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-08-23T19:45:46+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-08-23T19:45:46+0000
lvl=info msg="Kernel uid/gid map:" t=2017-08-23T19:45:46+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-08-23T19:45:46+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-08-23T19:45:46+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-08-23T19:45:46+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-08-23T19:45:46+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-08-23T19:45:46+0000
lvl=info msg="Expiring log files" t=2017-08-23T19:45:47+0000
lvl=info msg="Done expiring log files" t=2017-08-23T19:45:47+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-08-23T19:45:47+0000
lvl=info msg="LXD isn't socket activated" t=2017-08-23T19:45:47+0000
lvl=info msg="REST API daemon:" t=2017-08-23T19:45:47+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-23T19:45:47+0000
lvl=info msg="Pruning expired images" t=2017-08-23T19:45:47+0000
lvl=info msg="Done pruning expired images" t=2017-08-23T19:45:47+0000
lvl=info msg="Updating instance types" t=2017-08-23T19:45:47+0000
lvl=info msg="Updating images" t=2017-08-23T19:45:47+0000
lvl=info msg="Done updating images" t=2017-08-23T19:45:47+0000
lvl=warn msg="Failed to update instance types: Get https://images.linuxcontainers.org/meta/instance-types/.yaml: lookup images.linuxcontainers.org on [::1]:53: read udp [::1]:44678->[::1]:53: read: connection refused" t=2017-08-23T19:45:47+0000
lvl=info msg="Received 'terminated signal', exiting." t=2017-08-24T05:47:57+0000
lvl=info msg="Stopping REST API handler:" t=2017-08-24T05:47:57+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-24T05:47:57+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-08-24T05:47:57+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-08-24T05:47:57+0000
lvl=info msg="Unmounting temporary filesystems" t=2017-08-24T05:47:57+0000
lvl=info msg="Done unmounting temporary filesystems" t=2017-08-24T05:47:57+0000
lvl=info msg="Closing the database" t=2017-08-24T05:47:57+0000
lvl=info msg="Saving simplestreams cache" t=2017-08-24T05:47:57+0000
lvl=info msg="Saved simplestreams cache" t=2017-08-24T05:47:57+0000
lvl=info msg="LXD 2.17 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-08-24T05:48:00+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-08-24T05:48:00+0000
lvl=info msg="Kernel uid/gid map:" t=2017-08-24T05:48:00+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-08-24T05:48:00+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-08-24T05:48:00+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-08-24T05:48:00+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-08-24T05:48:00+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-08-24T05:48:00+0000
lvl=info msg="Expiring log files" t=2017-08-24T05:48:00+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-08-24T05:48:00+0000
lvl=info msg="Done expiring log files" t=2017-08-24T05:48:00+0000
lvl=info msg="LXD isn't socket activated" t=2017-08-24T05:48:00+0000
lvl=info msg="REST API daemon:" t=2017-08-24T05:48:00+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-24T05:48:00+0000
lvl=info msg="Pruning expired images" t=2017-08-24T05:48:00+0000
lvl=info msg="Updating images" t=2017-08-24T05:48:00+0000
lvl=info msg="Done updating images" t=2017-08-24T05:48:00+0000
lvl=info msg="Done pruning expired images" t=2017-08-24T05:48:00+0000
lvl=info msg="Updating instance types" t=2017-08-24T05:48:00+0000
lvl=info msg="Done updating instance types" t=2017-08-24T05:48:13+0000
lvl=info msg="Updating images" t=2017-08-24T11:48:00+0000
lvl=info msg="Done updating images" t=2017-08-24T11:48:00+0000
lvl=info msg="Creating ZFS storage pool \"default\"." t=2017-08-24T14:58:33+0000
lvl=info msg="Created ZFS storage pool \"default\"." t=2017-08-24T14:58:33+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-24T14:58:43+0000
alias=16.04 image=58f90cbf68927c3fc43e6ee1386446a04f3d8068c1a75a291339cb2be01dec08 lvl=info msg="Downloading image" operation=15813c91-7598-4397-a92f-ef152f34faba server=https://cloud-images.ubuntu.com/releases t=2017-08-24T15:00:07+0000 trigger=/1.0/operations/15813c91-7598-4397-a92f-ef152f34faba
alias=16.04 image=58f90cbf68927c3fc43e6ee1386446a04f3d8068c1a75a291339cb2be01dec08 lvl=info msg="Downloading image" operation=adef6e27-561e-454a-84c0-1d7be3d68d91 server=https://cloud-images.ubuntu.com/releases t=2017-08-24T15:12:37+0000 trigger=/1.0/operations/adef6e27-561e-454a-84c0-1d7be3d68d91
lvl=info msg="Asked to shutdown by API, shutting down containers." t=2017-08-24T15:19:50+0000
lvl=info msg="Stopping REST API handler:" t=2017-08-24T15:19:51+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-24T15:19:51+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-08-24T15:19:51+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-08-24T15:19:51+0000
lvl=info msg="Unmounting temporary filesystems" t=2017-08-24T15:19:51+0000
lvl=info msg="Done unmounting temporary filesystems" t=2017-08-24T15:19:51+0000
lvl=info msg="Closing the database" t=2017-08-24T15:19:51+0000
lvl=info msg="Saving simplestreams cache" t=2017-08-24T15:19:51+0000
lvl=info msg="Saved simplestreams cache" t=2017-08-24T15:19:51+0000
lvl=info msg="LXD 2.17 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-08-24T15:19:57+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-08-24T15:19:57+0000
lvl=info msg="Kernel uid/gid map:" t=2017-08-24T15:19:57+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-08-24T15:19:57+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-08-24T15:19:57+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-08-24T15:19:57+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-08-24T15:19:57+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-08-24T15:19:57+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-24T15:19:57+0000
lvl=info msg="Expiring log files" t=2017-08-24T15:19:57+0000
lvl=info msg="Done expiring log files" t=2017-08-24T15:19:57+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-08-24T15:19:57+0000
lvl=info msg="LXD isn't socket activated" t=2017-08-24T15:19:57+0000
lvl=info msg="REST API daemon:" t=2017-08-24T15:19:57+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-24T15:19:57+0000
lvl=info msg="Pruning expired images" t=2017-08-24T15:19:57+0000
lvl=info msg="Updating instance types" t=2017-08-24T15:19:57+0000
lvl=info msg="Done pruning expired images" t=2017-08-24T15:19:57+0000
lvl=info msg="Updating images" t=2017-08-24T15:19:57+0000
lvl=info msg="Done updating images" t=2017-08-24T15:19:57+0000
lvl=warn msg="Failed to update instance types: Get https://images.linuxcontainers.org/meta/instance-types/.yaml: lookup images.linuxcontainers.org on 127.0.1.1:53: server misbehaving" t=2017-08-24T15:20:02+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-24T15:20:03+0000
alias=16.04 image=58f90cbf68927c3fc43e6ee1386446a04f3d8068c1a75a291339cb2be01dec08 lvl=info msg="Downloading image" operation=88d2be44-567c-414b-8008-c045346dd66c server=https://cloud-images.ubuntu.com/releases t=2017-08-24T15:20:07+0000 trigger=/1.0/operations/88d2be44-567c-414b-8008-c045346dd66c
alias=16.04 image=58f90cbf68927c3fc43e6ee1386446a04f3d8068c1a75a291339cb2be01dec08 lvl=info msg="Image downloaded" operation=88d2be44-567c-414b-8008-c045346dd66c server=https://cloud-images.ubuntu.com/releases t=2017-08-24T15:21:25+0000 trigger=/1.0/operations/88d2be44-567c-414b-8008-c045346dd66c
ephemeral=false lvl=info msg="Creating container" name=stunning-camel t=2017-08-24T15:21:25+0000
ephemeral=false lvl=info msg="Created container" name=stunning-camel t=2017-08-24T15:21:25+0000
lvl=warn msg="Unable to update backup.yaml at this time." name=stunning-camel t=2017-08-24T15:21:37+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Starting container" name=stunning-camel stateful=false t=2017-08-24T15:21:37+0000 used=1970-01-01T00:00:00+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Started container" name=stunning-camel stateful=false t=2017-08-24T15:21:37+0000 used=1970-01-01T00:00:00+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shutting down container" name=stunning-camel t=2017-08-24T15:33:24+0000 timeout=-1s used=2017-08-24T15:21:37+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shut down container" name=stunning-camel t=2017-08-24T15:33:28+0000 timeout=-1s used=2017-08-24T15:21:37+0000
lvl=warn msg="Unable to update backup.yaml at this time." name=stunning-camel t=2017-08-24T15:33:28+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Starting container" name=stunning-camel stateful=false t=2017-08-24T15:33:28+0000 used=2017-08-24T15:21:37+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Started container" name=stunning-camel stateful=false t=2017-08-24T15:33:28+0000 used=2017-08-24T15:21:37+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shutting down container" name=stunning-camel t=2017-08-24T15:34:26+0000 timeout=-1s used=2017-08-24T15:33:28+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shut down container" name=stunning-camel t=2017-08-24T15:34:30+0000 timeout=-1s used=2017-08-24T15:33:28+0000
lvl=warn msg="Unable to update backup.yaml at this time." name=stunning-camel t=2017-08-24T15:34:30+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Starting container" name=stunning-camel stateful=false t=2017-08-24T15:34:30+0000 used=2017-08-24T15:33:28+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Started container" name=stunning-camel stateful=false t=2017-08-24T15:34:30+0000 used=2017-08-24T15:33:28+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shutting down container" name=stunning-camel t=2017-08-24T15:35:46+0000 timeout=-1s used=2017-08-24T15:34:30+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shut down container" name=stunning-camel t=2017-08-24T15:35:49+0000 timeout=-1s used=2017-08-24T15:34:30+0000
lvl=warn msg="Unable to update backup.yaml at this time." name=stunning-camel t=2017-08-24T15:35:49+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Starting container" name=stunning-camel stateful=false t=2017-08-24T15:35:49+0000 used=2017-08-24T15:34:30+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Started container" name=stunning-camel stateful=false t=2017-08-24T15:35:49+0000 used=2017-08-24T15:34:30+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shutting down container" name=stunning-camel t=2017-08-24T15:36:56+0000 timeout=-1s used=2017-08-24T15:35:49+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shut down container" name=stunning-camel t=2017-08-24T15:37:00+0000 timeout=-1s used=2017-08-24T15:35:49+0000
lvl=warn msg="Unable to update backup.yaml at this time." name=stunning-camel t=2017-08-24T15:37:00+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Starting container" name=stunning-camel stateful=false t=2017-08-24T15:37:00+0000 used=2017-08-24T15:35:49+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Started container" name=stunning-camel stateful=false t=2017-08-24T15:37:00+0000 used=2017-08-24T15:35:49+0000
lvl=info msg="Asked to shutdown by API, shutting down containers." t=2017-08-24T17:08:18+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shutting down container" name=stunning-camel t=2017-08-24T17:08:18+0000 timeout=30s used=2017-08-24T15:37:00+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shut down container" name=stunning-camel t=2017-08-24T17:08:23+0000 timeout=30s used=2017-08-24T15:37:00+0000
lvl=warn msg="Unable to update backup.yaml at this time." name=stunning-camel t=2017-08-24T17:08:23+0000
lvl=info msg="Stopping REST API handler:" t=2017-08-24T17:08:23+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-24T17:08:23+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-08-24T17:08:23+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-08-24T17:08:23+0000
lvl=info msg="Unmounting temporary filesystems" t=2017-08-24T17:08:23+0000
lvl=info msg="Done unmounting temporary filesystems" t=2017-08-24T17:08:23+0000
lvl=info msg="Closing the database" t=2017-08-24T17:08:23+0000
lvl=info msg="Saving simplestreams cache" t=2017-08-24T17:08:23+0000
lvl=info msg="Saved simplestreams cache" t=2017-08-24T17:08:23+0000
lvl=info msg="LXD 2.17 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-08-24T17:08:45+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-08-24T17:08:45+0000
lvl=info msg="Kernel uid/gid map:" t=2017-08-24T17:08:45+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-08-24T17:08:45+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-08-24T17:08:45+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-08-24T17:08:45+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-08-24T17:08:45+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-08-24T17:08:45+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-24T17:08:46+0000
lvl=info msg="Expiring log files" t=2017-08-24T17:08:46+0000
lvl=info msg="Done expiring log files" t=2017-08-24T17:08:46+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-08-24T17:08:46+0000
lvl=info msg="LXD isn't socket activated" t=2017-08-24T17:08:46+0000
lvl=info msg="REST API daemon:" t=2017-08-24T17:08:46+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-24T17:08:46+0000
lvl=info msg="Updating images" t=2017-08-24T17:08:46+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-24T17:08:46+0000
lvl=info msg="Pruning expired images" t=2017-08-24T17:08:46+0000
lvl=info msg="Done pruning expired images" t=2017-08-24T17:08:46+0000
lvl=warn msg="Unable to refresh cache, using stale entry" server=https://cloud-images.ubuntu.com/releases t=2017-08-24T17:08:46+0000
lvl=info msg="Done updating images" t=2017-08-24T17:08:46+0000
lvl=info msg="Updating instance types" t=2017-08-24T17:08:46+0000
lvl=warn msg="Failed to update instance types: Get https://images.linuxcontainers.org/meta/instance-types/.yaml: lookup images.linuxcontainers.org on [::1]:53: read udp [::1]:37332->[::1]:53: read: connection refused" t=2017-08-24T17:08:46+0000
lvl=warn msg="Unable to update backup.yaml at this time." name=stunning-camel t=2017-08-24T17:08:46+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Starting container" name=stunning-camel stateful=false t=2017-08-24T17:08:46+0000 used=2017-08-24T15:37:00+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Started container" name=stunning-camel stateful=false t=2017-08-24T17:08:46+0000 used=2017-08-24T15:37:00+0000
lvl=info msg="Asked to shutdown by API, shutting down containers." t=2017-08-24T17:11:52+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shutting down container" name=stunning-camel t=2017-08-24T17:11:52+0000 timeout=30s used=2017-08-24T17:08:46+0000
action=shutdown created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Shut down container" name=stunning-camel t=2017-08-24T17:11:56+0000 timeout=30s used=2017-08-24T17:08:46+0000
lvl=warn msg="Unable to update backup.yaml at this time." name=stunning-camel t=2017-08-24T17:11:56+0000
lvl=info msg="Stopping REST API handler:" t=2017-08-24T17:11:56+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-24T17:11:56+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-08-24T17:11:56+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-08-24T17:11:56+0000
lvl=info msg="Unmounting temporary filesystems" t=2017-08-24T17:11:56+0000
lvl=info msg="Done unmounting temporary filesystems" t=2017-08-24T17:11:56+0000
lvl=info msg="Closing the database" t=2017-08-24T17:11:56+0000
lvl=info msg="Saving simplestreams cache" t=2017-08-24T17:11:56+0000
lvl=info msg="Saved simplestreams cache" t=2017-08-24T17:11:56+0000
lvl=info msg="LXD 2.17 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-08-24T17:13:21+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-08-24T17:13:21+0000
lvl=info msg="Kernel uid/gid map:" t=2017-08-24T17:13:21+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-08-24T17:13:21+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-08-24T17:13:21+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-08-24T17:13:21+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-08-24T17:13:21+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-08-24T17:13:21+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-24T17:13:22+0000
lvl=info msg="Expiring log files" t=2017-08-24T17:13:22+0000
lvl=info msg="Done expiring log files" t=2017-08-24T17:13:22+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-08-24T17:13:22+0000
lvl=info msg="LXD isn't socket activated" t=2017-08-24T17:13:22+0000
lvl=info msg="REST API daemon:" t=2017-08-24T17:13:22+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-24T17:13:22+0000
lvl=info msg="Pruning expired images" t=2017-08-24T17:13:22+0000
lvl=info msg="Updating instance types" t=2017-08-24T17:13:22+0000
lvl=info msg="Done pruning expired images" t=2017-08-24T17:13:22+0000
lvl=info msg="Updating images" t=2017-08-24T17:13:22+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-24T17:13:22+0000
lvl=warn msg="Unable to refresh cache, using stale entry" server=https://cloud-images.ubuntu.com/releases t=2017-08-24T17:13:22+0000
lvl=warn msg="Failed to update instance types: Get https://images.linuxcontainers.org/meta/instance-types/.yaml: lookup images.linuxcontainers.org on [::1]:53: read udp [::1]:43349->[::1]:53: read: connection refused" t=2017-08-24T17:13:22+0000
lvl=info msg="Done updating images" t=2017-08-24T17:13:22+0000
lvl=warn msg="Unable to update backup.yaml at this time." name=stunning-camel t=2017-08-24T17:13:22+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Starting container" name=stunning-camel stateful=false t=2017-08-24T17:13:22+0000 used=2017-08-24T17:08:46+0000
action=start created=2017-08-24T15:21:25+0000 ephemeral=false lvl=info msg="Started container" name=stunning-camel stateful=false t=2017-08-24T17:13:22+0000 used=2017-08-24T17:08:46+0000
lvl=info msg="Received 'terminated signal', exiting." t=2017-08-25T06:17:16+0000
lvl=info msg="Stopping REST API handler:" t=2017-08-25T06:17:16+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-25T06:17:16+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-08-25T06:17:16+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-08-25T06:17:16+0000
lvl=info msg="Closing the database" t=2017-08-25T06:17:16+0000
lvl=info msg="Saving simplestreams cache" t=2017-08-25T06:17:16+0000
lvl=info msg="Saved simplestreams cache" t=2017-08-25T06:17:16+0000
lvl=info msg="LXD 2.17 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-08-25T06:17:20+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-08-25T06:17:20+0000
lvl=info msg="Kernel uid/gid map:" t=2017-08-25T06:17:20+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-08-25T06:17:20+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-08-25T06:17:20+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-08-25T06:17:20+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-08-25T06:17:20+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-08-25T06:17:20+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-25T06:17:20+0000
lvl=info msg="Expiring log files" t=2017-08-25T06:17:20+0000
lvl=info msg="Done expiring log files" t=2017-08-25T06:17:20+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-08-25T06:17:20+0000
lvl=info msg="LXD isn't socket activated" t=2017-08-25T06:17:20+0000
lvl=info msg="REST API daemon:" t=2017-08-25T06:17:20+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-25T06:17:20+0000
lvl=info msg="Pruning expired images" t=2017-08-25T06:17:20+0000
lvl=info msg="Updating instance types" t=2017-08-25T06:17:20+0000
lvl=info msg="Updating images" t=2017-08-25T06:17:20+0000
lvl=info msg="Done pruning expired images" t=2017-08-25T06:17:20+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-25T06:17:20+0000
lvl=info msg="Done updating images" t=2017-08-25T06:17:25+0000
lvl=info msg="Done updating instance types" t=2017-08-25T06:17:33+0000
lvl=info msg="Updating images" t=2017-08-25T12:17:25+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-25T12:17:25+0000
lvl=info msg="Done updating images" t=2017-08-25T12:17:29+0000
lvl=info msg="Received 'terminated signal', exiting." t=2017-08-25T20:02:10+0000
lvl=info msg="Stopping REST API handler:" t=2017-08-25T20:02:10+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-25T20:02:10+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-08-25T20:02:10+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-08-25T20:02:10+0000
lvl=info msg="Closing the database" t=2017-08-25T20:02:10+0000
lvl=info msg="Saving simplestreams cache" t=2017-08-25T20:02:10+0000
lvl=info msg="Saved simplestreams cache" t=2017-08-25T20:02:10+0000
lvl=info msg="LXD 2.17 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-08-25T20:02:14+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-08-25T20:02:14+0000
lvl=info msg="Kernel uid/gid map:" t=2017-08-25T20:02:14+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-08-25T20:02:14+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-08-25T20:02:14+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-08-25T20:02:14+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-08-25T20:02:14+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-08-25T20:02:14+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-25T20:02:14+0000
lvl=info msg="Expiring log files" t=2017-08-25T20:02:14+0000
lvl=info msg="Done expiring log files" t=2017-08-25T20:02:14+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-08-25T20:02:14+0000
lvl=info msg="LXD isn't socket activated" t=2017-08-25T20:02:14+0000
lvl=info msg="REST API daemon:" t=2017-08-25T20:02:14+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-25T20:02:14+0000
lvl=info msg="Pruning expired images" t=2017-08-25T20:02:14+0000
lvl=info msg="Updating images" t=2017-08-25T20:02:14+0000
lvl=info msg="Updating instance types" t=2017-08-25T20:02:14+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-08-25T20:02:14+0000
lvl=info msg="Done pruning expired images" t=2017-08-25T20:02:14+0000
lvl=info msg="Done updating images" t=2017-08-25T20:02:19+0000
lvl=info msg="Done updating instance types" t=2017-08-25T20:02:23+0000

On bare metal it seems working correctly.
The only problem I have is that after a machine restart (I mean “sudo shutdown -r now”) are in state running but the network addresses are not assigned.

My framework:

sysop@s4:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial
sysop@s4:~$ uname -a
Linux s4 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
sysop@s4:~$ snap --version
snap    2.26.14
snapd   2.26.14
series  16
ubuntu  16.04
kernel  4.4.0-92-generic
sysop@s4:~$ sudo snap list
Name  Version     Rev   Developer  Notes
core  16-2.26.14  2462  canonical  -
lxd   2.17        3675  canonical  -

From lxc info

...
driver: lxc
driver_version: 2.0.8
kernel: Linux
kernel_architecture: x86_64
kernel_version: 4.4.0-92-generic
server: lxd
server_pid: 2861
server_version: "2.17"
storage: zfs
storage_version: 0.6.5.6-0ubuntu16

Log is too long. Here the first page

lvl=info msg="LXD 2.16 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-07-28T13:46:11+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-07-28T13:46:11+0000
lvl=info msg="Kernel uid/gid map:" t=2017-07-28T13:46:11+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-07-28T13:46:11+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-07-28T13:46:11+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-07-28T13:46:11+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-07-28T13:46:11+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-07-28T13:46:11+0000
lvl=info msg="Expiring log files" t=2017-07-28T13:46:15+0000
lvl=info msg="Done expiring log files" t=2017-07-28T13:46:15+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-07-28T13:46:15+0000
lvl=info msg="LXD isn't socket activated" t=2017-07-28T13:46:18+0000
lvl=info msg="REST API daemon:" t=2017-07-28T13:46:18+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-07-28T13:46:18+0000
lvl=info msg="Pruning expired images" t=2017-07-28T13:46:18+0000
lvl=info msg="Updating images" t=2017-07-28T13:46:18+0000
lvl=info msg="Done updating images" t=2017-07-28T13:46:18+0000
lvl=info msg="Done pruning expired images" t=2017-07-28T13:46:18+0000
lvl=info msg="Asked to shutdown by API, shutting down containers." t=2017-07-28T13:59:17+0000
lvl=info msg="Stopping REST API handler:" t=2017-07-28T13:59:17+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-07-28T13:59:17+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-07-28T13:59:17+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-07-28T13:59:17+0000
lvl=info msg="Unmounting temporary filesystems" t=2017-07-28T13:59:17+0000
lvl=info msg="Done unmounting temporary filesystems" t=2017-07-28T13:59:17+0000
lvl=info msg="Closing the database" t=2017-07-28T13:59:17+0000
lvl=info msg="Saving simplestreams cache" t=2017-07-28T13:59:17+0000
lvl=info msg="Saved simplestreams cache" t=2017-07-28T13:59:17+0000
lvl=info msg="LXD 2.16 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-07-28T14:00:20+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-07-28T14:00:20+0000
lvl=info msg="Kernel uid/gid map:" t=2017-07-28T14:00:20+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-07-28T14:00:20+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-07-28T14:00:20+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-07-28T14:00:20+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-07-28T14:00:20+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-07-28T14:00:20+0000
lvl=info msg="Expiring log files" t=2017-07-28T14:00:20+0000
lvl=info msg="Done expiring log files" t=2017-07-28T14:00:20+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-07-28T14:00:20+0000
lvl=info msg="LXD isn't socket activated" t=2017-07-28T14:00:20+0000
lvl=info msg="REST API daemon:" t=2017-07-28T14:00:20+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-07-28T14:00:20+0000
lvl=info msg="Pruning expired images" t=2017-07-28T14:00:20+0000
lvl=info msg="Updating images" t=2017-07-28T14:00:20+0000
lvl=info msg="Done updating images" t=2017-07-28T14:00:20+0000
lvl=info msg="Done pruning expired images" t=2017-07-28T14:00:20+0000
lvl=info msg="Creating ZFS storage pool \"default\"." t=2017-07-28T14:02:58+0000
lvl=info msg="Created ZFS storage pool \"default\"." t=2017-07-28T14:03:00+0000
lvl=info msg="Connecting to a remote simplestreams server" t=2017-07-28T14:03:36+0000
alias=16.04 image=8220e89e33e6f62b56cb451cfed61574074416a66a6e7c61ff574d95572e6661 lvl=info msg="Downloading image" operation=04bec02b-d544-488d-8f1f-4c53a9d90a1f server=https://cloud-images.ubuntu.com/releases t=2017-07-28T14:03:42+0000 trigger=/1.0/operations/04bec02b-d544-488d-8f1f-4c53a9d90a1f
/var/snap/lxd/common/lxd/logs/lxd.log

Interesting, so containers are starting back up but not getting their IP address.

Can you show:

  • lxc config show --expanded NAME (for one of your broken containers)
  • lxc exec NAME – ps fauxww (for one of your broken containers)
  • lxc network show lxdbr0 (assuming you’re using lxdbr0)

Does restarting the container have it get an IP address?

Sorry, after another reboot attempt all worked correctly.
Now I’ll take the machine under observation.

For the history, below is whatt happened before:

Normal container’s state:

sysop@s4:~/script$ lxc list
+-------------+---------+--------------------------------+------+------------+-----------+
|    NAME     |  STATE  |              IPV4              | IPV6 |    TYPE    | SNAPSHOTS |
+-------------+---------+--------------------------------+------+------------+-----------+
| cybersec    | RUNNING | 10.104.52.60 (eth0)            |      | PERSISTENT | 0         |
+-------------+---------+--------------------------------+------+------------+-----------+
| db-server   | RUNNING | 10.104.52.183 (eth0)           |      | PERSISTENT | 0         |
+-------------+---------+--------------------------------+------+------------+-----------+
| icons       | RUNNING | 10.104.52.148 (eth0)           |      | PERSISTENT | 0         |
+-------------+---------+--------------------------------+------+------------+-----------+
| liferaybase | RUNNING | 10.104.52.149 (eth0)           |      | PERSISTENT | 0         |
+-------------+---------+--------------------------------+------+------------+-----------+
| servizi     | RUNNING | 10.104.52.30 (eth0)            |      | PERSISTENT | 0         |
|             |         | 10.0.1.88 (eth1)               |      |            |           |
+-------------+---------+--------------------------------+------+------------+-----------+

After “shutdown -r now” (really I first stop all KVM domains and all LXC containers) the container’s state was:

sysop@s4:~/script$ lxc list  
+-------------+---------+------+------+------------+-----------+
|    NAME     |  STATE  | IPV4 | IPV6 |    TYPE    | SNAPSHOTS |
+-------------+---------+------+------+------------+-----------+
| cybersec    | RUNNING |      |      | PERSISTENT | 0         |
+-------------+---------+------+------+------------+-----------+
| db-server   | RUNNING |      |      | PERSISTENT | 0         |
+-------------+---------+------+------+------------+-----------+
| icons       | RUNNING |      |      | PERSISTENT | 0         |
+-------------+---------+------+------+------------+-----------+
| liferaybase | RUNNING |      |      | PERSISTENT | 0         |
+-------------+---------+------+------+------------+-----------+
| servizi     | RUNNING |      |      | PERSISTENT | 0         |
+-------------+---------+------+------+------------+-----------+

The command “sudo systemctl restart snap.lxd.daemon” takes all the containers in the normal state

On the machine there is also a Shorewall firewall. I don’t know if this interfere.

Thanks for your attention

My second machine is a KVM virtual machine. On this machine it works correctly
I had the same problem running containers without address) but after three reboot the situation nomalized and now restarts correctly.

Inside this VM I have:

sysop@vx00:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu                                                                                                                                                                        
Description:    Ubuntu 16.04.3 LTS                                                                                                                                                            
Release:        16.04                                                                                                                                                                         
Codename:       xenial                                                                                                                                                                        
sysop@vx00:~$ uname -a                                                                                                                                                                        
Linux vx00 4.4.0-92-generic #115-Ubuntu SMP Thu Aug 10 09:04:33 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux                                                                                       
sysop@vx00:~$ snap --version                                                                                                                                                                  
snap    2.26.14                                                                                                                                                                               
snapd   2.26.14                                                                                                                                                                               
series  16                                                                                                                                                                                    
ubuntu  16.04                                                                                                                                                                                 
kernel  4.4.0-92-generic                                                                                                                                                                      
sysop@vx00:~$ sudo snap list                                                                                                                                                                  
Name  Version     Rev   Developer  Notes                                                                                                                                                      
core  16-2.26.14  2462  canonical  -                                                                                                                                                          
juju  2.2.2       2142  canonical  classic                                                                                                                                                    
lxd   2.17        3675  canonical  -                                                                                                                                                          

From lxc info

...
driver: lxc
driver_version: 2.0.8
kernel: Linux
kernel_architecture: x86_64
kernel_version: 4.4.0-92-generic
server: lxd
server_pid: 3229
server_version: "2.17"
storage: zfs
storage_version: 0.6.5.6-0ubuntu16

Also here the log is too long. Here the first page

lvl=info msg="LXD 2.14 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-06-10T12:23:43+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-06-10T12:23:43+0000
lvl=info msg="Kernel uid/gid map:" t=2017-06-10T12:23:43+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-06-10T12:23:43+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-06-10T12:23:43+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-06-10T12:23:43+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-06-10T12:23:43+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-06-10T12:23:43+0000
lvl=info msg="Expiring log files" t=2017-06-10T12:23:47+0000
lvl=info msg="Done expiring log files" t=2017-06-10T12:23:47+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-06-10T12:23:47+0000
lvl=info msg="LXD isn't socket activated" t=2017-06-10T12:23:49+0000
lvl=info msg="REST API daemon:" t=2017-06-10T12:23:49+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-06-10T12:23:49+0000
lvl=info msg="Pruning expired images" t=2017-06-10T12:23:49+0000
lvl=info msg="Updating images" t=2017-06-10T12:23:49+0000
lvl=info msg="Done pruning expired images" t=2017-06-10T12:23:49+0000
lvl=info msg="Done updating images" t=2017-06-10T12:23:49+0000
lvl=info msg="Received 'power failure signal', shutting down containers." t=2017-06-10T12:24:13+0000
lvl=info msg="Stopping REST API handler:" t=2017-06-10T12:24:13+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-06-10T12:24:13+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-06-10T12:24:13+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-06-10T12:24:13+0000
lvl=info msg="Unmounting temporary filesystems" t=2017-06-10T12:24:13+0000
lvl=info msg="Done unmounting temporary filesystems" t=2017-06-10T12:24:13+0000
lvl=info msg="Closing the database" t=2017-06-10T12:24:13+0000
lvl=info msg="Saving simplestreams cache" t=2017-06-10T12:24:13+0000
lvl=info msg="Saved simplestreams cache" t=2017-06-10T12:24:13+0000
lvl=info msg="LXD 2.14 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-06-10T12:24:28+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-06-10T12:24:28+0000
lvl=info msg="Kernel uid/gid map:" t=2017-06-10T12:24:28+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-06-10T12:24:28+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-06-10T12:24:28+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-06-10T12:24:28+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-06-10T12:24:28+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-06-10T12:24:28+0000
lvl=info msg="Expiring log files" t=2017-06-10T12:24:28+0000
lvl=info msg="Done expiring log files" t=2017-06-10T12:24:28+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-06-10T12:24:28+0000
lvl=info msg="LXD isn't socket activated" t=2017-06-10T12:24:28+0000
lvl=info msg="REST API daemon:" t=2017-06-10T12:24:28+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-06-10T12:24:28+0000
lvl=info msg="Updating images" t=2017-06-10T12:24:28+0000
lvl=info msg="Pruning expired images" t=2017-06-10T12:24:28+0000
lvl=info msg="Done pruning expired images" t=2017-06-10T12:24:28+0000
lvl=info msg="Done updating images" t=2017-06-10T12:24:28+0000
lvl=info msg="Updating images" t=2017-06-10T18:24:28+0000
lvl=info msg="Done updating images" t=2017-06-10T18:24:28+0000
lvl=info msg="Received 'power failure signal', shutting down containers." t=2017-06-10T18:46:53+0000
lvl=info msg="Stopping REST API handler:" t=2017-06-10T18:46:53+0000
lvl=info msg=" - closing socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-06-10T18:46:53+0000
lvl=info msg="Stopping /dev/lxd handler" t=2017-06-10T18:46:53+0000
lvl=info msg="Stopped /dev/lxd handler" t=2017-06-10T18:46:53+0000
lvl=info msg="Unmounting temporary filesystems" t=2017-06-10T18:46:53+0000
lvl=info msg="Done unmounting temporary filesystems" t=2017-06-10T18:46:53+0000
lvl=info msg="Closing the database" t=2017-06-10T18:46:53+0000
lvl=info msg="Saving simplestreams cache" t=2017-06-10T18:46:53+0000
/var/snap/lxd/common/lxd/logs/lxd.log

Hi everyone,

I’ve just followed the migration process step by step and it does not work for me.
But my configuration is not a clean Ubuntu install like in the demo, but a production like environment.

From my test VM hosted on a VMware ESXI host.

$ lsb_release- a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

$ uname -a
Linux node.domain.tld 4.4.0-24-generic #43-Ubuntu SMP Wed Jun 8 19:27:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ snap version
snap    2.26.14
snapd   2.26.14
series  16
ubuntu  16.04
kernel  4.4.0-24-generic

$ snap list
Name  Version     Rev   Developer  Notes
core  16-2.26.14  2462  canonical  -
lxd   2.17        3675  canonical  -

Storage backend : ZFS

$ cat /var/snap/lxd/common/lxd/logs/lxd.log
lvl=info msg="LXD 2.17 is starting in normal mode" path=/var/snap/lxd/common/lxd t=2017-08-28T08:49:56+0000
lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2017-08-28T08:49:56+0000
lvl=info msg="Kernel uid/gid map:" t=2017-08-28T08:49:56+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-08-28T08:49:56+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-08-28T08:49:56+0000
lvl=info msg="Configured LXD uid/gid map:" t=2017-08-28T08:49:56+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-08-28T08:49:56+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-08-28T08:49:56+0000
lvl=info msg="Expiring log files" t=2017-08-28T08:49:56+0000
lvl=info msg="Done expiring log files" t=2017-08-28T08:49:56+0000
lvl=info msg="Starting /dev/lxd handler" t=2017-08-28T08:49:56+0000
lvl=info msg="LXD isn't socket activated" t=2017-08-28T08:50:01+0000
lvl=info msg="REST API daemon:" t=2017-08-28T08:50:01+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-08-28T08:50:01+0000
lvl=info msg="Pruning expired images" t=2017-08-28T08:50:01+0000
lvl=info msg="Done pruning expired images" t=2017-08-28T08:50:01+0000
lvl=info msg="Updating images" t=2017-08-28T08:50:01+0000
lvl=info msg="Updating instance types" t=2017-08-28T08:50:01+0000
lvl=info msg="Done updating images" t=2017-08-28T08:50:01+0000
lvl=info msg="Done updating instance types" t=2017-08-28T08:50:03+0000
lvl=info msg="Creating ZFS storage pool \"default\"." t=2017-08-28T08:52:18+0000

The particularity of this environment is that Ubuntu is natively installed on ZFS as described here https://github.com/zfsonlinux/zfs/wiki/Ubuntu%2016.04%20Root%20on%20ZFS

Before performing the migration I had running containers.

$ lxc list
+---------------+---------+-------------------+------+------------+-----------+
|     NAME      |  STATE  |       IPV4        | IPV6 |    TYPE    | SNAPSHOTS |
+---------------+---------+-------------------+------+------------+-----------+
| helpdesk      | RUNNING | 10.0.8.217 (eth0) |      | PERSISTENT | 0         |
+---------------+---------+-------------------+------+------------+-----------+
| juju-4d1ff1-0 | RUNNING | 10.0.8.24 (eth0)  |      | PERSISTENT | 0         |
+---------------+---------+-------------------+------+------------+-----------+
| karuta-db     | RUNNING | 10.0.8.19 (eth0)  |      | PERSISTENT | 0         |
+---------------+---------+-------------------+------+------------+-----------+
| karuta-web    | RUNNING | 10.0.8.100 (eth0) |      | PERSISTENT | 0         |
+---------------+---------+-------------------+------+------------+-----------+
| kb            | RUNNING | 10.0.8.210 (eth0) |      | PERSISTENT | 0         |
+---------------+---------+-------------------+------+------------+-----------+
| mahara-db     | RUNNING | 10.0.8.104 (eth0) |      | PERSISTENT | 0         |
+---------------+---------+-------------------+------+------------+-----------+
| mahara-web    | RUNNING | 10.0.8.48 (eth0)  |      | PERSISTENT | 0         |
+---------------+---------+-------------------+------+------------+-----------+

An extract of the ZFS datasets dedicated to LXD containers:

rpool/virtual/lxd                                                                                  11.1G  3.32G    96K  none
rpool/virtual/lxd/containers                                                                       7.58G  3.32G    96K  none
rpool/virtual/lxd/containers/helpdesk                                                              2.51G  3.32G  2.51G  /var/lib/lxd/storage-pools/default/containers/helpdesk
rpool/virtual/lxd/containers/juju-4d1ff1-0                                                         1.06G  3.32G  1.27G  /var/lib/lxd/storage-pools/default/containers/juju-4d1ff1-0
rpool/virtual/lxd/containers/karuta-db                                                              329M  3.32G   518M  /var/lib/lxd/storage-pools/default/containers/karuta-db
rpool/virtual/lxd/containers/karuta-web                                                             461M  3.32G   650M  /var/lib/lxd/storage-pools/default/containers/karuta-web
rpool/virtual/lxd/containers/kb                                                                    2.64G  3.32G  2.64G  /var/lib/lxd/storage-pools/default/containers/kb
rpool/virtual/lxd/containers/mahara-db                                                              301M  3.32G   514M  /var/lib/lxd/storage-pools/default/containers/mahara-db
rpool/virtual/lxd/containers/mahara-web                                                             308M  3.32G   521M  /var/lib/lxd/storage-pools/default/containers/mahara-web
rpool/virtual/lxd/deleted                                                                          1.22G  3.32G    96K  none
rpool/virtual/lxd/deleted/images                                                                   1.21G  3.32G    96K  none
rpool/virtual/lxd/deleted/images/2c0ee52d057bd679d780d53e1f57af10ff2218330b9e7b8af5f39152958aebc3   413M  3.32G   413M  none
rpool/virtual/lxd/deleted/images/9e73b2f0963bc9a317877265d5d6dc7725d0fa26112279f885c04e610b45a38a   413M  3.32G   413M  none
rpool/virtual/lxd/deleted/images/d0c72d121ba6674b6f34aa6ff247588033098627122b25d9bfec73a8303a2c3b   417M  3.32G   417M  none
rpool/virtual/lxd/images                                                                           2.33G  3.32G    96K  none
rpool/virtual/lxd/images/295d53ae6db4b3b0df9565377cb48c62845ab3bee5a241a8effe50ccdfd8bf17           413M  3.32G   413M  none
rpool/virtual/lxd/images/31423586192b7a2ccb90f140dc92c86c11cc0817a1c063a1c07cbb651110d20e           381M  3.32G   381M  none
rpool/virtual/lxd/images/6160653c9dbf2499060ae9fe8cf5c0fa2689671c22549fd91a3ebceca7eb2236           393M  3.32G   393M  none
rpool/virtual/lxd/images/7a7ff654cbd8f5f09bec03aa19d8d7d92649127d18659036a963b1ea63f90d25           371M  3.32G   371M  none
rpool/virtual/lxd/images/8f5108a99312694da883bf1396e688bf9f91cf22061eb9ecd806b43b24c6651f           359M  3.32G   359M  none
rpool/virtual/lxd/images/b250b19b66d7103b32f4ec38ffa3c9c7a0071fc5cf08178218895084c3dafa58          5.73M  3.32G  5.73M  none
rpool/virtual/lxd/images/be4aa8e56eab681fac6553b48ce19d7f34833accc2c8ae65f140a603b8369a1d           462M  3.32G   462M  none

The issues I encountered:

  • Removing LXD, removes also Juju.

  • I was not able to re use my previous dataset and so I’m blocked here for now.

  • The LXC command is not found.

    $ lxc version
    -bash: /usr/bin/lxc: No such file or directory

while

$ whereis lxc
lxc: /usr/share/lxc /snap/bin/lxc

As I have similar environments in production, I would like to know how to perform this migration while keeping:

  • my current ZFS Dataset dedicated to LXD
  • my LXD network configuration as I have iptables rules defined
  • my current LXC and Juju environments running

Thanks for your help

Eric

So that’s why I said not to do this on a system which has an old LXD installation around. It’s also mentioned in the next steps that we do not yet have a path to transition from the deb to the snap, so what you’re attempting to do won’t work.

  • Juju depending on the lxd deb will be resolved soon-ish as Juju itself is switching to snap-only.
  • LXD indeed will not let you use a dirty ZFS pool, even if it did, you’d still not have any of the database entries for those containers, so that wouldn’t exactly help.
  • The command being not found is most likely just shell command caching. Closing your user session and opening it again should fix that.

What you’re asking for, except for the Juju part is what we’re working on now. That’s a tool which you can run to move from the Debian package to the Snap package while conserving all your containers, images and configuration (including storage pools and networks).

This should be ready for testing in the next couple of weeks.

Hi @stgraber,

thanks for your answer and indeed, I have to admit that I’ve missed this part…

Regarding the future, uninstalling the LXD deb package does not remove the managed bridges (eq. lxdbr0).
So, after installing the snap package and running lxd init while keeping defaults, there is a conflict with the already existing bridge.
Bridge that you cannot set as managed after the initialization if you decided not to create a bridge during this latest process.

Best regards

Eric

Maybe I’ve missed the lxc network attach command, don’t I ?

The bridge only shows up if you ever used that LXD daemon. Since my instructions are for a clean system, that shouldn’t have been the case and so the bridge wouldn’t be around.

On LXD 2.17 or higher LXD will also tear down any bridge it’s got on shutdown, in which case even a used LXD will have its bridge go away.

Removing a leftover bridge so that LXD will let you define it again is usually as simple as:

ip link del lxdbr0

That’s what I’ve done, but thanks for the explanation.

Hi, I tried installing lxd using snap on a fresh ubuntu 16.04. everything works great, except that i checked the the version of lxd installed. It wasn’t the lastest version. Kindly advise am i missing out anything.

Thanks in advance.

instance-1:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial

instance-1:~$ uname -a
Linux instance-1 4.10.0-40-generic #44~16.04.1-Ubuntu SMP Thu Nov 9 15:37:44 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

instance-1:~$ sudo snap list
Name Version Rev Developer Notes
core 16-2.29.3 3440 canonical core
lxd 2.20 5061 canonical -

instance-1:~$ sudo cat /var/snap/lxd/common/lxd/logs/lxd.log
lvl=info msg=“LXD 2.20 is starting in normal mode” path=/var/snap/lxd/common/lxd t=2017-11-28T06:21:31+0000
lvl=info msg=“Kernel uid/gid map:” t=2017-11-28T06:21:31+0000
lvl=info msg=" - u 0 0 4294967295" t=2017-11-28T06:21:31+0000
lvl=info msg=" - g 0 0 4294967295" t=2017-11-28T06:21:31+0000
lvl=info msg=“Configured LXD uid/gid map:” t=2017-11-28T06:21:31+0000
lvl=info msg=" - u 0 1000000 1000000000" t=2017-11-28T06:21:31+0000
lvl=info msg=" - g 0 1000000 1000000000" t=2017-11-28T06:21:31+0000
lvl=warn msg=“CGroup memory swap accounting is disabled, swap limits will be ignored.” t=2017-11-28T06:21:31+0000
lvl=info msg=“LXD isn’t socket activated” t=2017-11-28T06:21:37+0000
lvl=info msg=“Starting /dev/lxd handler:” t=2017-11-28T06:21:37+0000
lvl=info msg=" - binding devlxd socket" socket=/var/snap/lxd/common/lxd/devlxd/sock t=2017-11-28T06:21:37+0000
lvl=info msg=“REST API daemon:” t=2017-11-28T06:21:37+0000
lvl=info msg=" - binding Unix socket" socket=/var/snap/lxd/common/lxd/unix.socket t=2017-11-28T06:21:37+0000
lvl=info msg=“Pruning expired images” t=2017-11-28T06:21:37+0000
lvl=info msg=“Done pruning expired images” t=2017-11-28T06:21:37+0000
lvl=info msg=“Expiring log files” t=2017-11-28T06:21:37+0000
lvl=info msg=“Done expiring log files” t=2017-11-28T06:21:37+0000
lvl=info msg=“Updating instance types” t=2017-11-28T06:21:37+0000
lvl=info msg=“Updating images” t=2017-11-28T06:21:37+0000
lvl=info msg=“Done updating images” t=2017-11-28T06:21:37+0000
lvl=info msg=“Done updating instance types” t=2017-11-28T06:21:45+0000

instance-1:~$ lxd --version
2.0.10

zfs as storage backend.

That’s because you have both the snap and deb installed at the same time, so some commands hit the snap and others hit the deb.

You can run lxd.migrate that will move stuff over from the deb to the snap and then offer to remove it for you.

Does this include new Ubuntu releases?
As in will Ubuntu 18.04 have LXC/LXD/LXCFS in the official repositories like normal, but if we’ll want a newer version our only official option will be to use the snap?

EDIT: Also, does updating lxd via the snap still require restart of all containers?

18.04 will ship LXD 3.0 as a deb but any feature release after that will be available as a snap only.

We fixed the restart issue quite a while ago, so only the LXD daemon restarts on refreshes, the containers keep running, same as with the deb.

recursive mounts doesn’t seem to work with snap package? I get an error saying:

error: The recursive option is only supported for additional bind-mounted paths

The path and subdir paths are mounted (zfs datasets).

Trying to make sure I’m understanding correctly what you are saying.
There will be a LXD (version 3) available as a .deb file.
After version 3 LXD will only be available as a snap package.

Is that accurate?
If it is accurate - - - why choose to use snap rather than a .deb file?

I’m answering myself - - - sorry (its not because I ‘really’ know anything - - - grin!)!!
As I was logging out I was scrolling up the page.
Near the beginning of the page was the answer to my second question.
I can understand producing something that means lesser amounts of support should be needed.

Pace!

The SNAP LXD seems to be working well.