Moodle
  1. Moodle
  2. MDL-27767

Installation fails if admin->id is not 2

    Details

    • Database:
      MySQL
    • Testing Instructions:
      Hide
      • Test installation on a normal database
      • In mysql alter the auto increment offset (google it) and test an installation - check you get the notice but things still install fine
      • Either set up a multimaster replication system or hack install.php line 159 and add a couple of users between guest and admin - check you get notices and things still install fine.
      • Run functional DB tests - just cause you can.
      Show
      Test installation on a normal database In mysql alter the auto increment offset (google it) and test an installation - check you get the notice but things still install fine Either set up a multimaster replication system or hack install.php line 159 and add a couple of users between guest and admin - check you get notices and things still install fine. Run functional DB tests - just cause you can.
    • Workaround:
      Hide

      By changing line 176 in lib/db/install.php to "if ($admin->id != 3) {" I was able to install without a problem. If the admin id must be 2, it should be set explicitly instead of relying on auto-increment. Otherwise, maybe it should just check that the admin user insert was successful?

      Show
      By changing line 176 in lib/db/install.php to "if ($admin->id != 3) {" I was able to install without a problem. If the admin id must be 2, it should be set explicitly instead of relying on auto-increment. Otherwise, maybe it should just check that the admin user insert was successful?
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      wip-MDL-27767-master

      Description

      We array replicate our MySQL server to a co-located backup server. In order to further avoid index collisions, we offset the auto-incrementing (1 server uses odds, the other uses evens). However, while installing Moodle 2.0.3, it throws the exception "Unexpected new admin user id!" if the $admin->id is not 2 ( line 176 in lib/db/install.php ). There is a continue button below this, but when clicked it brings up two errors: "Config table does not contain version, can not continue, sorry." and "Coding error detected, it must be fixed by a programmer: block_manager has not yet loaded the blocks, to it is too soon to request the information you asked for."

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Charles Fulton added a comment -

            I see the explicit test for the admin id equaling 2 was added in August (https://github.com/moodle/moodle/commit/19e7a192891c199353ae1da439e82b7920edfd3c#lib/db/install.php). Is this really necessary? Are there hard-coded references to "2" elsewhere in the code?

            Show
            Charles Fulton added a comment - I see the explicit test for the admin id equaling 2 was added in August ( https://github.com/moodle/moodle/commit/19e7a192891c199353ae1da439e82b7920edfd3c#lib/db/install.php ). Is this really necessary? Are there hard-coded references to "2" elsewhere in the code?
            Hide
            Michael de Raadt added a comment -

            That's a good question.

            Was there a comment with that change that would relate the change back to a Tracker issue? I couldn't find an issue around that time that might have affected the change.

            Michael;

            Show
            Michael de Raadt added a comment - That's a good question. Was there a comment with that change that would relate the change back to a Tracker issue? I couldn't find an issue around that time that might have affected the change. Michael;
            Hide
            Charles Fulton added a comment -

            I couldn't find anything in tracker and there's no bug referenced. A couple quick git greps suggest there wouldn't be any harm in rolling it back but I'd like to hear from Petr since he made the change:

            cfulton@www:~/moodles/testgit$ git grep n \$CFG\>siteadmins
            admin/index.php:343: $adminuser = get_complete_user_data('id', $CFG->siteadmins);
            admin/report/security/lib.php:745: WHERE u.id IN ($CFG->siteadmins)";
            admin/roles/admins.php:72: foreach(explode(',', $CFG->siteadmins) as $admin) {
            admin/roles/admins.php:84: foreach(explode(',', $CFG->siteadmins) as $admin) {
            admin/roles/lib.php:1507: $admins = explode(',', $CFG->siteadmins);
            admin/roles/lib.php:1572: $wherecondition = "$wherecondition AND id IN ($CFG->siteadmins)";
            admin/roles/lib.php:1574: $wherecondition = "id IN ($CFG->siteadmins)";
            lib/accesslib.php:806: $siteadmins = explode(',', $CFG->siteadmins);
            lib/datalib.php:80: if (empty($CFG->siteadmins)) { // Should not happen on an ordinary site
            lib/datalib.php:86: WHERE u.deleted = 0 AND u.id IN ($CFG->siteadmins)";
            lib/db/upgrade.php:2883: // and store them in the new $CFG->siteadmins setting as comma separated list
            lib/db/upgrade.php:3727: if ($admins = explode(',', $CFG->siteadmins)) {
            lib/simpletest/testaccesslib.php:126: $CFG->siteadmins = $users['a']->id;
            cfulton@www:~/moodles/testgit$ git grep -n \$siteadmins
            lib/accesslib.php:806: $siteadmins = explode(',', $CFG->siteadmins);
            lib/accesslib.php:807: return in_array($userid, $siteadmins);

            Show
            Charles Fulton added a comment - I couldn't find anything in tracker and there's no bug referenced. A couple quick git greps suggest there wouldn't be any harm in rolling it back but I'd like to hear from Petr since he made the change: cfulton@www:~/moodles/testgit$ git grep n \$CFG \>siteadmins admin/index.php:343: $adminuser = get_complete_user_data('id', $CFG->siteadmins); admin/report/security/lib.php:745: WHERE u.id IN ($CFG->siteadmins)"; admin/roles/admins.php:72: foreach(explode(',', $CFG->siteadmins) as $admin) { admin/roles/admins.php:84: foreach(explode(',', $CFG->siteadmins) as $admin) { admin/roles/lib.php:1507: $admins = explode(',', $CFG->siteadmins); admin/roles/lib.php:1572: $wherecondition = "$wherecondition AND id IN ($CFG->siteadmins)"; admin/roles/lib.php:1574: $wherecondition = "id IN ($CFG->siteadmins)"; lib/accesslib.php:806: $siteadmins = explode(',', $CFG->siteadmins); lib/datalib.php:80: if (empty($CFG->siteadmins)) { // Should not happen on an ordinary site lib/datalib.php:86: WHERE u.deleted = 0 AND u.id IN ($CFG->siteadmins)"; lib/db/upgrade.php:2883: // and store them in the new $CFG->siteadmins setting as comma separated list lib/db/upgrade.php:3727: if ($admins = explode(',', $CFG->siteadmins)) { lib/simpletest/testaccesslib.php:126: $CFG->siteadmins = $users ['a'] ->id; cfulton@www:~/moodles/testgit$ git grep -n \$siteadmins lib/accesslib.php:806: $siteadmins = explode(',', $CFG->siteadmins); lib/accesslib.php:807: return in_array($userid, $siteadmins);
            Hide
            Petr Skoda added a comment -

            Hello,

            clusters like this were never tested with Moodle code and things like our DB sessions will not probably work. The id tests were introduced for exactly this reason. If you really want to use Moodle on this installation you can try to comment out the tests - it may or may not work because nobody knows if the Moodle code is compatible with your cluster setup. I tried googling a bit but I did not find the details about your cluster set-up.

            Aparup: This is not a bug, please move it out from the stable backlog and change it to new feature.

            Petr

            Show
            Petr Skoda added a comment - Hello, clusters like this were never tested with Moodle code and things like our DB sessions will not probably work. The id tests were introduced for exactly this reason. If you really want to use Moodle on this installation you can try to comment out the tests - it may or may not work because nobody knows if the Moodle code is compatible with your cluster setup. I tried googling a bit but I did not find the details about your cluster set-up. Aparup: This is not a bug, please move it out from the stable backlog and change it to new feature. Petr
            Hide
            James Ganong added a comment -

            @Petr

            If our moodle server goes down for any reason, the backup server (in another location) becomes the new moodle server. It's not load balanced or a cluster/farm setup. It's a backup / fail-over setup.

            Are you saying that the DB Sessions rely on the admin id being 2? Is there anything else that relies on the admin id being 2? If the admin id must be 2, shouldn't it be set explicitly instead of relying on the auto-increment offset?

            Is this documented anywhere? If you do rely on the auto-increment offset to be 1 (or any other setting to be something) shouldn't that be documented?

            If you read the Workaround block, you'll see that I was able to install it. It's been running for a few months now, and everything has worked well.

            Show
            James Ganong added a comment - @Petr If our moodle server goes down for any reason, the backup server (in another location) becomes the new moodle server. It's not load balanced or a cluster/farm setup. It's a backup / fail-over setup. Are you saying that the DB Sessions rely on the admin id being 2? Is there anything else that relies on the admin id being 2? If the admin id must be 2, shouldn't it be set explicitly instead of relying on the auto-increment offset? Is this documented anywhere? If you do rely on the auto-increment offset to be 1 (or any other setting to be something) shouldn't that be documented? If you read the Workaround block, you'll see that I was able to install it. It's been running for a few months now, and everything has worked well.
            Hide
            Petr Skoda added a comment - - edited

            I do not know what your servers do, please at least give us a link to some detailed documentation describing your DB set up. The problem is I can only support databases that I understand. The id test is used to diagnose other problems and bugs in moodle code.

            Master-master replications are not usually ACID compliant, Moodle requires an ACID compliant database. Is you set-up ACID compliant?

            Show
            Petr Skoda added a comment - - edited I do not know what your servers do, please at least give us a link to some detailed documentation describing your DB set up. The problem is I can only support databases that I understand. The id test is used to diagnose other problems and bugs in moodle code. Master-master replications are not usually ACID compliant, Moodle requires an ACID compliant database. Is you set-up ACID compliant?
            Hide
            Petr Skoda added a comment -

            What mysql engine do you use? Only InnoDB is tested and fully supported in Moodle.

            I would love to learn more about different server configurations and DB engines.

            Show
            Petr Skoda added a comment - What mysql engine do you use? Only InnoDB is tested and fully supported in Moodle. I would love to learn more about different server configurations and DB engines.
            Hide
            James Ganong added a comment -

            We use MyISAM. I'm not sure there was any specific reason or even a discussion about which engine to use.

            You can safely disregard our DB setup and look at it as if we were using one web server connected to one MySQL server. The relevant part of the setup is that the auto-increment offset is set to 2 (instead of the default 1), which can happen regardless of the setup (maybe someone has an aversion to even numbers and only wants odd numbers for auto-incrementing columns).

            If you were to change the id test to an insert success test, would that not also diagnose those other problems / bugs you mention? I'm assuming those other problems / bugs do not rely on the admin id being 2 since we haven't run into any with our Moodle instance. If any part of Moodle does rely on an index being a certain number, it would make sense to explicitly set that index or to capture the index number on insert.

            Show
            James Ganong added a comment - We use MyISAM. I'm not sure there was any specific reason or even a discussion about which engine to use. You can safely disregard our DB setup and look at it as if we were using one web server connected to one MySQL server. The relevant part of the setup is that the auto-increment offset is set to 2 (instead of the default 1), which can happen regardless of the setup (maybe someone has an aversion to even numbers and only wants odd numbers for auto-incrementing columns). If you were to change the id test to an insert success test, would that not also diagnose those other problems / bugs you mention? I'm assuming those other problems / bugs do not rely on the admin id being 2 since we haven't run into any with our Moodle instance. If any part of Moodle does rely on an index being a certain number, it would make sense to explicitly set that index or to capture the index number on insert.
            Hide
            Petr Skoda added a comment -

            First of all do not use MyISAM for Moodle database, it is not going to work reliably and is not supported at all. Moodle 2.3 will not install on myisam at all, since Moodle 2.0 all sites are actively encouraged to switch to InnoDB or other ACID compliant engine.

            I am going to replace the id test with something else only if I can verify that even-odd replication on MySQL is fully ACID compliant. Please note this test was not introduced to prevent installation on your specific set-up, it was designed to stop installation on untested/unsupported databases. The only way to get it removed is to prove that your set-up is ACID compliant and works the same as InnoDB.

            If you do not like this then feel free to modify your code, but please do not report bugs that you can not replicate on standard InnoDB Mysql installation.

            Show
            Petr Skoda added a comment - First of all do not use MyISAM for Moodle database, it is not going to work reliably and is not supported at all. Moodle 2.3 will not install on myisam at all, since Moodle 2.0 all sites are actively encouraged to switch to InnoDB or other ACID compliant engine. I am going to replace the id test with something else only if I can verify that even-odd replication on MySQL is fully ACID compliant. Please note this test was not introduced to prevent installation on your specific set-up, it was designed to stop installation on untested/unsupported databases. The only way to get it removed is to prove that your set-up is ACID compliant and works the same as InnoDB. If you do not like this then feel free to modify your code, but please do not report bugs that you can not replicate on standard InnoDB Mysql installation.
            Hide
            James Ganong added a comment -

            Please answer this one question. Other than this one id test, does the moodle code rely on the admin id being id 2? Charles couldn't find any, and you have only referenced that "The id test is used to diagnose other problems and bugs in moodle code." without saying whether it actually relies on the admin id being 2.

            I appreciate the advice on storage engines, but you have conveniently not addressed the actual problem the bug addresses or the questions in my comments.

            The even-odd replication is not the issue. It only caused the issue because it changed the auto-increment offset. The issue is the fact that the id test relies on an auto-increment offset of 1, which is independent of storage engine, db, or ACID compliance. I'll reiterate that if code relies on an index from an auto-incremented column to be a certain number it should be grabbed at the time of insert or explicitly set.

            Show
            James Ganong added a comment - Please answer this one question. Other than this one id test, does the moodle code rely on the admin id being id 2? Charles couldn't find any, and you have only referenced that "The id test is used to diagnose other problems and bugs in moodle code." without saying whether it actually relies on the admin id being 2. I appreciate the advice on storage engines, but you have conveniently not addressed the actual problem the bug addresses or the questions in my comments. The even-odd replication is not the issue. It only caused the issue because it changed the auto-increment offset. The issue is the fact that the id test relies on an auto-increment offset of 1, which is independent of storage engine, db, or ACID compliance. I'll reiterate that if code relies on an index from an auto-incremented column to be a certain number it should be grabbed at the time of insert or explicitly set.
            Hide
            Petr Skoda added a comment -

            Admins can be changed after installation, no developer tested if install works if admin id is different from 2.
            I have personally introduced this id test hoping that it would prevent installation on non-acid multi-master replicated databases.

            Multi-master db replication is not supported because no core developer ever used it or understands it. I already asked several people running big installs, but nobody wanted to share their knowledge, sorry.

            Show
            Petr Skoda added a comment - Admins can be changed after installation, no developer tested if install works if admin id is different from 2. I have personally introduced this id test hoping that it would prevent installation on non-acid multi-master replicated databases. Multi-master db replication is not supported because no core developer ever used it or understands it. I already asked several people running big installs, but nobody wanted to share their knowledge, sorry.
            Hide
            Aparup Banerjee added a comment -

            Thanks for the report James Ganong.

            This issue has been resolved as deferred. It will be dealt with in MDL-28644 as an improvement.

            ps:
            This was an interesting read for me http://dev.mysql.com/doc/refman/5.5/en/innodb-default-se.html

            Show
            Aparup Banerjee added a comment - Thanks for the report James Ganong. This issue has been resolved as deferred. It will be dealt with in MDL-28644 as an improvement. ps: This was an interesting read for me http://dev.mysql.com/doc/refman/5.5/en/innodb-default-se.html
            Hide
            Petr Skoda added a comment -

            I am reopening this, I am going to move the test to the functional DB test and fail it there if even-odd behaviour detected and instead print a bold letter warning during install that db server is not supported.

            Show
            Petr Skoda added a comment - I am reopening this, I am going to move the test to the functional DB test and fail it there if even-odd behaviour detected and instead print a bold letter warning during install that db server is not supported.
            Hide
            Petr Skoda added a comment -

            Thanks for the report and cooperation. Hopefully the new warning and unittests will be self explanatory. In any case moodle does not officially support even-odd mysql clusters, use it at your own risk only, sorry.

            Show
            Petr Skoda added a comment - Thanks for the report and cooperation. Hopefully the new warning and unittests will be self explanatory. In any case moodle does not officially support even-odd mysql clusters, use it at your own risk only, sorry.
            Hide
            Eloy Lafuente (stronk7) added a comment - - edited

            Sorry Petr, but I think that your code in xmldb_main_install() assumes that you are inserting the records in the "odd server" (3) where it could be the "even server" the one being used (4). Or the offset and/or increment in the cluster could be !=2.

            Perhaps instead of hardcoded 3 or 4, you could simply:

            1) create the guest user and get its id (without any message/exception).
            2) create the admin user and get its id. If they are not consecutive, lalala, multimaster cluster detected => notify on install.

            I'm reopening this for your consideration. Ciao

            PS: Also, I still don't get why all this effort. Those clusters should work perfectly as fail/safe ones (not tested at all, just my opinion).

            Show
            Eloy Lafuente (stronk7) added a comment - - edited Sorry Petr, but I think that your code in xmldb_main_install() assumes that you are inserting the records in the "odd server" (3) where it could be the "even server" the one being used (4). Or the offset and/or increment in the cluster could be !=2. Perhaps instead of hardcoded 3 or 4, you could simply: 1) create the guest user and get its id (without any message/exception). 2) create the admin user and get its id. If they are not consecutive, lalala, multimaster cluster detected => notify on install. I'm reopening this for your consideration. Ciao PS: Also, I still don't get why all this effort. Those clusters should work perfectly as fail/safe ones (not tested at all, just my opinion).
            Hide
            Petr Skoda added a comment -

            The install validates the first id crated is "1", that means the next one must be "3" on even-odd servers.

            Those master-master clusters seem to do this magic because they were messing up indexes, that sounds like they are not very reliable for write intensive loads such as Moodle. If somebody wants to use it fine, it is open source, but it is definitely not supported by core moodle developers.

            I am going to attach a patch to this issue and forget it because I do not know what else to do with it. The current code is fine for me.

            Show
            Petr Skoda added a comment - The install validates the first id crated is "1", that means the next one must be "3" on even-odd servers. Those master-master clusters seem to do this magic because they were messing up indexes, that sounds like they are not very reliable for write intensive loads such as Moodle. If somebody wants to use it fine, it is open source, but it is definitely not supported by core moodle developers. I am going to attach a patch to this issue and forget it because I do not know what else to do with it. The current code is fine for me.
            Hide
            Petr Skoda added a comment -

            Eloy: Thanks for the review anyway!

            Show
            Petr Skoda added a comment - Eloy: Thanks for the review anyway!
            Hide
            Eloy Lafuente (stronk7) added a comment -

            What I mean is that, by looking for harcoded "3" you are assuming:

            1) That the server being used is the "odd" one.
            2) That the cluster has only 2 servers

            My proposed approach just looks for differences between the id of guest and admin and, if not consecutive, notify it. It should detect more "master*n" clusters, not only dual ones with even/odd, just that.

            All this knowing nothing about those clusters at all, but I imagine they use the exclusive autoincrement thing to avoid PK collision in case of both working at the same time. Surely not needed if used as fail-safe solution (only one working at the same time).

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - What I mean is that, by looking for harcoded "3" you are assuming: 1) That the server being used is the "odd" one. 2) That the cluster has only 2 servers My proposed approach just looks for differences between the id of guest and admin and, if not consecutive, notify it. It should detect more "master*n" clusters, not only dual ones with even/odd, just that. All this knowing nothing about those clusters at all, but I imagine they use the exclusive autoincrement thing to avoid PK collision in case of both working at the same time. Surely not needed if used as fail-safe solution (only one working at the same time). Ciao
            Hide
            Sam Hemelryk added a comment -

            Just noting I've had this added to the next sprint to ensure that these changes aren't forgotten. (just being cautious is all)

            Show
            Sam Hemelryk added a comment - Just noting I've had this added to the next sprint to ensure that these changes aren't forgotten. (just being cautious is all)
            Hide
            Sam Hemelryk added a comment -

            Hi guys,

            I'm putting this up for a peer-review now. In short the patch I have here removes the exceptions that were being thrown if guestid != 1 and adminid != 2 and replacing them with notifications.
            As well there is a notification now if guest id and adminid are not consecutive.

            This patch will of course now allow people to install Moodle in more diverse setups as well as on basic setup's which have an alternative auto-increment offset (how I tested these changes).

            The downside is that of course we don't know what problems if any people may hit running diverse systems and normal users who have generally experienced some crazy auto inc problem will still get through install. I suppose as long as there are no far reaching problems right

            Personally this gets my +1 knowing very little about installation and any hardcoded dependencies that may exist.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi guys, I'm putting this up for a peer-review now. In short the patch I have here removes the exceptions that were being thrown if guestid != 1 and adminid != 2 and replacing them with notifications. As well there is a notification now if guest id and adminid are not consecutive. This patch will of course now allow people to install Moodle in more diverse setups as well as on basic setup's which have an alternative auto-increment offset (how I tested these changes). The downside is that of course we don't know what problems if any people may hit running diverse systems and normal users who have generally experienced some crazy auto inc problem will still get through install. I suppose as long as there are no far reaching problems right Personally this gets my +1 knowing very little about installation and any hardcoded dependencies that may exist. Cheers Sam
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Uhm, some notes:

            1) If I'm not wrong the original change was applied not only to master but to some stable branches, if this gets integrated should replace all the original branches.

            2) I like them as notifications instead of exceptions 100%. Perhaps I'd tidy up a bit the message as far as it's not a matter of the engine used but clustering / configuration.

            I'm reopening this for one more round next week... ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Uhm, some notes: 1) If I'm not wrong the original change was applied not only to master but to some stable branches, if this gets integrated should replace all the original branches. 2) I like them as notifications instead of exceptions 100%. Perhaps I'd tidy up a bit the message as far as it's not a matter of the engine used but clustering / configuration. I'm reopening this for one more round next week... ciao
            Hide
            Petr Skoda added a comment -

            If the first inserted record is id!=1 our SITEID, SYSCONTEXTID and who knows what else is going to break because sometimes we need to create some constant with id before we insert it into database during install.

            Please leave the id!=1 exception in place.

            Show
            Petr Skoda added a comment - If the first inserted record is id!=1 our SITEID, SYSCONTEXTID and who knows what else is going to break because sometimes we need to create some constant with id before we insert it into database during install. Please leave the id!=1 exception in place.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Petr, the $syscontext->id != 1 and $SITE->id != 1 checks are performed @ the very first lines of xmldb_main_install() and they continue there (although, for sure, I don'k love them either).

            The only bits changed are the guest/admin users creation switched from exception to message. So it will continue working. In fact I continue thinking that, instead of showing one message for each creation, it's enough to keep only the computed difference as a warning, but that doesn't matter much.

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Petr, the $syscontext->id != 1 and $SITE->id != 1 checks are performed @ the very first lines of xmldb_main_install() and they continue there (although, for sure, I don'k love them either). The only bits changed are the guest/admin users creation switched from exception to message. So it will continue working. In fact I continue thinking that, instead of showing one message for each creation, it's enough to keep only the computed difference as a warning, but that doesn't matter much. Ciao
            Hide
            Petr Skoda added a comment - - edited

            hmm, what happens on these even-odd systems when I force the ids with $DB->import_record() ? I am working on accesslib right now and I will verify the contexts table is empty first and then use $DB->import_record() with SYSCONTEXTID if already defined (I need this for unit tests)

            Show
            Petr Skoda added a comment - - edited hmm, what happens on these even-odd systems when I force the ids with $DB->import_record() ? I am working on accesslib right now and I will verify the contexts table is empty first and then use $DB->import_record() with SYSCONTEXTID if already defined (I need this for unit tests)
            Hide
            Michael de Raadt added a comment -

            Reverting the affected version as it was changed in error.

            Show
            Michael de Raadt added a comment - Reverting the affected version as it was changed in error.
            Hide
            Sam Hemelryk added a comment -

            Hi guys,

            Just spotted this again. Sorry for the delay.

            I've improved the message now thanks Eloy. As suggested it now suggests that the database configuration or clustering setup may not be fully supported.
            I have now also backported this fix to the stable branches, and assuming this goes in after the release of 2.2 I will backport for that after release as well.
            The final thing I did was verify that this only impacts the Guest and Admin id's and that the site id and system context id exceptions are both still intact.

            This is once again up for peer-review.

            Cheers
            Sam

            Show
            Sam Hemelryk added a comment - Hi guys, Just spotted this again. Sorry for the delay. I've improved the message now thanks Eloy. As suggested it now suggests that the database configuration or clustering setup may not be fully supported. I have now also backported this fix to the stable branches, and assuming this goes in after the release of 2.2 I will backport for that after release as well. The final thing I did was verify that this only impacts the Guest and Admin id's and that the site id and system context id exceptions are both still intact. This is once again up for peer-review. Cheers Sam
            Hide
            Sam Hemelryk added a comment - - edited

            Updated after 2.2 release.

            Pull 2.2 Branch: wip-MDL-27767-m22
            Pull 2.2 Diff URL: https://github.com/samhemelryk/moodle/compare/MOODLE_22_STABLE...wip-MDL-27767-m22

            Show
            Sam Hemelryk added a comment - - edited Updated after 2.2 release. Pull 2.2 Branch: wip- MDL-27767 -m22 Pull 2.2 Diff URL: https://github.com/samhemelryk/moodle/compare/MOODLE_22_STABLE...wip-MDL-27767-m22
            Hide
            Andrew Davis added a comment - - edited

            Changes look good.

            Ultimately, the only way we'll get Moodle working on these kinds of set ups is if we let people at least try.

            Show
            Andrew Davis added a comment - - edited Changes look good. Ultimately, the only way we'll get Moodle working on these kinds of set ups is if we let people at least try.
            Hide
            Petr Skoda added a comment -

            Uhm, there is no point in letting ppl try these crazy setups when developers do not consider it when designing code...

            Show
            Petr Skoda added a comment - Uhm, there is no point in letting ppl try these crazy setups when developers do not consider it when designing code...
            Hide
            Eloy Lafuente (stronk7) added a comment -

            I'm sorry but I'm not going to be the one stopping trying configurations that may work. IMO to warn them on installation is fair enough. If we want, we can also add one note @ the installation docs.

            But, as said, admin decides, not me (in fact I'm sure they know far more than me about any flavor of clusters and their particularities).

            So this have my +1

            Ciao

            Show
            Eloy Lafuente (stronk7) added a comment - I'm sorry but I'm not going to be the one stopping trying configurations that may work. IMO to warn them on installation is fair enough. If we want, we can also add one note @ the installation docs. But, as said, admin decides, not me (in fact I'm sure they know far more than me about any flavor of clusters and their particularities). So this have my +1 Ciao
            Hide
            Sam Hemelryk added a comment -

            Thanks Eloy + Andrew + Petr.
            This also gets my +1 (sorry Petr) and I am putting this up for integration now.

            Show
            Sam Hemelryk added a comment - Thanks Eloy + Andrew + Petr. This also gets my +1 (sorry Petr) and I am putting this up for integration now.
            Hide
            Petr Skoda added a comment - - edited

            hehe, no problem for me, at least the functional db tests fail badly on those servers which means "not supported"

            Show
            Petr Skoda added a comment - - edited hehe, no problem for me, at least the functional db tests fail badly on those servers which means "not supported"
            Hide
            Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Integrated, thanks!

            Show
            Eloy Lafuente (stronk7) added a comment - Integrated, thanks!
            Hide
            Adrian Greeve added a comment -

            After fooling around with the setup I did an installation and the error messages read like they should. Additional database testing seemed to be fine.

            Show
            Adrian Greeve added a comment - After fooling around with the setup I did an installation and the error messages read like they should. Additional database testing seemed to be fine.
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Whoever decided one week was worth 14 days had really one bad idea. Anyway, the nightmare is over, so thanks for your, once again, amazing contributions. Many, many thanks!

            Now... disconnect, relax and enjoy the next days, yay!

            Closing...ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Whoever decided one week was worth 14 days had really one bad idea. Anyway, the nightmare is over, so thanks for your, once again, amazing contributions. Many, many thanks! Now... disconnect, relax and enjoy the next days, yay! Closing...ciao

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: