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

problem on losing files when docker-galaxy-stable container restart #64

Closed
wtse168 opened this issue Jun 19, 2015 · 15 comments
Closed

problem on losing files when docker-galaxy-stable container restart #64

wtse168 opened this issue Jun 19, 2015 · 15 comments

Comments

@wtse168
Copy link

wtse168 commented Jun 19, 2015

docker-galaxy-stable docker restart will lose all files under galaxy-central/config, and when add lots of tools , it will appear differently on left tool panel.

@bgruening
Copy link
Owner

@wtse168 can you post me your commandline which you use to start the Docker container?
Is it similar to: docker run -i -t -p 8080:80 -v /home/user/galaxy_storage/:/export/ bgruening/galaxy-stable

If you run it like this you will see a /home/user/galaxy_storage/galaxy-central/config/ and this should be persistent.

@dpryan79
Copy link
Contributor

I think I had this happen once with the docker restart ... command, which is what I assume @wtse168 did. I'm not even remotely sure how that happened and I've never actually tried to reproduce it (though I probably could on Monday).

@bgruening
Copy link
Owner

@dpryan79 this would be a serious Docker bug I assume. Let me know if this is a restart problem. We would need to add this to the documentation.

@dpryan79
Copy link
Contributor

Eh, why wait until Monday...

I just tried docker restart ... and I can confirm that that results in a blank /export/galaxy-central/config. I also get a 403 error when trying to connect to the galaxy webserver (because it has no config files). For what it's worth, the slurm stuff and the database are still there, so it's not like it's just deleting everything under /export...though that makes it all the more confusing as to how this is actually happening.

Copying the (backed up!) config folder and then running supervisorctl restart galaxy: fixes things, thankfully.

@bgruening
Copy link
Owner

I have a theory:
Line https://github.com/bgruening/docker-galaxy-stable/blob/master/galaxy/export_user_files.py#L32 will remove the folder /galaxy-central/config. In case of a restart this is still a symlink and the shutil.rmtree() will follow the symlink.

What does not fit into this theory is that /galaxy-central/tool-data is not being removed. Can you confirm this? A fix would be easy, we just need to include a check for os.path.islink()

@dpryan79
Copy link
Contributor

I can confirm that /galaxy-central/tool-data is not being removed.

@bgruening
Copy link
Owner

@wtse168 can you confirm that this is only happening if you are using docker restart?

@dpryan79
Copy link
Contributor

This problem just bit me. I had previously docker commited a container wherein I had modified /etc/group and then started that. That deleted all of /export/galaxy-central/config. I have a backup of that directory, so it's an easy fix, but this was a bit disconcerting.

@vebaev
Copy link

vebaev commented Sep 22, 2015

Hi,
I also had the problem, I have returned a backup of /config I have from the past but now I cannot upload any files in Galaxy (PS I pulled the new 15.07 container, result is the same):

Traceback (most recent call last):
  File "/galaxy-central/tools/data_source/upload.py", line 430, in <module>
    __main__()
  File "/galaxy-central/tools/data_source/upload.py", line 419, in __main__
    add_file( dataset, registry, json_file, output_path )
  File "/galaxy-central/tools/data_source/upload.py", line 133, in add_file
    type_info = Binary.is_sniffable_binary( dataset.path )
  File "/galaxy-central/lib/galaxy/datatypes/binary.py", line 54, in is_sniffable_binary
    format_instance = format[ "class" ]()
  File "/shed_tools/testtoolshed.g2.bx.psu.edu/repos/crusoe/oxli_datatypes/08a714ff4ea5/oxli_datatypes/oxli.py", line 35, in __init__
    OxliBinary.__init__(self, **kwd)
TypeError: unbound method __init__() must be called with OxliBinary instance as first argument (got Count instance instead)```

@vebaev
Copy link

vebaev commented Sep 23, 2015

Can somebody help with the above error as my Galaxy is ussless as I cannot upload anything :(

@dannon
Copy link

dannon commented Sep 23, 2015

@vebaev This isn't a fantastic solution, but can you try to uninstall the oxli_datatypes toolshed repository? These datatypes were added to galaxy core and I believe conflicting definitions are probably the issue. I'll look into a galaxy-side solution to this.

@vebaev
Copy link

vebaev commented Sep 23, 2015

@dannon , that worked, thanks!

@dannon
Copy link

dannon commented Sep 23, 2015 via email

@ksuderman
Copy link

I think I am running into this bug as well; when the Galaxy Docker container is started with a mounted volume it cleans out the /galaxy-central/config directory when restarted.

NOTE: I am not using docker restart, but I am doing docker stop galaxy (started with --name galaxy option) and docker start galaxy. I don't know if it is any help at this point, but after stopping the container I can see that the files still exist in the /galaxy-central/config directory, but they are gone after restarting the container. I.E.

# I'm on OS X, hence the docker-machine bits
> docker-machine start default
> docker run -d -p 8000:80 --name galaxy -v /var/lib/galaxy:/export bgruening/galaxy-stable
> docker-machine ssh default
> ls /var/lib/galaxy/galaxy-central/config
...a bunch of files...
> exit
> docker stop galaxy
> docker-machine ssh default
> ls /var/lib/galaxy/galaxy-central/config
...a bunch of files...
> exit
> docker start galaxy
> docker-machine ssh default
> ls /var/lib/galaxy/galaxy-central/config
...empty...
> exit
> docker exec -it galaxy bash
> ls /galaxy-central/config
...empty...

However, bgruening/galaxy-stable:dev seems to fix the problem. Any idea when 'dev' will become 'latest'?

EDIT: I am running into this again, so either galaxy-stable:dev doesn't fix the problem, or it has been re-broken in :dev.

@bgruening
Copy link
Owner

@ksuderman when was this edit? :)
I hope this is now fixed. We have a lot of new stuff in :dev and we also introduced travis testing. So if this is not fixed we could add this to travis testing and make sure it never breaks again.

@ksuderman @vebaev please reopen this issue if you still have this problem.

bebatut pushed a commit to bebatut/docker-galaxy-stable that referenced this issue Apr 11, 2017
Fixed github paths in viennarna-tour
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

6 participants