← Back to team overview

mahara-contributors team mailing list archive

[Bug 1934871] [NEW] Upgrade from 20.04 to 21.04 fails with "Duplicate entry 'verifier' for key 'PRIMARY'"

 

Public bug reported:

Upgrading from Upgrade from 20.04 to 21.04 vi command line script failed
before (see https://bugs.launchpad.net/bugs/1930998 -- everything else
as documented there). Now restarting with "-f" fails:

root@server:/var/www/mahara/htdocs/admin# sudo -u www-data php cli/upgrade.php -f
[INF] ff (admin/cli/upgrade.php:70) Upgrading Mahara
[INF] ff (lib/mahara.php:242) core wird aktualisiert
[DBG] ff (lib/db/upgrade.php:1659) Update the View table to add coverimage column
[DBG] ff (lib/db/upgrade.php:1662) Adding coverimage to view table
[DBG] ff (lib/db/upgrade.php:1670) Update the Collection table to add coverimage column
[DBG] ff (lib/db/upgrade.php:1673) Adding coverimage to collection table
[DBG] ff (lib/db/upgrade.php:1684) Fixing skins for new format options
[DBG] ff (lib/db/upgrade.php:1705) Moving page description to a text block on the top of the page
[DBG] ff (lib/db/upgrade.php:1745) 1000/3786
[DBG] ff (lib/db/upgrade.php:1745) 2000/3786
[DBG] ff (lib/db/upgrade.php:1745) 3000/3786
[DBG] ff (lib/db/upgrade.php:1745) 3786/3786
[DBG] ff (lib/db/upgrade.php:1754) Adding progress completion column to collection table
[DBG] ff (lib/db/upgrade.php:1764) Adding progress completion column to institution table
[DBG] ff (lib/db/upgrade.php:1776) Remove sequence from artefact_plans_plan "artefact" field
[DBG] ff (lib/mahara.php:2222) Key primary exists. Create skipped
[DBG] ff (lib/db/upgrade.php:1793) Remove sequence from artefact_plans_task "artefact" field
[DBG] ff (lib/mahara.php:2222) Key primary exists. Create skipped
[DBG] ff (lib/db/upgrade.php:1810) Add quickedit column to blocktype_installed table
[DBG] ff (lib/db/upgrade.php:1824) Adding locktemplate column to view table
[DBG] ff (lib/db/upgrade.php:1831) Adding view_instructions_lock
[DBG] ff (lib/db/upgrade.php:1847) Remove host FK from view table
[DBG] ff (lib/mahara.php:2222) Key submittedhostfk does not exist. Delete skipped
[DBG] ff (lib/db/upgrade.php:1855) Remove host FK from collection table
[DBG] ff (lib/mahara.php:2222) Key submittedhostfk does not exist. Delete skipped
[DBG] ff (lib/db/upgrade.php:1863) create client_connections_config table to hold extra configuration information
[DBG] ff (lib/db/upgrade.php:1902) Adding unique key to tag table
[DBG] ff (lib/db/upgrade.php:1927) Install new Maroon theme fonts
[DBG] ff (lib/db/upgrade.php:1933) Adjust archived_submissions table
[DBG] ff (lib/db/upgrade.php:1943) Fix certain fields to have correct collation
[DBG] ff (lib/db/upgrade.php:1966) Add new fields to export_queue and archived submissions tables
[DBG] ff (lib/db/upgrade.php:1996) Adjust navigation block on collection pages in old format
[DBG] ff (lib/db/upgrade.php:2033) Remove not null restriction for "usr" field in "artefact_peer_assessment"
[DBG] ff (lib/db/upgrade.php:2041) Change the constraint on view_instruction_lock.originaltemplate field
[DBG] ff (lib/db/upgrade.php:2055) Adding verifier role
[WAR] ff (lib/errors.php:853) Failed to get a recordset: mysqli error: [1062: Duplicate entry 'verifier' for key 'PRIMARY'] in EXECUTE("INSERT INTO "usr_access_roles" ("role", "see_block_content") VALUES ('verifier', 1)")Command was: INSERT INTO "usr_access_roles" ("role", "see_block_content") VALUES (?, ?) and values was (role:verifier,see_block_content:1)
Call stack (most recent first):
  * log_message(string(size 329), integer, true, true) at /var/www/mahara-21.04.1/htdocs/lib/errors.php:89
  * log_warn(string(size 329)) at /var/www/mahara-21.04.1/htdocs/lib/errors.php:853
  * SQLException->__construct(string(size 329)) at /var/www/mahara-21.04.1/htdocs/lib/dml.php:1236
  * insert_record(string(size 16), object(stdClass)) at /var/www/mahara-21.04.1/htdocs/lib/db/upgrade.php:2061
  * xmldb_core_upgrade(string(size 10)) at /var/www/mahara-21.04.1/htdocs/lib/upgrade.php:376
  * upgrade_core(object(stdClass)) at /var/www/mahara-21.04.1/htdocs/lib/mahara.php:276
  * upgrade_mahara(array(size 1)) at /var/www/mahara-21.04.1/htdocs/admin/cli/upgrade.php:74
