not able to install MAAS from snap on ppc64le

Bug #1887096 reported by Patricia Domingues
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Alberto Donato
Snapcraft
New
Undecided
Unassigned
The Ubuntu-power-systems project
Fix Released
Undecided
Unassigned

Bug Description

I'm not able to install MAAS from snap on ppc64le machines.
I've Tried with Ubuntu Bionic and Focal:

First, upgrading snapd:
`Unpacking snapd (2.45.1+18.04) over (2.42.1+18.04)`

```
$ sudo snap install maas
error: cannot perform the following tasks:
- Run install hook of "maas" snap if present (run hook "install": /snap/maas/7809/meta/hooks/install: line 61: 22535 Segmentation fault (core dumped) "$SNAP/bin/maas-wrapper" migrate --configure)
```

```
ubuntu@wichita:~$ snap list
Name Version Rev Tracking Publisher Notes
core18 20200427 1752 latest/stable canonical* base
maas-cli 0.6.5 15 latest/stable canonical* -
snapd 2.45.1 8143 latest/stable canonical* snapd
```

trying 2.7:
```
$ sudo snap install maas --channel=2.7/stable
error: cannot perform the following tasks:
- Run install hook of "maas" snap if present (run hook "install": signal: segmentation fault (core dumped))
```

Tags: maas ppc64el
Revision history for this message
Taihsiang Ho (tai271828) wrote :

For arm64 platform I have similar (but not sure if it is the same) failure. Please feel free to let me know if it is better to report with another new bug:

```
ubuntu@awrep6:~$ lxc exec maas-snap -- /bin/bash root@maas-snap:~# snap list
Name Version Rev Tracking Publisher Notes
core18 20200427 1753 latest/stable canonical✓ base
lxd 4.2 15727 latest/stable/… canonical✓ -
snapd 2.45.1 8147 latest/stable canonical✓ snapd
root@maas-snap:~# snap install maas
error: cannot perform the following tasks:
- Run install hook of "maas" snap if present (run hook "install": chown: changing ownership of '/var/snap/maas/common/log': Invalid argument)
root@maas-snap:~#
```

Revision history for this message
Frank Heimes (fheimes) wrote :

Just as a side note and for the records, I was able to successfully snap install maas on s390x and did not ran into these issues (but so far I only did the snap install, nothing more yet).

Revision history for this message
John Lotoski (johnny101) wrote :

For anyone having the same error that @taihsiangho mentions above, one possible cause may be from using LXC/LXD containers and not having an appropriate UID mapping for the snap_daemon user at the default high UID. See the following discourse thread for details:

https://discourse.maas.io/t/unable-to-install-maas-snap-on-lxd/3544

Revision history for this message
Alberto Donato (ack) wrote :

Patricia,

is the snap being installed in a container or directly on the host?

Changed in maas:
status: New → Incomplete
Revision history for this message
Patricia Domingues (patriciasd) wrote :

that test was directly on a Power8 baremetal, tried again on the same system, now it has 21.04/Hirsute and got the same: ```
ubuntu@wichita:~$ sudo snap install maas

error: cannot perform the following tasks:
- Run install hook of "maas" snap if present (run hook "install": /snap/maas/12544/meta/hooks/install: line 71: 4132823 Segmentation fault (core dumped) "$SNAP/bin/maas-wrapper" migrate --configure)
```

let me know if you need any more tests, I can do.

Revision history for this message
Björn Tillenius (bjornt) wrote :

I can reproduce this on our ppc system as well, and I've confirmed that it affects 3.0 as well.

Changed in maas:
milestone: none → next
status: Incomplete → Triaged
importance: Undecided → Medium
Revision history for this message
Alberto Donato (ack) wrote (last edit ):

The segfault seems to be caused by libsnapcraft-preload.so, which is LD_PRELOAD'd in the bin/ld-preload wrapper script

Revision history for this message
Alberto Donato (ack) wrote :

As a simpler reproducer, this segfaults:

sudo snap run --shell maas.supervisor -c 'LD_PRELOAD=$SNAP/lib/libsnapcraft-preload.so cat /etc/hostname'

Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
status: New → Confirmed
tags: added: maas ppc64el
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

There seems to be a problem with snapcraft preload. Any ideas? Is it still reproducible?

Changed in maas:
milestone: next → none
Revision history for this message
Patricia Domingues (patriciasd) wrote :

tried with Focal on a Power9 server `snapd 2.54.4 15180 latest/stable canonical✓ snapd`
and still the same error:

```
$ sudo snap install maas
error: cannot perform the following tasks:
- Run install hook of "maas" snap if present (run hook "install": /snap/maas/18197/meta/hooks/install: line 71: 7774 Segmentation fault (core dumped) "$SNAP/bin/maas-wrapper" migrate --configure)
```

It was going to install MAAS 3.1.0:
`3.1/stable: 3.1.0-10901-g.f1f8f1505 2022-01-19 (18197) 146MB -`

Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

MAAS 3.3 is based on 22.04 and uses an updated toolchain. It would help us if someone could confirm if the issue is reproducible on MAAS 3.3, as we currently don't have access to Power9 machines to test it ourselves.

Changed in maas:
status: Triaged → Incomplete
Revision history for this message
Patricia Domingues (patriciasd) wrote :

Trying with --edge channel I can install MAAS on a Power9 (tiselius):

host with Jammy: `Description: Ubuntu 22.04.1 LTS`

` 3.3/edge: 3.3.0~rc1-13134-g.e94f9008d 2022-12-14 (25371)`

~$ sudo snap install maas --channel 3.3/edge
maas (3.3/edge) 3.3.0~rc1-13134-g.e94f9008d from Canonical✓ installed

:~$ snap list |grep maas
maas 3.3.0~rc1-13134-g.e94f9008d 25371 3.3/edge canonical** -
maas-cli 0.6.8 80 latest/stable canonical** -

Thank you.

Alberto Donato (ack)
Changed in maas:
milestone: none → 3.3.0-rc2
status: Incomplete → Fix Committed
Changed in ubuntu-power-systems:
status: Confirmed → Fix Committed
Changed in maas:
assignee: nobody → Alberto Donato (ack)
Alberto Donato (ack)
Changed in maas:
status: Fix Committed → Fix Released
Changed in ubuntu-power-systems:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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