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

Some minor changes to get ipython running on my instance #462

Merged
merged 4 commits into from Aug 9, 2015

Conversation

@scholtalbers
Copy link
Contributor

scholtalbers commented Jul 15, 2015

The more verbose communication was needed to find out why it was failing - or to see success by showing the container id.
The other is a fix that was needed for docker to be able to mount/read the directory.

@bgruening

This comment has been minimized.

Copy link
Member

bgruening commented Jul 15, 2015

The more verbose debugging looks good to me! Not sure about the first one. To get rid of the sudo you can add your user to the docker group. Does this fix your problem? Sorry for not responding yet to your mail. Just saw it a few minutes ago.

@hexylena

This comment has been minimized.

Copy link
Member

hexylena commented Jul 15, 2015

"finalize namespace chdir to /import permission denied"

that statement sounds like it's a container-side issue. Like we're not setting permissions correctly on the folder. https://github.com/bgruening/docker-ipython-notebook/blob/master/startup.sh

@scholtalbers

This comment has been minimized.

Copy link
Contributor Author

scholtalbers commented Jul 15, 2015

Also without sudo (i.e. user in group docker) I get the same statement (unless chmod o+x on the temp dir).

galaxy.web.base.interactive_environments INFO 2015-07-15 22:05:39,935 Starting IPython docker container with command [docker run -d --sig-proxy=true -p 33332:6789 -v "/g/galaxy-dev_data/tmp/tmpBvzO5P:/import/" bgruening/docker-ipython-notebook:dev]
galaxy.web.base.interactive_environments ERROR 2015-07-15 22:05:41,089 278520bc2bbb88aa28ef52f96e045dfb12e558338bb0a2a859b888188f595f7c

time="2015-07-15T22:05:41+02:00" level="fatal" msg="Error response from daemon: Cannot start container 278520bc2bbb88aa28ef52f96e045dfb12e558338bb0a2a859b888188f595f7c: finalize namespace chdir to /import permission denied
@hexylena

This comment has been minimized.

Copy link
Member

hexylena commented Jul 15, 2015

Hmm. Interesting. Well, 👍 happy to merge this. I imagine anyone running on clusters will encounter similar issues.

@hexylena

This comment has been minimized.

Copy link
Member

hexylena commented Jul 15, 2015

Okay, before I merged, I saw some things which should be changed first @scholtalbers

@@ -10,6 +11,13 @@ ie_request.load_deploy_config()
ie_request.attr.docker_port = 6789
# Create tempdir in galaxy
temp_dir = ie_request.temp_dir
if ie_request.attr.viz_config.getboolean("docker", "wx_tempdir"):

This comment has been minimized.

Copy link
@hexylena

hexylena Jul 15, 2015

Member

Please move this to lib/galaxy/web/base/interactive_environments.py, perhaps around https://github.com/scholtalbers/galaxy/blob/dev/lib/galaxy/web/base/interactive_environments.py#L53

This comment has been minimized.

Copy link
@hexylena

hexylena Jul 15, 2015

Member

Anything which introduces a new viz_config element must be added to L61 of lib/galaxy/web/base/interactive_environments.py in order to be properly backwards compatible

@martenson

This comment has been minimized.

Copy link
Member

martenson commented Aug 9, 2015

👍
@erasche any more concerns?

@hexylena

This comment has been minimized.

Copy link
Member

hexylena commented Aug 9, 2015

@martenson nope, LGTM.

hexylena added a commit that referenced this pull request Aug 9, 2015
Some minor changes to get ipython running on my instance
@hexylena hexylena merged commit f55b70e into galaxyproject:dev Aug 9, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hexylena

This comment has been minimized.

Copy link
Member

hexylena commented Sep 17, 2015

galaxy.webapps.galaxy.controllers.visualization ERROR 2015-09-17 12:02:43,575 error rendering visualization (helloworld): Not a boolean: 
Traceback (most recent call last):
  File "/home/hxr/work/galaxy/lib/galaxy/webapps/galaxy/controllers/visualization.py", line 749, in render
    return plugin.render( trans=trans, embedded=embedded, **kwargs )
  File "/home/hxr/work/galaxy/lib/galaxy/visualization/plugins/plugin.py", line 138, in render
    return self._render( render_vars, trans=trans, embedded=embedded )
  File "/home/hxr/work/galaxy/lib/galaxy/visualization/plugins/plugin.py", line 280, in _render
    request = self.INTENV_REQUEST_FACTORY( trans, self )
  File "/home/hxr/work/galaxy/lib/galaxy/web/base/interactive_environments.py", line 55, in __init__
    if self.attr.viz_config.getboolean("docker", "wx_tempdir"):
  File "/usr/lib/python2.7/ConfigParser.py", line 370, in getboolean
    raise ValueError, 'Not a boolean: %s' % v
ValueError: Not a boolean: 

hmm.

@hexylena

This comment has been minimized.

Copy link
Member

hexylena commented Sep 23, 2015

OKAY! Figured this out. This is because @scholtalbers used the very sensible True value in https://github.com/galaxyproject/galaxy/pull/462/files#diff-8e1ceff09b33c4c85b5f623d1857ca00R70 however, python's ConfigParser expects boolean values to be quoted.

import ConfigParser
import tempfile
import os
config = ConfigParser.ConfigParser({
    'a': 'True',
    'b': True,
})
tmp = tempfile.NamedTemporaryFile(delete=False)
tmp.write("""
[main]
""")
tmp.close()

config.read(tmp.name)

assert config.getboolean('main', 'a') is True
try:
    assert config.getboolean('main', 'b') is True
except TypeError:
    print 'TE'  # Prints 'TE'

os.unlink(tmp.name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.