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

[Install/Upgrade] [Web/Cli][prod/dev] Tests #2417

Closed
Kaik opened this issue Apr 13, 2015 · 10 comments
Closed

[Install/Upgrade] [Web/Cli][prod/dev] Tests #2417

Kaik opened this issue Apr 13, 2015 · 10 comments

Comments

@Kaik
Copy link
Contributor

Kaik commented Apr 13, 2015

Hi,
My setup is 4 local installations 3 of them are actually running sites last one is plain core.

Now this is small script to refresh db, different for each db
commented ones are for one pretty messy db 1.3.4 version

#!/bin/bash

backup="mysql/databases/`date +%Y-%m-%d`/mysqldump-`date +%Y-%m-%d`.gz"
user="xxx"
password="xxx"
database="xxx"
theme=''
version=''

# delete database
mysql --user="$user" --password="$password" --database="$database" --execute="DROP DATABASE $database;"
# create database
mysql --user="$user" --password="$password" --execute="CREATE DATABASE $database;"

# Import database
gzip -dc < "$backup" | mysql --user="$user" --password="$password" --database="$database"

# change theme
mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE module_vars SET value ="s:20:\"ZikulaAndreas08Theme\";" WHERE id = 20;'

# change version
# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE module_vars SET value ="s:5:\"1.3.5\";" WHERE id = 36;'

# change lang from pl/pol
# language_i18n
mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE module_vars SET value ="s:2:\"en\";" WHERE id = 1598;'
# language
mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE module_vars SET value ="s:3:\"eng\";" WHERE id = 48;'

# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE module_vars SET value ="s:0:\"\";" WHERE id = 82;'
# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE module_vars SET value ="s:0:\"\";" WHERE id = 92;'
# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE module_vars SET value ="s:0:\"\";" WHERE id = 94;'
# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE module_vars SET value ="s:0:\"\";" WHERE id = 248;'
# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE module_vars SET value ="s:0:\"\";" WHERE id = 1602;'

# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE modules SET capabilities ="a:0:{}" WHERE id = 160;'
# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE modules SET capabilities ="a:0:{}" WHERE id = 35;'
# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE modules SET capabilities ="a:0:{}" WHERE id = 28;'
# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE modules SET capabilities ="a:0:{}" WHERE id = 106;'
# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE modules SET capabilities ="a:0:{}" WHERE id = 184;'
# mysql --user="$user" --password="$password" --database="$database" --execute='UPDATE modules SET capabilities ="a:0:{}" WHERE id = 197;'
# mysql --user="$user" --password="$password" --database="$database" --execute="DELETE FROM objectdata_attributes WHERE attribute_name = 'dizkus_users_posts';"

Yesterday I have tested install and upgrade with prod env.
Install

  1. web went smoothly but has to be called before any cli calls because of 2
  2. cli cals config_ not found this is what I have written yesterday at night Cannot log in as admin. Admin username, email and password gets corrupted somehow ref [Upgrade/Install][Cli] Values passed to installator need to be base64encoded #2419
    Upgrade
  3. WEB This is cool first time I have upgraded using web interface and it works but:
    1.1 Theme need to be andreas08, bootstrap theme is breaking upgrade ref upgrade requires EN and default theme #2418
    1.2 Lang need to be eng upgrade requires EN and default theme #2418
    1.3 Intercom module upgraded automatically with system modules
    2.CLI is failing with pass/username incorrect error ref [Upgrade/Install][Cli] Values passed to installator need to be base64encoded #2419

Now this is for prod env. All my previous upgrades were on dev and on cli, web interface was not working for me then (or I have not tested it in prod)

Today I will refresh all that once again for all installations and will provide some more details on errors.

@Kaik
Copy link
Contributor Author

Kaik commented Apr 13, 2015

Viewing site in browser home page

Whoops, looks like something went wrong.