[WAR] ff (lib/dml.php:1236) Failed to get a recordset: mysqli error: [1062: Duplicate entry 'verifier' for key 'PRIMARY'] in EXECUTE("INSERT INTO "usr_access_roles" ("role", "see_block_content") VALUES ('verifier', 1)")Command was: INSERT INTO "usr_access_roles" ("role", "see_block_content") VALUES (?, ?) and values was (role:verifier,see_block_content:1)
Call stack (most recent first):
  * insert_record(string(size 16), object(stdClass)) at /var/www/mahara-21.04.1/htdocs/lib/db/upgrade.php:2061
  * xmldb_core_upgrade(string(size 10)) at /var/www/mahara-21.04.1/htdocs/lib/upgrade.php:376
  * upgrade_core(object(stdClass)) at /var/www/mahara-21.04.1/htdocs/lib/mahara.php:276
  * upgrade_mahara(array(size 1)) at /var/www/mahara-21.04.1/htdocs/admin/cli/upgrade.php:74

** Affects: mahara
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1934871

Title:
  Upgrade from 20.04 to 21.04 fails with "Duplicate entry 'verifier' for
  key 'PRIMARY'"

Status in Mahara:
  New

Bug description:
  Upgrading from Upgrade from 20.04 to 21.04 vi command line script
  failed before (see https://bugs.launchpad.net/bugs/1930998 --
  everything else as documented there). Now restarting with "-f" fails:

  root@server:/var/www/mahara/htdocs/admin# sudo -u www-data php cli/upgrade.php -f
  [INF] ff (admin/cli/upgrade.php:70) Upgrading Mahara
  [INF] ff (lib/mahara.php:242) core wird aktualisiert
  [DBG] ff (lib/db/upgrade.php:1659) Update the View table to add coverimage column
  [DBG] ff (lib/db/upgrade.php:1662) Adding coverimage to view table
  [DBG] ff (lib/db/upgrade.php:1670) Update the Collection table to add coverimage column
  [DBG] ff (lib/db/upgrade.php:1673) Adding coverimage to collection table
  [DBG] ff (lib/db/upgrade.php:1684) Fixing skins for new format options
  [DBG] ff (lib/db/upgrade.php:1705) Moving page description to a text block on the top of the page
  [DBG] ff (lib/db/upgrade.php:1745) 1000/3786
  [DBG] ff (lib/db/upgrade.php:1745) 2000/3786
  [DBG] ff (lib/db/upgrade.php:1745) 3000/3786
  [DBG] ff (lib/db/upgrade.php:1745) 3786/3786
  [DBG] ff (lib/db/upgrade.php:1754) Adding progress completion column to collection table
  [DBG] ff (lib/db/upgrade.php:1764) Adding progress completion column to institution table
  [DBG] ff (lib/db/upgrade.php:1776) Remove sequence from artefact_plans_plan "artefact" field
  [DBG] ff (lib/mahara.php:2222) Key primary exists. Create skipped
  [DBG] ff (lib/db/upgrade.php:1793) Remove sequence from artefact_plans_task "artefact" field
  [DBG] ff (lib/mahara.php:2222) Key primary exists. Create skipped
  [DBG] ff (lib/db/upgrade.php:1810) Add quickedit column to blocktype_installed table
  [DBG] ff (lib/db/upgrade.php:1824) Adding locktemplate column to view table
  [DBG] ff (lib/db/upgrade.php:1831) Adding view_instructions_lock
  [DBG] ff (lib/db/upgrade.php:1847) Remove host FK from view table
  [DBG] ff (lib/mahara.php:2222) Key submittedhostfk does not exist. Delete skipped
  [DBG] ff (lib/db/upgrade.php:1855) Remove host FK from collection table
  [DBG] ff (lib/mahara.php:2222) Key submittedhostfk does not exist. Delete skipped
  [DBG] ff (lib/db/upgrade.php:1863) create client_connections_config table to hold extra configuration information
  [DBG] ff (lib/db/upgrade.php:1902) Adding unique key to tag table
  [DBG] ff (lib/db/upgrade.php:1927) Install new Maroon theme fonts
  [DBG] ff (lib/db/upgrade.php:1933) Adjust archived_submissions table
  [DBG] ff (lib/db/upgrade.php:1943) Fix certain fields to have correct collation
  [DBG] ff (lib/db/upgrade.php:1966) Add new fields to export_queue and archived submissions tables
  [DBG] ff (lib/db/upgrade.php:1996) Adjust navigation block on collection pages in old format
  [DBG] ff (lib/db/upgrade.php:2033) Remove not null restriction for "usr" field in "artefact_peer_assessment"
  [DBG] ff (lib/db/upgrade.php:2041) Change the constraint on view_instruction_lock.originaltemplate field
  [DBG] ff (lib/db/upgrade.php:2055) Adding verifier role
  [WAR] ff (lib/errors.php:853) Failed to get a recordset: mysqli error: [1062: Duplicate entry 'verifier' for key 'PRIMARY'] in EXECUTE("INSERT INTO "usr_access_roles" ("role", "see_block_content") VALUES ('verifier', 1)")Command was: INSERT INTO "usr_access_roles" ("role", "see_block_content") VALUES (?, ?) and values was (role:verifier,see_block_content:1)
  Call stack (most recent first):
    * log_message(string(size 329), integer, true, true) at /var/www/mahara-21.04.1/htdocs/lib/errors.php:89
    * log_warn(string(size 329)) at /var/www/mahara-21.04.1/htdocs/lib/errors.php:853
    * SQLException->__construct(string(size 329)) at /var/www/mahara-21.04.1/htdocs/lib/dml.php:1236
    * insert_record(string(size 16), object(stdClass)) at /var/www/mahara-21.04.1/htdocs/lib/db/upgrade.php:2061
    * xmldb_core_upgrade(string(size 10)) at /var/www/mahara-21.04.1/htdocs/lib/upgrade.php:376
    * upgrade_core(object(stdClass)) at /var/www/mahara-21.04.1/htdocs/lib/mahara.php:276
    * upgrade_mahara(array(size 1)) at /var/www/mahara-21.04.1/htdocs/admin/cli/upgrade.php:74
  [WAR] ff (lib/dml.php:1236) Failed to get a recordset: mysqli error: [1062: Duplicate entry 'verifier' for key 'PRIMARY'] in EXECUTE("INSERT INTO "usr_access_roles" ("role", "see_block_content") VALUES ('verifier', 1)")Command was: INSERT INTO "usr_access_roles" ("role", "see_block_content") VALUES (?, ?) and values was (role:verifier,see_block_content:1)
  Call stack (most recent first):
    * insert_record(string(size 16), object(stdClass)) at /var/www/mahara-21.04.1/htdocs/lib/db/upgrade.php:2061
    * xmldb_core_upgrade(string(size 10)) at /var/www/mahara-21.04.1/htdocs/lib/upgrade.php:376
    * upgrade_core(object(stdClass)) at /var/www/mahara-21.04.1/htdocs/lib/mahara.php:276
    * upgrade_mahara(array(size 1)) at /var/www/mahara-21.04.1/htdocs/admin/cli/upgrade.php:74

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1934871/+subscriptions