Temporal migration tries to install btree_gin which already exists

Bug #2037727 reported by Adam Collard
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Committed
Medium
Anton Troyanov

Bug Description

sudo snap refresh maas
2023-09-29T13:12:32Z INFO Waiting for "snap.maas.pebble.service" to stop.
error: cannot perform the following tasks:
- Run post-refresh hook of "maas" snap if present (run hook "post-refresh":
-----
Operations to perform:
  Apply all migrations: auth, contenttypes, maasserver, metadataserver, piston3, sessions, sites
Running migrations:
  No migrations to apply.
Running Temporal migrations:
Failed to apply Temporal migrations
2023-09-29T13:12:57.657Z INFO UpdateSchemeTask started {"config": {"DBName":"","TargetVersion":"","SchemaDir":"/snap/maas/30887/var/lib/maas/temporal/schema/visibility/versioned","IsDryRun":false}, "logging-call-at": "updatetask.go:98"}
2023-09-29T13:12:57.659Z DEBUG Schema Dirs: [v1.2] {"logging-call-at": "updatetask.go:187"}
2023-09-29T13:12:57.660Z INFO Processing schema file: /snap/maas/30887/var/lib/maas/temporal/schema/visibility/versioned/v1.2/advanced_visibility.sql {"logging-call-at": "updatetask.go:233"}
2023-09-29T13:12:57.660Z DEBUG ---- Executing updates for version 1.2 ---- {"logging-call-at": "updatetask.go:151"}
2023-09-29T13:12:57.660Z DEBUG CREATE EXTENSION btree_gin; {"logging-call-at": "updatetask.go:153"}
2023-09-29T13:12:57.660Z ERROR Unable to update SQL schema. {"error": "error executing statement:pq: extension \"btree_gin\" already exists", "logging-call-at": "handler.go:78"}

Traceback (most recent call last):
  File "/snap/maas/30887/bin/maas", line 8, in <module>
    sys.exit(main())
  File "/snap/maas/30887/lib/python3.10/site-packages/maascli/__init__.py", line 39, in main
    options.execute(options)
  File "/snap/maas/30887/lib/python3.10/site-packages/maascli/snap.py", line 433, in __call__
    raise exc
  File "/snap/maas/30887/lib/python3.10/site-packages/maascli/snap.py", line 430, in __call__
    self.handle(options)
  File "/snap/maas/30887/lib/python3.10/site-packages/maascli/snap.py", line 976, in handle
    sys.exit(migrate_db())
  File "/snap/maas/30887/lib/python3.10/site-packages/maascli/snap.py", line 338, in migrate_db
    subprocess.check_call(
  File "/usr/lib/python3.10/subprocess.py", line 369, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/snap/maas/30887/bin/maas-region', 'dbupgrade']' returned non-zero exit status 1.
-----)
ubuntu@jenkins-slave-2:~$

Changed in maas:
assignee: nobody → Anton Troyanov (troyanov)
importance: Undecided → Medium
status: New → In Progress
Changed in maas:
milestone: none → 3.5.0
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Triaged
status: Triaged → Fix Committed
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.