Comment 2 for bug 1458895

Ricardo Bánffy (rbanffy) wrote :

We managed to reproduce the issue. From the PostgreSQL log:

2015-05-27 16:37:25 EDT ERROR: deadlock detected [87/718]
2015-05-27 16:37:25 EDT DETAIL: Process 22120 waits for AccessExclusiveLock on relation 16759 of database 16385; blocked by process
 22204.
        Process 22204 waits for AccessShareLock on relation 16585 of database 16385; blocked by process 22120.
        Process 22120: DROP TRIGGER IF EXISTS maasserver_nodegroup_nodegroup_create_notify ON maasserver_nodegroup;
        CREATE TRIGGER maasserver_nodegroup_nodegroup_create_notify
        AFTER INSERT ON maasserver_nodegroup
        FOR EACH ROW

        EXECUTE PROCEDURE nodegroup_create_notify();

        Process 22204:
                    SELECT DISTINCT ON (node.hostname)
                        node.hostname, lease.ip
                    FROM maasserver_macaddress AS mac
                    JOIN maasserver_node AS node ON node.id = mac.node_id
                    JOIN maasserver_dhcplease AS lease ON lease.mac = mac.mac_address
                    WHERE lease.nodegroup_id = 1
                    AND (node.status = 9 OR node.status = 6)
                    ORDER BY node.hostname, mac.id

2015-05-27 16:37:25 EDT HINT: See server log for query details.