Roots Discourse

Trellis detecting wrong Ubuntu type - but it's incorrect

I just set up an empty DO droplet with Ubuntu 18.04. No existing LEMP stack etc.

Gave Trellis the connection details etc. It connects fine but eventually I see the following statement:

TASK [common : Validate Ubuntu version] ********************************************************************************************************************************************************************

Trellis is built for Ubuntu 18.04 Bionic as of

https://github.com/roots/trellis/pull/992

Your Ubuntu version is 16.04 xenial

We recommend you re-create your server to get the best experience.

Note: both of these methods will delete all your existing data. It’s up to

you to backup what’s needed and restore it.

Development via Vagrant: vagrant destroy && vagrant up

Staging/Production: Create a new server with Ubuntu 18.04 and provision

That is incorrect. I only just installed 18.04 and when SSH’d in, it also tells me I am running 18.04

I am running the latest version of Trellis and Bedrock. Only cloned it down a week ago.

When you invoke lsb_release -a on that system, do you really get that Ubuntu release?

Maybe it’s related but after a few more minutes, it entirely fails on the following step:

TASK [mariadb : Install MySQL client] **********************************************************************************************************************************************************************
System info:
  Ansible 2.8.0; Darwin
  Trellis version (per changelog): "Removes ID from Lets Encrypt bundled certificate and make filename stable"
---------------------------------------------------
'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options
::=--force-confold"      install 'mariadb-client'' failed: E: Unable to
correct problems, you have held broken packages.

E: Unable to correct problems, you have held broken packages.

fatal: [ebedding-staging]: FAILED! => {"cache_update_time": 1590398914, "cache_updated": false, "changed": false, "rc": 100, "stderr_lines": ["E: Unable to correct problems, you have held broken packages."], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSome packages could not be installed. This may mean that you have\nrequested an impossible situation or if you are using the unstable\ndistribution that some required packages have not yet been created\nor been moved out of Incoming.\nThe following information may help to resolve the situation:\n\nThe following packages have unmet dependencies:\n mariadb-client : Depends: mariadb-client-10.2 (>= 10.2.32+maria~xenial) but it is not going to be installed\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Some packages could not be installed. This may mean that you have", "requested an impossible situation or if you are using the unstable", "distribution that some required packages have not yet been created", "or been moved out of Incoming.", "The following information may help to resolve the situation:", "", "The following packages have unmet dependencies:", " mariadb-client : Depends: mariadb-client-10.2 (>= 10.2.32+maria~xenial) but it is not going to be installed"]}

Yep.

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic

Welcome to Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-66-generic x86_64)

Judging from the Trellis ansible code/config, this seems to be an issue with ansible itself:


In this case apparently, ansible_distribution_release holds bionic on a xenial system.

Try to install the latest version of ansible as this may have been already fixed. On WSL I use the pip installer approach.

1 Like

Thanks for looking this up @strarsis.

I am running Ansible version 2.8.0. I ran the following to make sure I have everything locally as required: pip install -r requirements.txt

  • Requirement already satisfied: ansible<3.0,>=2.8.0 in /Users/jordancharters/Library/Python/2.7/lib/python/site-packages (from -r requirements.txt (line 1)) (2.8.0)
  • The other requirements were all met already too.

What version of Ansible are you on?

I use ansible 2.7.13 on WSL (1).

Ansible uses the distro python package:

Install the latest distro version and run it manually on your system, does it work correctly there?

Could this issue be related?:

Line that apparently extracts the codename:

Thanks for the suggestion. Updating to Ansible 2.9 helped pass this issue.

However on provisions after the first, it sometimes has an issue still and lets me go back to 2.8 and continue fine again, strange. I’ll try investigate further another time.

This topic was automatically closed after 42 days. New replies are no longer allowed.