Ubuntu 16.04 LTS kernel compatibility?

The next Ubuntu LTS is due in about one month, and service providers are likely to add it to their offering sooner than later. As 14.04 is already 2 years into it’s life-cycle, the 16.04 is likely to become the recommended default very quickly.

Is Discourse compatible with the 16.04 as of today or from day 1 after the release? Anyone tried it yet? I will be making some server migrations during spring time, so it would make sense to jump in the 16.04 bandwagon while I am at it.

Short answer, yes.

If you’re deployed in production and not deployed in a development environment locally, you’re going to be using the discourse-docker containers already. The discourse team still has complete control the OS environment inside the container.

If and when they do decide to update to the 16.04 base, I’m sure the team will make sure that it’s tested for compatibility before they roll out any changes to the container itself.

5 Likes

Before we do that we need to do the Postgres 9.5 upgrade for the containers, I think.

I’m just about to have a go at installing Discourse using the instructions here: https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md

The instructions say that the Digital Ocean default is Ubuntu 14.04 but the default is now 16.04

Can you:

a) Confirm compatibility with 16.04 at this point?
b) Update the docs if this is the case?

Thanks

Ross

Yes, it works fine.

I will update when I get to a pc.

2 Likes

Cool. Thanks. Yeah, I took the plunge and got it up and running on 16.04. Really nice.

Thanks for updating the docs.

3 Likes

Not feeling the joy yet.

So Ubuntu 16.04 LTS and Discourse don’t play well, or I’m doing it wrong, or I’m not worthy.

I followed the steps documented here/above among countless wiki, but I’ve narrowed the search to a couple basic sites that seem to have it sorted. My attempt, utter failure:

To summarize:

# wget -qO- https://get.docker.com/ | sh

yields:

modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/3.10.23-xxxx-std-ipv6-64/modules.dep.bin'
modprobe: FATAL: Module aufs not found in directory /lib/modules/3.10.23-xxxx-std-ipv6-64
Warning: current kernel is not supported by the linux-image-extra-virtual
 package.  We have no AUFS support.  Consider installing the packages
 linux-image-virtual kernel and linux-image-extra-virtual for AUFS support.
+ sleep 10

Oh, by the way, which linux-image* packages are installed?

# apt list --installed | grep linux-image

linux-image-4.4.0-45-generic/xenial-updates,xenial-security,now 4.4.0-45.66 amd64 [installed,automatic]
linux-image-extra-4.4.0-45-generic/xenial-updates,xenial-security,now 4.4.0-45.66 amd64 [installed,automatic]
linux-image-extra-virtual/xenial-updates,xenial-security,now 4.4.0.45.48 amd64 [installed]
linux-image-generic/xenial-updates,xenial-security,now 4.4.0.45.48 amd64 [installed,automatic]
linux-image-virtual/xenial-updates,xenial-security,now 4.4.0.45.48 amd64 [installed]

Trying to be pin-point accurate as I’ve seen in other wiki articles:

# apt-get install  linux-image-virtual kernel-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package kernel-3.10.23-xxxx-std-ipv6-64
E: Couldn't find any package by glob 'kernel-3.10.23-xxxx-std-ipv6-64'
E: Couldn't find any package by regex 'kernel-3.10.23-xxxx-std-ipv6-64'

This Ubuntu 16.04 LTS is
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 3.10.23-xxxx-std-ipv6-64 x86_64)

What’s in /lib/modules ?
drwxr-xr-x 5 root root 4096 Oct 20 14:31 4.4.0-45-generic

Well I could probably explore why the difference between uname -r and the modules under version 4.4.0…

Anyway,… I killed that right there. Something afoot at Circle K.

I can install Docker another way – which seems to pass successfully (Applied Step 1 only to the URL below)
See also: How To Install and Use Docker on Ubuntu 16.04 | DigitalOcean

After that maneuver, I can get this:

# systemctl status docker

 docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2016-10-20 15:44:33 EDT; 6min ago
     Docs: https://docs.docker.com
 Main PID: 20563 (dockerd)
   Memory: 15.8M
      CPU: 239ms
   CGroup: /system.slice/docker.service
           ├─20563 /usr/bin/dockerd -H fd://
           └─20569 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim docker-contai

