Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hubzero-mw2-common
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hubzero Packaging Repositories
hubzero-mw2-common
Compare Revisions
d43dde06df76a264d9ef2a7274827cc619d2c4ef...b87f2471f582ad087b383c503e7caea766b86c36
Source
b87f2471f582ad087b383c503e7caea766b86c36
Select Git revision
...
Target
d43dde06df76a264d9ef2a7274827cc619d2c4ef
Select Git revision
Compare
Commits (2)
add support for hydroshare mounts and bug fix for tool parameter support in Docker
· 2e68923f
Pascal Meunier
authored
Dec 02, 2019
2e68923f
last resort guessing weber proxy URL now implemented in Session class
· b87f2471
Pascal Meunier
authored
Dec 02, 2019
b87f2471
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
source/container.py
source/container.py
+11
-6
source/session.py
source/session.py
+2
-2
No files found.
source/container.py
View file @
b87f2471
...
...
@@ -1610,15 +1610,16 @@ class ContainerDocker(Container):
def
mount_paths
(
self
,
mountlist
):
"""Given a list of paths, mount them in the container. Called by maxwell_service when receiving the command mount_paths.
This functionality is needed for the MyGeohub hydroshare connectivity via /srv/irods/external.
Docker implementation: store the information on the mount points until we can start the container."""
Docker implementation: store the information on the mount points until we can start the container.
This container instance is preserved during the call to maxwell_service, which received all
the information it needed with the "startxapp" command."""
for
mount_pt
in
mountlist
:
log
(
"
mounting
%s"
%
(
mount_pt
))
log
(
"
registering mount point
%s"
%
(
mount_pt
))
# mount_pt must already exist
if
not
os
.
path
.
exists
(
mount_pt
):
log
(
"trying to mount '%s' but it doesn't exist"
%
mount_pt
)
continue
self
.
mounts
+=
[
mount_pt
,
'rw,noatime'
]
self
.
mounts
+=
[[
mount_pt
,
'rw,noatime'
]]
def
groups
(
self
):
""" find last user in /etc/passwd, and get the groups"""
...
...
@@ -1681,7 +1682,7 @@ class ContainerDocker(Container):
def
__root_mount
(
self
,
point
,
perm
):
"""Build list of mount points to use when creating container. "perm" is intended to be
used as is in the mount command option '-o' """
self
.
mounts
+=
[
point
,
perm
]
self
.
mounts
+=
[
[
point
,
perm
]
]
def
get_status
(
self
):
"""Obtain the status of the services Docker container
...
...
@@ -2270,6 +2271,10 @@ class ContainerDocker(Container):
for
pubpath
in
listing
:
if
pubpath
+
':'
+
pubpath
not
in
args
:
args
+=
[
'-v'
,
pubpath
+
':'
+
pubpath
+
':ro'
]
for
mount
in
self
.
mounts
:
if
not
os
.
path
.
exists
(
mount
[
0
]):
continue
args
+=
[
'-v'
,
mount
[
0
]
+
':'
+
mount
[
0
]
+
':'
+
mount
[
0
]]
# USER environment variable used for xauth operation
# Can't use the --user option because we need root to setup account and group information
...
...
@@ -2381,7 +2386,7 @@ class ContainerDocker(Container):
# invoke rewrites the path... Is setting it ourselves useful?
args
+=
[
'-e'
,
"PATH=%s"
%
"/bin:/usr/bin:/usr/bin/X11:/sbin:/usr/sbin"
]
if
params
:
args
+=
[
'-e'
,
"TOOL_PARAMETERS=
\"
%s
\"
"
%
account
.
int_params_path
(
session_id
)]
args
+=
[
'-e'
,
"TOOL_PARAMETERS=
%s
"
%
account
.
int_params_path
(
session_id
)]
try
:
if
self
.
k
[
"EXTRA_ENV_CMD"
]
!=
""
:
...
...
source/session.py
View file @
b87f2471
...
...
@@ -555,13 +555,13 @@ class Session:
# add host
if
'FRONT_LISTEN_HOST'
in
proxy_vars
:
if
proxy_vars
[
'FRONT_LISTEN_HOST'
]
==
''
:
prefix
=
prefix
+
guess_weber_proxy
(
hub_url
)
prefix
=
prefix
+
Session
.
guess_weber_proxy
(
hub_url
)
else
:
if
DEBUG
:
log
(
"DEBUG: front listen host is '%s'"
%
str
(
proxy_vars
[
'FRONT_LISTEN_HOST'
]))
prefix
=
prefix
+
str
(
proxy_vars
[
'FRONT_LISTEN_HOST'
])
else
:
prefix
=
prefix
+
guess_weber_proxy
(
hub_url
)
prefix
=
prefix
+
Session
.
guess_weber_proxy
(
hub_url
)
# add port
if
'FRONT_LISTEN_PORT'
in
proxy_vars
:
if
proxy_vars
[
'FRONT_LISTEN_PORT'
]
==
443
:
...
...