Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is chash ready for vchamilo shell upgrade ? #46

Open
vfremaux opened this issue Jun 17, 2017 · 8 comments
Open

Is chash ready for vchamilo shell upgrade ? #46

vfremaux opened this issue Jun 17, 2017 · 8 comments

Comments

@vfremaux
Copy link

Hi Julio
Vchamilo plugin (beeznest version) tells it would be compatible with chash. I digged dep into chash upgrade command and did not noticed any special coding for driving the configuration virtual switch when not in Web server environment. Is that exact or i missed something ? having 170 chamilos to raise to 1.11.x last branch, I not sure i may miss this step ;-)

If i understood the picture, an upgrade uses two paths, the old one and the new one, and gets material from older to newer. In my case i will need actually upgrade-database-only option as content transfer must be handled from outside. I've identifed the location when confg loads. just guessing ensuring a old virtual instance matchs a new corresponding virtual instance seems not so trivial at a glance. would you share an opinion on that point ?

@vfremaux
Copy link
Author

POC track :

  • provisionning a way to inject a forced host virtual identity in the hookConfiguration() function, thus faking the web server signature and force configuration to switch. (and check it is true in source and target version)
  • seek in progress : inject additionnal arguments in src/Chash/Commands/Installation/upgradeCommand.php

@vfremaux
Copy link
Author

found a way through, almost reaching to target. Needs some little changes in VChamilo (fix early loading of database.lib.php, recognize PHP_SAPI status aside CLI_SCRIPT definition) but the most part is in chash UpgradeCommand.php
UpgradeCommand.zip

Most attention should be given to the configuration.php file handling during migration (pre 110 to post 1.10). It has to be copied from the older instance and reworked to fit the new VChamilo invocation, along with sys_root and database change.

@vfremaux
Copy link
Author

vfremaux commented Jun 19, 2017

got context switching ok but fail on a :
Class 'Application\DoctrineExtensions\DBAL\Types\UTCDateTimeType' not found in /app/chamilotools/chash/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/Type.php on line 174

While the class is supposed to be Chash\DoctrineExtensions\DBAL\Types\UTCDateTimeType

@ywarnier
Copy link
Member

ywarnier commented Jul 9, 2017

@jmontoyaa could you answer Valery's questions please?

@vfremaux
Copy link
Author

vfremaux commented Jul 9, 2017

Hi guys, let me update you with the upgrade process in progress :
I could conclude that chash could not support virtualized switching for upgrade, so i tried the following technique :
Running a script that rematerializes a physical configuration.php file in both places /app/config and /main/inc/conf (for 1.9 to 1.11 migration path) for each instance, and try chash upgrade the database in cli mode.
It worked once on integration environment. I'm not really sure i did NOT have some light changes on the Chamilo Upgrade class of chash as it has not worked on preprod environment (on which we are in the middle of the way). We result at the moment with a memory fault exception on migrated subchamilos that seems comming from expected fields not being there in the (supposed to be) migrated database. It is possible that the migration path is not fully idempotent when run several times on the same data, and our further tries to upgrade have no visible effect.

@ywarnier
Copy link
Member

ywarnier commented Jul 9, 2017

Hi @vfremaux, this is a highly specialized topic, so not really something we usually do as community effort (we do publish all the developments we do, but specific stuff like that usually go through BeezNest's commercial support). If you need urgent assistance, there is always that option.
I know the guys at the Aix-Marseilles academy are going through a lot of upgrades with Chash at the moment, so there must be something different with your own case (they don't start from a virtualized environment, but they do start from 1.9 versions if I'm not mistaken - maybe 1.10 and that would be the issue in your case).

@vfremaux
Copy link
Author

vfremaux commented Jul 9, 2017

@ywarnier I agree it is, now atually i am the "end of the chain" tech expert and have no matter in the poduct owner choices or budget allocation. I relay however the message that this high level of industrialisation is hard to reach without support of the core technology makers, what strong ever could be my technology insight and power. I hope they hear the message...

@jmontoyaa
Copy link
Member

Hi, can you copy and paste the chash command that you're using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants