-
Notifications
You must be signed in to change notification settings - Fork 174
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
how to migrate from hopsoft/graphite-statsd to graphiteapp/graphite-statsd #23
Comments
Hello @codexiao , |
Thanks, Denis. Sorry I'm not around my laptop today. If I remember correctly, from Grafana, adding datasource will timeout and say bad gateway. And if you go to the graphite page, it will give you a page of python error messages. At the end of the page, it says no such table: auth_user.
Mounting an empty volume or starting the container alone won't have this problem. That's why it makes me think graphiteapp didn't initialize itself correctly during migration.
Do you know anyone has done this before? Or any guide how to do a smooth migration?
Xiao Wang
Excuse my typo on phone
… On Dec 4, 2017, at 1:38 AM, Denis Zhdanov ***@***.***> wrote:
Hello @codexiao ,
Could you please elaborate what is not working when you just replacing hopsoft image with this one?
Any errors in logs? What browser says?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Django version was upgraded in the process of migration to 1.0.x, so, you should upgrade your database's schema. Try to run
in target docker container after mounting old storage (use |
Thanks a lot, @deniszh . Bear with me, I'm not very experience with this. So I should follow these steps, right? ################ 2). docker-compose up -d By doing this, all my data collected by hopoft's graphite will be kept and recognized by graphiteapp/graphite-statsd, and my grafana will function as normal, right? Thank you!!! |
@deniszh I just tried it. docker exec -it fba2dc92dceb /bin/bash root@fba2dc92dceb:~# PYTHONPATH=/opt/graphite/webapp python django-admin.py migrate auth --settings=graphite.settings |
@codexiao ,
|
@deniszh Thanks. I tested it again. It went a step further but still give me errors, see below. any idea? root@a1f7bfe26094:/# PYTHONPATH=/opt/graphite/webapp python /usr/local/bin/django-admin.py migrate auth --settings=graphite.settings my_graphite: Steps to reproduce this migration problem: root@fba2dc92dceb:~# PYTHONPATH=/opt/graphite/webapp python django-admin.py migrate auth --settings=graphite.settings root@fba2dc92dceb:~# PYTHONPATH=/opt/graphite/webapp python /usr/local/bin/django-admin.py migrate --settings=graphite.settings |
@deniszh Hi Denis, sorry to bug you. Any suggestion? |
Try to add
|
Thanks, @deniszh . Those two commands ran successfully. But save&test from graphite still timeout. Checking the ngnix says upstream is not available. Looks like graphiteapp/graphite-statsd:1.0.2-3 still can't initial itself correctly? Do you know where should I look at? Thanks a lot! PYTHONPATH=/opt/graphite/webapp python /usr/local/bin/django-admin.py migrate auth --settings=graphite.settings --fake-initial root@499a718c484c:/# PYTHONPATH=/opt/graphite/webapp python /usr/local/bin/django-admin.py migrate auth --settings=graphite.settings --fake-initial root@499a718c484c:/# PYTHONPATH=/opt/graphite/webapp python /usr/local/bin/django-admin.py migrate --settings=graphite.settings --fake-initial cat /var/log/nginx/error.log |
That error is really strange. Are you sure that you connecting to the right instance? We're not using fastcgi, we're using proxying to gunicorn. What
|
@deniszh yes, during the whole testing, the only change i made is the image name in docker-compose file, from hopsoft/graphite-statsd to graphiteapp/graphite-statsd:1.0.2-3. docker-compose down, make the changes, and then docker-compose up I will check the ps aws output and report back. Thanks a lot! |
But our image doesn't contain Grafana, but according to error above it came from Grafana. Are you sure that Grafana connecting to correct instance? |
oh, sorry for the confusion. @deniszh my docker-compose has two services, one is grafana for UI, the other is graphite. The only change i made is the graphite image.graphite: grafana: Steps to reproduce this migration problem: |
Ah, OK. But fastcgi error still looks very suspicious. Could you please share your docker-compose config also? And |
@deniszh yup. Thanks a lot for helping me. Below is my docker-compose file, docker-compose config output, the ps output, and also the related log i found in /var/log/gunicorn.log Like i mentioned above, I can reproduce this one every time. With my docker-compose file: 1). "docker-compose up -d" version: "3" services: grafana:
|
OK, making a clear test.
You can go to
|
You can try to to save your |
Ah, now I understand what's going on. When you running |
Ummm, strange, I thought the config stays inside the container. Especially here I only mount the storage volume. Not quite sure why the new container picks up the configuration from the old container. (Old container is the one with hopsoft image, new is the one with graphiteapp image). Can you help further explain it to me?
Anyway, I will test it out later in my end and report back. Thanks a lot!
Xiao Wang
Excuse my typo on phone
… On Dec 11, 2017, at 8:40 AM, Denis Zhdanov ***@***.***> wrote:
Ah, now I understand what's going on. When you running docker-compose up with new image you're mounting only storage volume, but not config, so, it's picking it up from previous image.
This will not work - configs are quite different and not compatible. That's why you was getting wsgi errors - it was an old config for nginx running. So, solution is simple - mount /opt/graphite/conf volume for the new image on a separate empty directory. Or delete old container after stopping it.
I tested both ways - both are working.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Well, it was also surprising to me, but after some thinking, it looks completely logical, looks like it works as intended. You can use
but config volume for both containers looks like:
I found out that source ("/var/lib/docker/volumes/...") is the same for both containers. |
@deniszh yes! it's working!!! Finally!!! Thanks a lot for your help. You are awesome! |
Good, thanks for asking, that was educational also. :) |
Thank you!
Xiao Wang
Excuse my typo on phone
… On Dec 12, 2017, at 12:33 AM, Denis Zhdanov ***@***.***> wrote:
Good, thanks for asking, that was educational also. :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi,
I'm currently using docker-compose managing a grafana and hopsoft/graphite-statsd deployment, where a host volume is attached to the hopsoft/graphite-statsd container's /opt/graphite/storage. Everything is working fine, except hopsoft/graphite-statsd is still at 0.91 that a few functions I need is missing. So, when i'm trying to migrate my hopsoft/graphite-statsd to graphiteapp/graphite-statsd:1.0.2-3. I thought it's just simply replacing the image name. Looks like i'm totally wrong. I noticed that graphiteapp/graphite-statsd:1.0.2-3 can't initialize itself with the same host volume. Anyone can give me some advice how to do this migration smoothly? I would like to preserve all the collected data that currently stored on my local volume by hopsoft/graphite-statsd, and I would like Grafana to function normally after migration. Anyway to achieve this?
My docker-compose snippet is as follow. Thanks a lot!
my_graphite:
image: graphiteapp/graphite-statsd:1.0.2-3 #hopsoft/graphite-statsd #graphiteapp/graphite-statsd:1.0.2-3
volumes:
- my_data/graphite/storage:/opt/graphite/storage
The text was updated successfully, but these errors were encountered: