[2.2] Zesty ISO install fails on region controller due to postgresql not running

Bug #1676992 reported by Joshua Powers
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Данило Шеган
2.2
Fix Released
High
Данило Шеган

Bug Description

Using the daily zesty ISO (20170328) the MAAS region controller install option fails due to the psql server not running. Trying to ignore repeats the error, retrying makes no difference.

See the attached screenshot.

Steps to reproduce:
1. Download daily ISO: http://cdimage.ubuntu.com/ubuntu-server/daily
2. Boot ISO
3. Choose "Install MAAS Region Controller"
4. Select all defaults, add usernames and passwords as needed
5. During installing software the error message will appear

Related branches

Revision history for this message
Joshua Powers (powersj) wrote :
description: updated
summary: - zesty region controller install fails
+ [ISO] zesty region controller install fails
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Josh,

Any chance you can attach the DI installer console log?

summary: - [ISO] zesty region controller install fails
+ [2.2] Zesty ISO install fails on region controller due to postgresql not
+ running
Revision history for this message
Joshua Powers (powersj) wrote :

DI syslog attached

Changed in maas:
milestone: none → 2.2.0rc2
Changed in maas:
milestone: 2.2.0rc2 → 2.2.0rc3
Changed in maas:
milestone: 2.2.0rc3 → 2.2.0rc4
Changed in maas:
milestone: 2.2.0rc4 → 2.2.1
Changed in maas:
milestone: 2.2.1 → 2.2.x
Changed in maas:
milestone: 2.2.x → 2.3.0
importance: Undecided → High
status: New → Triaged
Revision history for this message
Joshua Powers (powersj) wrote :

This continues to be an issue with both the Xenial 16.04.3 and the latest daily Artful (Aug 29) ISOs

e4f4c4f753608493242160c1cc11b597 artful-server-amd64.iso
10fcd20619dce11fe094e960c85ba4a9 ubuntu-16.04.3-server-amd64.iso

Revision history for this message
Andres Rodriguez (andreserl) wrote :

So something in the ISO has started causing that postgresql does not run in the installation environment. I think that needs to be figured out, because MAAS needs postgresql to be up for it to work.

Revision history for this message
Данило Шеган (danilo) wrote :

Looking at the log, I strongly suspect this bit is the culprit:

...
Mar 28 20:12:32 in-target: Running in chroot, ignoring request.
Mar 28 20:12:32 in-target: ^M
Mar 28 20:12:32 in-target: invoke-rc.d: policy-rc.d denied execution of restart.^M
Mar 28 20:12:32 in-target: Setting up maas-region-controller (2.2.0~beta3+bzr5815-0ubuntu1) ...
Mar 28 20:12:32 in-target: ^M
Mar 28 20:12:34 in-target: /usr/sbin/policy-rc.d returned 101, not running 'restart postgresql'^M
Mar 28 20:12:34 in-target: dbconfig-common: writing config to /etc/dbconfig-common/maas-region-controller.conf
Mar 28 20:12:34 in-target: ^M
Mar 28 20:12:34 in-target: ^M

Basically, Postgres is not (re)started, so MAAS has nothing to go against. I guess we need to figure out how we can perform a lazy model setup with Postgres not available, or restart Postgres ourselves before attempting to do model changes.

Revision history for this message
Данило Шеган (danilo) wrote :

So, Andres let me know that MAAS already tries to do that by restarting Postgres even when in a chroot with this bit in maas-region-controller.postinst:

deb-systemd-invoke restart postgresql || true

However, trying out "systemctl restart postgresql" in a chroot fails with the "Running in a chroot, ignoring request" error message, so perhaps systemctl has grown this ability recently. Calling "/etc/init.d/postgresql restart" or "service postgresql restart" worked, so we can use that as a work-around, though I am not sure how long this is going to continue working.

Revision history for this message
Данило Шеган (danilo) wrote :

Though, invoke-rc.d has --force option too, will check if that can be passed into deb-systemd-invoke.

Changed in maas:
assignee: nobody → Данило Шеган (danilo)
Changed in maas:
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 2.3.0 → 2.3.0alpha3
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.