Closed davidknezic closed 1 year ago
same here
+1
Same problem here. I got it to run by backing up the /opt/zammad
(zammad-data) volume and replacing it with an empty one (apparently the right gems are in the docker image).
@fnetz your solution didnt work here. empty zammad-data results in: z6-test-zammad-init-1 | /docker-entrypoint.sh: line 55: contrib/packager.io/database.yml.pkgr: No such file or directory z6-test-zammad-init-1 exited with code 1
it seems, that if there is already a database -> /opt/zammad doesnt get filled.
if i drop the database also, then /opt/zammad gets filled. and this "default" content can I use with my old database.
i moved /opt/zammad/storage/ from my old install to the newly created dir and now it starts up and migrates the database
I guess there is some difference in setup/version, for me, it migrated directly with an empty volume.
Anyway, it's a hacky workaround and the maintainers hopefully have a better solution.
I can confirm this is still happening with the latest image (4e8422751540)
For instance, Gemfile.lock
specifies addressable 2.8.1
, the version in the image is /usr/local/bundle/cache/addressable-2.8.4.gem
.
Other than the gem lock, are there any other files that need to be updated?
Are you trying to use docker exec and running the docker-entrypoint.sh manually? That will likely not work, as all the env vars are not set in your shell.
Not at all! I use compose.
For testing, I've been starting zammad-init
manually like this:
# alter Gemfile+lock - e.g., this was the Gemfile.lock with the fewest errors:
$ wget https://github.com/zammad/zammad/raw/stable/Gemfile.lock
$ podman run --rm --env-file /home/zammad/zammad.env --uidmap 1000:0:1 --gidmap 1000:0:1 --uidmap 0:1:1 --gidmap 0:1:1 --user 1000:1000 --network zammad -v "/mnt/zammad/zammad:/opt/zammad" docker.io/zammad/zammad-docker-compose:latest zammad-init
EDIT: remove -it
which was for colored output
I've just tried using --entrypoint bash
and running bundle install
- yields the same error.
Not sure what you're doing at all. It's not meant to work this way.
I was able to reproduce this locally. It happened when I first built the Zammad container from develop
, and then rebuilt it from stable
locally. Something is wrong with the docker build caching. docker build --no-cache
and docker system prune
didn't solve this for me -- I had to wipe my local docker storage completely and then it worked.
So right now I would assume this affects local docker deployments where docker build
is used to create the image.
Anybody found a solution yet? I've tried nuking the opt/zammad
, ofc didnt work, tried nuking the opt/zammad/storage
and overwrite the Gemfile
and Gemfile.lock
but no luck, the init container still links to old dependencies. 😢
I just succesfully finished the upgrade this morning (had the error above, too). What I did:
zammad-var:/opt/zammad/var
is the important part here)IMAGE_REPO
is the important part here, the new image at ghcr.io seems to work, the one from dockerhub, not)There were 2 Problems during this update:
a) I removed :ro
from zammad-config-nginx:/etc/nginx/sites-enabled:ro
because of an "read only" error during nginx-container startup.
b) I added the env vars from here: https://github.com/zammad/zammad-docker-compose/pull/357/commits/ddc85d87b2371101386633bf3375729879bcd202 (double check the names! There is POSTGRESQL_PASS, POSTGRES_PASSWORD, POSTGRESQL_PASSWORD depending on container!)
After this the migration worked and the Version 6 is running.
@spitzlei that looks very promising!
For anyone who has moved to file storage, there also needs to be a mount for that: path-to-zammad-storage:/opt/zammad/storage
@spitzlei i can confirm that it works :-)
overall, it's a cool change and i'm glad that code and data are now more separated.
@spitzlei that looks very promising!
For anyone who has moved to file storage, there also needs to be a mount for that:
path-to-zammad-storage:/opt/zammad/storage
Where do I need to put this? I assume in the docker-compose.yml file (or docker-compose.override.yml)?
but where in here does it go? Would you be able to provide a live example?
Hi,
My Init Logs:
I, [2023-07-10T16:55:30.445469#15-6180] INFO -- : Using the Redis back end for Zammad's web socket session store. rake aborted! Errno::ENOENT: No such file or directory @ rb_sysopen - /opt/zammad/storage/fs/xxxxxx/xxxxxx/xdx/x/x/xxxxxxxxxxxxxxxxxxxxxxxx /opt/zammad/app/models/store/provider/file.rb:30:in `binread'
@technoicon
I'm working with systemd and regular folders so my configuration likely won't help you.
I suggest you try something along the lines:
zammad-storage
podman run -it --rm ..
and mount both the new zammad-storage
as well as the old zammad-data
zammad-data
directly into the new volume (for me, the new volume only contains a folder called fs
)Naturally, you'll want to have a backup that you can fall back to if it fails.
Finally, add the storage volume through a method of your liking:
volumes:
...
- zammad-storage:/opt/zammad/storage
That should be it.
I'm also not using the nginx container, so I also had to make sure that nginx serves /opt/zammad/public
from the image - I assume that's not something you need to do.
I ended up moving my data to the database, then upgrading.
Another issue I had was I had setup my elasticsearch container to less than 2g of RAM. Needs at least 3g in the new update.
I'm still struggling to get this to work I've used versions 66, 67, 69, and 71 (71 has it's own issues)
all of them had a problem with my postgres password not being URI safe (so I created a new env var with a version of the password that is uriencoded)
Then the websocket service kept trying to look for the database at zammad-postgresql so I added that as an alias for my dbms service
The services are all still failing however. I get the feeling that these services are supposed to be reading settings in the /opt/zammad/var directory as it has been added as a mount in the new docker-compose.yml in this repo
I got this working on 66 needed to add postgresql environment variables to all services (yet still ignores the POSTGRESQL_HOST variable value)
For a docker newbie. Someone who has a guide to upgrade from 5.4 to 6.0?
Upgrade should now work better with the latest version. Please see 7f31a9a
Do I need to change anything to get 6 version update?
@snorte please consult our community https://community.zammad.org
Infos
Expected behavior
Trying to upgrade to the latest docker build tagged
6.0.0
, I expectzammad-init
to succeed.Actual behavior
The command
zammad-init
fails with error:Steps to reproduce the behavior
Run build tagged
6.0.0
with commandzammad-init
. Reverting back tozammad-5.4.0-26
worked again.