Comment 0 for bug 2044851

Revision history for this message
Amjad Chami (amjad-chami) wrote :

When the postgresql-ha fails to serialize access due to concurrent update:

2023-11-26 22:46:11.696 UTC [178210] maas@maasdb ERROR: could not serialize access due to concurrent update
2023-11-26 22:46:11.696 UTC [178210] maas@maasdb STATEMENT: SELECT "maasserver_staticipaddress"."id", "maasserver_staticipaddress"."created", "maasserver_staticipaddress"."updated", "maasserver_staticipaddress"."ip", "maasserver_staticipaddress"."alloc_type", "maasserver_staticipaddress"."subnet_id", "maasserver_staticipaddress"."user_id", "maasserver_staticipaddress"."lease_time", "maasserver_staticipaddress"."temp_expires_on" FROM "maasserver_staticipaddress" WHERE ("maasserver_staticipaddress"."alloc_type" = 6 AND "maasserver_staticipaddress"."ip" = '10.244.40.160'::inet) LIMIT 21 FOR UPDATE

50-maas-commisioning-1 throws the following error:

django.db.utils.IntegrityError: null value in column "source" of relation "maasserver_dnspublication" violates not-null constraint
        DETAIL: Failing row contains (96, 96, 2023-11-26 22:46:19.67433+00, null).
        CONTEXT: SQL statement "INSERT INTO maasserver_dnspublication
            (serial, created, source)
          VALUES
            (nextval('maasserver_zone_serial_seq'), now(),
             substring(reason FOR 255))"
        PL/pgSQL function sys_dns_publish_update(text) line 3 at SQL statement
        SQL statement "SELECT sys_dns_publish_update(
                'ip ' || host(sip.ip) || ' unlinked from resource ' ||
                COALESCE(resource.name, 'NULL') || ' on zone ' || domain.name)"
        PL/pgSQL function sys_dns_dnsresource_ip_unlink() line 17 at PERFORM

run: https://solutions.qa.canonical.com/testruns/bfd935c2-6cc8-4143-9722-9b424a848998
artefacts: https://oil-jenkins.canonical.com/artifacts/bfd935c2-6cc8-4143-9722-9b424a848998/index.html
files messages found in: /10.244.40.30/var/log/postgresql/postgresql-14-ha.log , 10.244.40.30/var/snap/maas/common/log/regiond.log