Oct 20 15:44:33 foo dockerd[20563]: time="2016-10-20T15:44:33.366962457-04:00" level=warning msg="Running modprobe xt_c
Oct 20 15:44:33 foo dockerd[20563]: time="2016-10-20T15:44:33.368208089-04:00" level=info msg="Firewalld running: false
Oct 20 15:44:33 foo dockerd[20563]: time="2016-10-20T15:44:33.380988917-04:00" level=warning msg="Could not load necess
Oct 20 15:44:33 foo dockerd[20563]: time="2016-10-20T15:44:33.529863512-04:00" level=info msg="Default bridge (docker0)
Oct 20 15:44:33 foo dockerd[20563]: time="2016-10-20T15:44:33.806550221-04:00" level=info msg="Loading containers: done
Oct 20 15:44:33 foo dockerd[20563]: time="2016-10-20T15:44:33.806589040-04:00" level=info msg="Daemon has completed ini
Oct 20 15:44:33 foo dockerd[20563]: time="2016-10-20T15:44:33.806601541-04:00" level=info msg="Docker daemon" commit=bb
Oct 20 15:44:33 foo dockerd[20563]: time="2016-10-20T15:44:33.811172703-04:00" level=info msg="API listen on /var/run/d
Oct 20 15:44:33 foo systemd[1]: Started Docker Application Container Engine.
Oct 20 15:46:54 foo dockerd[20563]: time="2016-10-20T15:46:54.882222692-04:00" level=error msg="Handler for PO

About the system:

# uname -a

Linux foo 3.10.23-xxxx-std-ipv6-64 #1 SMP Tue Mar 18 14:48:24 CET 2014 x86_64 x86_64 x86_64 GNU/Linux

So at any rate, let’s try to make a container:

(Manually created the app.yml due to the fact the default setup doesn’t have a workaround if there’s already Apache listening on port 80. For what it’s worth I got Apache primed and ready for the container once it’s setup. So copied the standalone.yml and replaced “example.com” with the domain in question, and other port number shenanigans)

Off topic - the Apache config for the server in question (domain names changed to protect the guilty)

<VirtualHost *:80>
   ServerName foo.net
   DocumentRoot /whatever/foo
   ErrorLog /var/log/apache2/foo-errors.log
        <Directory /whatever/foo>
                Options FollowSymLinks
                AllowOverride None
                Require all granted
        </Directory>
    ProxyPreserveHost On
    ProxyRequests off
    ProxyPass / http://127.0.0.1:7654/
    ProxyPassReverse / http:/127.0.0.1:7654/
</VirtualHost>

Now that the app.yml is hand-edited for simply referring to the domain and port numbers (7654) as per countless wiki articles:

The response:
# ./launcher bootstrap app

/usr/bin/docker: Error response from daemon: failed to create endpoint compassionate_stonebraker on network bridge: failed to add the host (vethe5fcb14) <=> sandbox (vethe7f312f) pair interfaces: operation not supported.
Your Docker installation is not working correctly

See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam

So, I’m a bit perplexed:

Does Ubuntu 16.04 LTS work with Discourse? If so, what changes do I need to make in the installation process to overcome this. I’m either doing it wrong, or I’m just not worthy. Let me know… :wink:

Thanks

-sibo

ps: edits to make output cleaner. no [verbatim] type markup…

Yes, Docker works fine on Ubuntu 16.04 when you are using a distribution supplied kernel with the linux-image-extra package. On Ubuntu 16.10 it seems to work out of the box with the distribution supplied kernel (at least that was my experience on Linode a few days ago).

There’s your reason why Docker doesn’t work for you. Your kernel doesn’t support the required aufs filesystem.

Is this a custom kernel? It seems to be quite old. Ubuntu 16.04 ships with version 4.4!

1 Like

Is that a DO server upgraded from 14.04 LTS? There was a post somewhere about in-place upgrades not upgrading the kernel.

Looks like that is the issue. Yes, upgraded. Time to build kernel. thx.

You can update the kernel like this:

  1. In DigitalOcean’s control panel, switch the kernel to DigitalOcean GrubLoader v0.2 (20160714) Ubuntu.
  2. Shut down the server.
  3. Power on the VPS from the control panel.

A sudo apt-get dist-upgrade and sudo apt-get autoremove may be in order afterwards :slight_smile:

Thanks. But, not using Digital Ocean.

Nevertheless, new kernel build underway. Sorry for the confusion, I didn’t realize 16.04 was on the 4.4 kernel. Last time I built Linux kernels by hand, Slackware downloaded over ftp to 3.5" floppies and XWindows occupied 4 disks. Times have changed.

Edit:

To make it clear - it was my mistake. I didn’t notice the kernel version had been lagging behind the apparent dist-upgrade that I thought was successful. I should have been more alert. And to make clear - building kernels is definitely easier now than it used to be - (when there was no web, or google, or anything like it…). At least we have this site to sort things out. Thanks.

1 Like

Some providers - cough cough - doesn’t provide docker compatible kernel out of the box.

That’s one of the reasons we recommend providers that you can just install Discourse without worrying about kernels before starting.

3 Likes