•  
      request #8744 Forgeupgrade fail : undefined index dbdriver
    Infos
    #8744
    Manuel Vacelet (vaceletm)
    2017-02-03 17:12
    2016-01-05 12:12
    8861
    Details
    Forgeupgrade fail : undefined index dbdriver

    Original post from Jonathan:

    Hi,

    I have tried to upgrade our tuleap installation and the forgeupgrade command fails with the error message : Undefined index : dbdriver, in forgeupgrade.php.

    The previous upgrage worked correctly. Is there something more to do or is it an error ? At this time my upgrade is blocked ....

    Regards,

    Jonathan

    Upgrade process
    Empty
    CentOS 6
    • [ ] enhancement
    • [ ] internal improvement
    Jonathan (jod)
    Stage
    Empty
    Closed
    2017-02-03
    Attachments
    References
    References list is empty

    Follow-ups

    User avatar
    • Status changed from New to Closed
    • Reported in version cleared values: 8.9
    • Close date set to 2017-02-03
    User avatar
    Jonathan (jod)2016-01-05 21:10
    Understood. I will check it and as the current state is correctly working, I will export and save all the needed data and start a new installation as soon as possible.

    Thanks again for your help and your quick answers!

    PS : You can close this ticket ;)
    User avatar
    /var/lib/mysql should be owned by mysql:mysql

    However, your are likely to have the issue elsewhere, you can check by yourself with a ls -l /var/lib or ls -l /usr/bin

    If you see "codendiadm" all around you should go with the "restore" procedure I described previously
    User avatar
    Jonathan (jod)2016-01-05 17:07
    last edited by: Jonathan (jod) 2016-01-05 17:12
    So ......

    I have changed the permissions on the folder /var/lib/mysql/*, then I have deleted manually the table 'forge_upgrade_log' in the 'tuleap' database, to be able to finish the upgrade.

    Then I encountered an error during the forge_upgrade : a column 'id' was not found in the fields list when it tried to append a log event (from the file LoggerAppendPDO.php, line 186). So I have commented the exception launch (see attachment loggerappendpdo.pdn), and the forge upgrade has been applied correctly. Then Tuleap has restarted, and it seems to work and to be up to date!

    To be restore a correct state on my installation, can you just give me what should be the rights (all permissions and owner) of the content of the folder /var/lib/mysql ?

    Regards,

    Jonathan

    Fiou .....
    User avatar
    Tuleap 8.9.99.77 solve the problem (revert the bad commit)

    Unfortunately the state is very bad (the code issued a chown codendiadm:codendiadm /)...

    You have 3 options basically
    - fix permissions by yourself (almost impossible to restore all specificities)
    - restart from recent backup (that the choice we made for Tuleap.net)
    - restore partially permissions so you can get the data from your current server (/var/lib/tuleap, /var/lib/mysql, /etc/tuleap, /home), install a fresh tuleap, restore those data and run "fix-owner.sh" (attached) to fix-up ownership on new server

    User avatar
    Jonathan (jod)2016-01-05 15:37
    Hi,

    I change the permissions in the folders :
    - /var/lib/mysql
    - /var/lib/mysql/mysql

    Then the mysql deamon start correctly ! But now, when I run the forgeupgrade command, I have a error about the tables (see third_error in attachment).

    Do you know how can I restore the database to a correct state ?

    Regards,

    Jonathan

    User avatar
    Jonathan (jod)2016-01-05 15:26
    Hi,

    With "yum list tuleap" I found the following version : 8.9.99.76-1.el6

    Is there a new patch available ? Or can we correct the permissions manually ?
    User avatar
    Yes we had an issue this morning and this issue forced us to restart from backups

    What is the version of Tuleap you are using ?
    Tuleap 8.9.99.X with X between 70 and 76 (included) are affected by a bug that deploy wrong permissions on server
    User avatar
    Jonathan (jod)2016-01-05 13:53
    last edited by: Jonathan (jod) 2016-01-05 13:55
    Hi,

    It seems that you had a problem with your website this morning, and that you have recreated this bug. To be complete, here are the informations that I provided initially :
    - Severity : Critical
    - Category : Upgrade
    - Reported in version : 8.9
    - Platform : Centos 6.7

    Moreover, I tried to find what is the problem, and I tried to re-update tuleap and the complete platform using :
    # yum update tuleap*
    # yum update *

    It seems that some packages of tuleap have been updated since yesterday afternoon. Now, when I use the following command, the error message is not the same (see attachment second_error.png) :
    # Apply data upgrades
    /usr/lib/forgeupgrade/bin/forgeupgrade --config=/etc/codendi/forgeupgrade/config.ini update

    I also provide in attachment the content of my config.ini, which seems to be correct.

    Finally, it seems that the forgeupgrade fails because mysql is not started, by when I try to start it manually, I have an error in the log file /var/lib/mysql/<MYSERVER>.err (see attachment)

    Do you have any idea of how to correct this problem and restart my tuleap instance ?