[snap] Upgrade from 2.3.3 to 2.4.0 fails with inability to connect to postgres

Bug #1777111 reported by Florian Guitton
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Unassigned
2.4
Won't Fix
Critical
Unassigned

Bug Description

Hello everybody,

While trying to upgrade a 2.3.3-6498-ge4db91d snap installed in devmode, to the current 2.4.0-6981-g011e51b in beta, the refresh fails with the error below.

Please let me know which extra bit of information I can provide to help.
Best day to you all !

root@maas-region:# sudo snap refresh --devmode --beta maas
error: cannot perform the following tasks:
- Run configure hook of "maas" snap if present (run hook "configure":
-----
Traceback (most recent call last):
  File "/snap/maas/2377/lib/python3.6/site-packages/maascli/snappy.py", line 378, in wait_for_postgresql
    run_sql('SELECT now();')
  File "/snap/maas/2377/lib/python3.6/site-packages/maascli/snappy.py", line 370, in run_sql
    stderr=subprocess.STDOUT)
  File "/snap/maas/2377/usr/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/snap/maas/2377/usr/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/snap/maas/2377/bin/psql', '-h', '/var/snap/maas/common/db', '-d', 'postgres', '-U', 'postgres', '-c', 'SELECT now();']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/snap/maas/2377/bin/maas", line 24, in <module>
    sys.exit(run())
  File "/snap/maas/2377/bin/maas", line 21, in run
    return maascli.main()
  File "/snap/maas/2377/lib/python3.6/site-packages/maascli/__init__.py", line 29, in main
    options.execute(options)
  File "/snap/maas/2377/lib/python3.6/site-packages/maascli/snappy.py", line 612, in __call__
    raise exc
  File "/snap/maas/2377/lib/python3.6/site-packages/maascli/snappy.py", line 609, in __call__
    self.handle(options)
  File "/snap/maas/2377/lib/python3.6/site-packages/maascli/snappy.py", line 1079, in handle
    wait_for_postgresql()
  File "/snap/maas/2377/lib/python3.6/site-packages/maascli/snappy.py", line 383, in wait_for_postgresql
    timeout))
TimeoutError: Unable to connect to postgresql after 60 seconds.
-----)

Changed in maas:
status: New → Incomplete
summary: - Upgrade from 2.3.3 to 2.4.0 fails with inability to connect to postgres
+ [snap] Upgrade from 2.3.3 to 2.4.0 fails with inability to connect to
+ postgres
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Florian,

Thanks for reporting this issue. Since the 2.4 snap uses the base18, the upgrade process has not yet being ironed out.

Changed in maas:
milestone: none → 2.5.0
importance: Undecided → Critical
Revision history for this message
Florian Guitton (f-guitton) wrote :

Hello Andres,

No problem, I'm happy to provide any information you may need, just let me know :)

Best,

Changed in maas:
milestone: 2.5.0 → 2.5.x
Revision history for this message
Andres Rodriguez (andreserl) wrote :

The MAAS 2.6 snap now supports upgrading from an earlier version of the snap.

Changed in maas:
milestone: 2.5.x → 2.6.0
status: Incomplete → 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.