Upgrade to 4.1.3 fails
Description of problem
Upgrade of a perfectly working version 4.1.0 to 4.1.3 fails (kiwi_web stays in restarting loop)
root@docker-1gb-fra1-01:~/kiwi# docker-compose up Starting kiwi_db ... Starting kiwi_db ... done Starting kiwi_web ... Starting kiwi_web Attaching to kiwi_db, kiwi_web db_1 | 180322 16:29:36 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'. db_1 | 180322 16:29:36 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql web_1 | AH00526: Syntax error on line 34 of /etc/httpd/conf.d/kiwi-httpd.conf: web_1 | SSLCertificateFile: file '/etc/kiwitcms/ssl/localhost.crt' does not exist or is empty kiwi_web exited with code 1 ^CGracefully stopping... (press Ctrl+C again to force)
Steps to Reproduce
- Upgrade according to Upgrade Instructions: cd Kiwi/ docker-compose down docker pull kiwitcms/kiwi docker pull centos/mariadb docker-compose up -d
Actual results
kiwi_web stays in restarting loop
Did you do git pull before docker-compose up ?
Post the docker-compose.yml file with which you see the failure!
No, I did not perform a Git Pull. Docker Images are usually self containing and need no action like Git pull. Anyhow, there was no instruction to do so in the installation manual. The former image did all that without trouble. Compose file used is the standard file contained in Git without any modifications.
post the contents of docker-compose.yml that reproduce the problem minus any passwords that you may have.
then try git pull and retry upgrading again, should fix the issue.
My docker-compose file is https://github.com/kiwitcms/Kiwi/blob/master/docker-compose.yml
I reeally dont want to install all the git stuff on my host. Why should I perform a git pull? I want a plain docker installation. What´s wrong with that?
No, I did not perform a Git Pull.
You need to, see explanation below.
Anyhow, there was no instruction to do so in the installation manual.
I will fix this, it's a genuine omission.
Docker Images are usually self containing and need no action like Git pull. I reeally dont want to install all the git stuff on my host. Why should I perform a git pull? I want a plain docker installation. What´s wrong with that?
There's nothing wrong with what you want but you fail to understand how Kiwi TCMS works and how it plays around with Docker.
You can't execute Kiwi TCMS alone by itself. It needs a database and SSL certificates files at the very least. This is not something we can bundle together into the kiwitcms/Kiwi docker image. That is why we use docker-compose to help us put together everything that we need.
docker-compose.yml is the file that controls how you put together a running Kiwi instance. It tells you what database backend to spin-up automatically, it configures your default DB password, it creates 2 separate data volumes (for DB and uploaded files) so that your data is not lost between upgrades and it also controls how SSL certiciates and HTTPD logs are mounted to/exposed from the running container.
This file is not part of the container image itself, it is an external configuration that lives in git and that's why you have to update it. The failure in the original comment points to this problem:
SSLCertificateFile: file '/etc/kiwitcms/ssl/localhost.crt' does not exist or is empty
that file doesn't exist because the older version of docker-compose.yml used to mount the SSL certificates differently.
We will try to point out changes to docker-compose.yml in the changelog but when they do happen you will have to refresh that file to match the latest.
As far as I know Docker doesn't provide a way to bundle the various pieces of a docker-compose together so that's how it works.
I tested the upgrade today, but it failed with the last step. It seems there were some changed to the package recently. The same test 2 weeks ago did work well. Any suggestion? Thanks!
cd Kiwi/ git pull >>I used "git clone https://github.com/kiwitcms/Kiwi.git" instead as I did not use git command before docker-compose down docker pull kiwitcms/kiwi docker-compose up -d >> if I rum "docker ps -a", I can see the status as UP docker exec -it kiwi_web /Kiwi/manage.py migrate >>This step failed with error message as below:
[root@localhost Kiwi]# docker exec -it kiwi_web /Kiwi/manage.py migrate
Traceback (most recent call last):
File "/Kiwi/manage.py", line 12, in
docker pull kiwitcms/kiwi
that is in fact 4.1.4 now
File "/venv/lib/python3.5/site-packages/tcms/settings/product.py", line 1 import os ^ IndentationError: unexpected indent
there's no import os in our product.py if you have overriden this via docker-compose.yml or by other means just fix your config file.
@atodorov You are right! This works if I remove the following entry. The reason I added it was just to enable email function.
- ./product.py:/venv/lib64/python3.5/site-packages/tcms/settings/product.py:Z
Today I realize that I can enable email function by modify tcms/settings/common.py, and then add the following entry into the docker-compose.yml file. This way the revised version of common.py can be added into the container during setup. Although I am not very sure if I did this in the right way but the email function worked.
- ./tcms/settings:/venv/lib64/python3.5/site-packages/tcms/settings:Z
Thanks a lot for checking my comment. Have a nice weekend!