1/1
InvalidArgumentException in FileLocator.php line 44:
The file "/home/Kaik/public_html/core/src/app/config/config_.yml" does not exist.
in FileLocator.php line 44
at FileLocator->locate('/home/Kaik/public_html/core/src/app/config/config_.yml', null, true) in FileLocator.php line 54
at FileLocator->locate('/home/Kaik/public_html/core/src/app/config/config_.yml') in YamlFileLoader.php line 40
at YamlFileLoader->load('/home/Kaik/public_html/core/src/app/config/config_.yml', null) in DelegatingLoader.php line 45
at DelegatingLoader->load('/home/Kaik/public_html/core/src/app/config/config_.yml') in ZikulaKernel.php line 53
at ZikulaKernel->registerContainerConfiguration(object(DelegatingLoader)) in Kernel.php line 620
at Kernel->buildContainer() in Kernel.php line 533
at Kernel->initializeContainer() in ZikulaKernel.php line 306
at ZikulaKernel->initializeContainer() in Kernel.php line 128
at Kernel->boot() in ZikulaKernel.php line 85
at ZikulaKernel->boot() in bootstrap.php line 34
at include('/home/Kaik/public_html/core/src/lib/bootstrap.php') in index.php line 16

OK this is solved due to server setup actually difference beetwen group permissions of parameters and custom_parameters files after install.

@Kaik
Copy link
Contributor Author

Kaik commented Apr 13, 2015

But now new thing appeared when installed using cli installer using default values it is adding
i٢ r as admin in users table, where i٢ is username r is email. Cannot log in as admin. Admin username, email and password gets corrupted somehow.

@Kaik
Copy link
Contributor Author

Kaik commented Apr 13, 2015

I was updating today whole day :) and for 3 only one gets upgraded and only using web upgrade.
For 2 others web upgrade ends up with errors. Starting from "Theme regeneration" with ajax error that routes module is miss-configured. Everything from that point is red and finishes with mentioned ajax error, afterwards upgrade/compleated page is not accessible as well as many others with this:

Oops! An Error Occurred

The server returned a "404 Not Found".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.

Unable to find the controller for path "/pl/useraccount". The route is wrongly configured.

Apart from that the only one "working" is completely broken /en/login page.
Funny thing is that db that upgrades is copy of the one that not upgrades. It was copied few years ago and different site was created on it. At the moment I'm investigating ZConfig vars as I think this might cause different routes module configuration.

@craigh craigh added the Routing label Apr 13, 2015
@craigh
Copy link
Member

craigh commented Apr 14, 2015

@cmfcmf can you look into this?

@Kaik
Copy link
Contributor Author

Kaik commented Apr 14, 2015

I will try to investigate that cli problem, this might help me debug other things.

@Kaik
Copy link
Contributor Author

Kaik commented Apr 14, 2015

Ok I'm getting closer at least in upgrading. So I was able to get the upgrade finished in cli mode then home page showed up. Log in and just after pressing log in button it redirects me to routes/reload end ending up in too many redirections.
So I could not go to redirect page because some routes inside theme (Andreas08) triggers another redirect to, same page. I have switched theme to bootstrap in phpmyadmin and that worked. I guess new admin menu will be the reason for that. For this issue I think that either this (reload routes/unknow route) exception catch should be somehow adopted to avoid that specific case when routes/reload? url is loaded or just remove all that admin theming around routes module so it looks like "Dooing something important" part.

@craigh
Copy link
Member

craigh commented Apr 15, 2015

which build are you testing with? or github up-to-date?

@Kaik
Copy link
Contributor Author

Kaik commented Apr 15, 2015

github 8e4be5e actually install tests were on 0ccc96a

@craigh
Copy link
Member

craigh commented Apr 19, 2015

@Kaik please try with current build/pull. I have made several fixes/improvements. please try in English first and then pl. please report back.

@craigh
Copy link
Member

craigh commented Apr 24, 2015

closing this. please open a new ticket if you find the need.

@craigh craigh closed this as completed Apr 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants