Public bug reported: Mahara: 18.10.0 DB: Postgres OS: Linux Brower: N/A
During an upgrade from 17.04 to 18.10, the following error occurs: [INF] 79 (lib/mahara.php:238) Upgrading auth.webservice [WAR] 79 (lib/errors.php:858) Failed to get a recordset: postgres8 error: [-1: ERROR: update or delete on table "oauth_server_registry" violates foreign key constraint "oautservconf_oau_fk" on table "oauth_server_config" [WAR] 79 (lib/errors.php:858) DETAIL: Key (id)=(7) is still referenced from table "oauth_server_config".] in adodb_throw(DELETE FROM "oauth_server_registry" WHERE externalserviceid IN (SELECT id FROM "external_services" WHERE component = ?), Array)Command was: DELETE FROM "oauth_server_registry" WHERE externalserviceid IN (SELECT id FROM "external_services" WHERE component = ?) and values was (0:module/lti) Call stack (most recent first): * log_message("Failed to get a recordset: postgres8 error: [-1: E...", 8, true, true) at /var/www/mahara/htdocs/lib/errors.php:95 * log_warn("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/mahara/htdocs/lib/errors.php:858 * SQLException->__construct("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/mahara/htdocs/lib/dml.php:1025 * delete_records_sql("DELETE FROM "oauth_server_registry" WHERE external...", array(size 1)) at /var/www/mahara/htdocs/lib/dml.php:1002 * delete_records_select("oauth_server_registry", "WHERE externalserviceid IN (SELECT id FROM {extern...", array(size 1)) at /var/www/mahara/htdocs/webservice/lib.php:1529 * external_delete_descriptions("module/lti") at /var/www/mahara/htdocs/webservice/lib.php:1570 * external_reload_webservices() at /var/www/mahara/htdocs/auth/webservice/db/upgrade.php:594 * xmldb_auth_webservice_upgrade("2017030600") at /var/www/mahara/htdocs/lib/upgrade.php:450 * upgrade_plugin(object(stdClass)) at /var/www/mahara/htdocs/lib/mahara.php:272 * upgrade_mahara(array(size 1)) at /var/www/mahara/htdocs/admin/cli/upgrade.php:56 [WAR] 79 (lib/dml.php:1025) Failed to get a recordset: postgres8 error: [-1: ERROR: update or delete on table "oauth_server_registry" violates foreign key constraint "oautservconf_oau_fk" on table "oauth_server_config" [WAR] 79 (lib/dml.php:1025) DETAIL: Key (id)=(7) is still referenced from table "oauth_server_config".] in adodb_throw(DELETE FROM "oauth_server_registry" WHERE externalserviceid IN (SELECT id FROM "external_services" WHERE component = ?), Array)Command was: DELETE FROM "oauth_server_registry" WHERE externalserviceid IN (SELECT id FROM "external_services" WHERE component = ?) and values was (0:module/lti) Call stack (most recent first): * delete_records_sql("DELETE FROM "oauth_server_registry" WHERE external...", array(size 1)) at /var/www/mahara/htdocs/lib/dml.php:1002 * delete_records_select("oauth_server_registry", "WHERE externalserviceid IN (SELECT id FROM {extern...", array(size 1)) at /var/www/mahara/htdocs/webservice/lib.php:1529 * external_delete_descriptions("module/lti") at /var/www/mahara/htdocs/webservice/lib.php:1570 * external_reload_webservices() at /var/www/mahara/htdocs/auth/webservice/db/upgrade.php:594 * xmldb_auth_webservice_upgrade("2017030600") at /var/www/mahara/htdocs/lib/upgrade.php:450 * upgrade_plugin(object(stdClass)) at /var/www/mahara/htdocs/lib/mahara.php:272 * upgrade_mahara(array(size 1)) at /var/www/mahara/htdocs/admin/cli/upgrade.php:56 The lti service had been configured in the past but is now disabled. During the upgrade, it tries to clean up the tables for unused modules and the lti comes up in the list. But, it's failing due to a foreign key constraint on the oauth_server_config table. The external_delete_descriptions() needs to also remove records from the oauth_server_config table before removing records from the oauth_server_registry table. ** Affects: mahara Importance: Undecided Assignee: Ghada El-Zoghbi (ghada-z) Status: New ** Changed in: mahara Assignee: (unassigned) => Ghada El-Zoghbi (ghada-z) -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1802046 Title: Upgrade to 18.10 error on oAuth clean up Status in Mahara: New Bug description: Mahara: 18.10.0 DB: Postgres OS: Linux Brower: N/A During an upgrade from 17.04 to 18.10, the following error occurs: [INF] 79 (lib/mahara.php:238) Upgrading auth.webservice [WAR] 79 (lib/errors.php:858) Failed to get a recordset: postgres8 error: [-1: ERROR: update or delete on table "oauth_server_registry" violates foreign key constraint "oautservconf_oau_fk" on table "oauth_server_config" [WAR] 79 (lib/errors.php:858) DETAIL: Key (id)=(7) is still referenced from table "oauth_server_config".] in adodb_throw(DELETE FROM "oauth_server_registry" WHERE externalserviceid IN (SELECT id FROM "external_services" WHERE component = ?), Array)Command was: DELETE FROM "oauth_server_registry" WHERE externalserviceid IN (SELECT id FROM "external_services" WHERE component = ?) and values was (0:module/lti) Call stack (most recent first): * log_message("Failed to get a recordset: postgres8 error: [-1: E...", 8, true, true) at /var/www/mahara/htdocs/lib/errors.php:95 * log_warn("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/mahara/htdocs/lib/errors.php:858 * SQLException->__construct("Failed to get a recordset: postgres8 error: [-1: E...") at /var/www/mahara/htdocs/lib/dml.php:1025 * delete_records_sql("DELETE FROM "oauth_server_registry" WHERE external...", array(size 1)) at /var/www/mahara/htdocs/lib/dml.php:1002 * delete_records_select("oauth_server_registry", "WHERE externalserviceid IN (SELECT id FROM {extern...", array(size 1)) at /var/www/mahara/htdocs/webservice/lib.php:1529 * external_delete_descriptions("module/lti") at /var/www/mahara/htdocs/webservice/lib.php:1570 * external_reload_webservices() at /var/www/mahara/htdocs/auth/webservice/db/upgrade.php:594 * xmldb_auth_webservice_upgrade("2017030600") at /var/www/mahara/htdocs/lib/upgrade.php:450 * upgrade_plugin(object(stdClass)) at /var/www/mahara/htdocs/lib/mahara.php:272 * upgrade_mahara(array(size 1)) at /var/www/mahara/htdocs/admin/cli/upgrade.php:56 [WAR] 79 (lib/dml.php:1025) Failed to get a recordset: postgres8 error: [-1: ERROR: update or delete on table "oauth_server_registry" violates foreign key constraint "oautservconf_oau_fk" on table "oauth_server_config" [WAR] 79 (lib/dml.php:1025) DETAIL: Key (id)=(7) is still referenced from table "oauth_server_config".] in adodb_throw(DELETE FROM "oauth_server_registry" WHERE externalserviceid IN (SELECT id FROM "external_services" WHERE component = ?), Array)Command was: DELETE FROM "oauth_server_registry" WHERE externalserviceid IN (SELECT id FROM "external_services" WHERE component = ?) and values was (0:module/lti) Call stack (most recent first): * delete_records_sql("DELETE FROM "oauth_server_registry" WHERE external...", array(size 1)) at /var/www/mahara/htdocs/lib/dml.php:1002 * delete_records_select("oauth_server_registry", "WHERE externalserviceid IN (SELECT id FROM {extern...", array(size 1)) at /var/www/mahara/htdocs/webservice/lib.php:1529 * external_delete_descriptions("module/lti") at /var/www/mahara/htdocs/webservice/lib.php:1570 * external_reload_webservices() at /var/www/mahara/htdocs/auth/webservice/db/upgrade.php:594 * xmldb_auth_webservice_upgrade("2017030600") at /var/www/mahara/htdocs/lib/upgrade.php:450 * upgrade_plugin(object(stdClass)) at /var/www/mahara/htdocs/lib/mahara.php:272 * upgrade_mahara(array(size 1)) at /var/www/mahara/htdocs/admin/cli/upgrade.php:56 The lti service had been configured in the past but is now disabled. During the upgrade, it tries to clean up the tables for unused modules and the lti comes up in the list. But, it's failing due to a foreign key constraint on the oauth_server_config table. The external_delete_descriptions() needs to also remove records from the oauth_server_config table before removing records from the oauth_server_registry table. To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1802046/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp