Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flex Extract
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Flexpart
Flex Extract
Commits
50f9ca6e
Commit
50f9ca6e
authored
5 years ago
by
Anne Philipp
Browse files
Options
Downloads
Patches
Plain Diff
BUGFIX (ticket #263): Corrected installation check for parameters GATEWAY and DESTINATION
parent
5868d748
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Source/Python/Mods/checks.py
+8
-3
8 additions, 3 deletions
Source/Python/Mods/checks.py
Source/Python/install.py
+10
-10
10 additions, 10 deletions
Source/Python/install.py
setup.sh
+6
-3
6 additions, 3 deletions
setup.sh
with
24 additions
and
16 deletions
Source/Python/Mods/checks.py
+
8
−
3
View file @
50f9ca6e
...
@@ -478,12 +478,17 @@ def check_queue(queue, gateway, destination, ecuid, ecgid):
...
@@ -478,12 +478,17 @@ def check_queue(queue, gateway, destination, ecuid, ecgid):
'''
'''
if
queue
in
_config
.
QUEUES_LIST
and
\
if
queue
in
_config
.
QUEUES_LIST
and
\
(
not
gateway
or
not
destination
or
(
not
ecuid
or
not
ecgid
):
not
ecuid
or
not
ecgid
):
raise
ValueError
(
'
\n
Environment variables ECUID
'
raise
ValueError
(
'
\n
Environment variables GATEWAY, DESTINATION, ECUID
'
'
and ECGID were not set properly!
\n
'
'
and ECGID were not set properly!
\n
'
'
Please check for existence of file
"
ECMWF_ENV
"
'
'
Please check for existence of file
"
ECMWF_ENV
"
'
'
in the run directory!
'
)
'
in the run directory!
'
)
elif
queue
in
_config
.
QUEUES_LIST
and
\
(
not
gateway
or
not
destination
):
print
(
'
WARNING: Parameters GATEWAY and DESTINATION were
'
'
not properly set for working on ECMWF server.
\n
'
'
There will be no transfer of output files to the
'
'
local gateway server possible!
'
)
return
return
def
check_pathes
(
idir
,
odir
,
fpdir
,
fedir
):
def
check_pathes
(
idir
,
odir
,
fpdir
,
fedir
):
...
...
This diff is collapsed.
Click to expand it.
Source/Python/install.py
+
10
−
10
View file @
50f9ca6e
...
@@ -284,19 +284,19 @@ def check_install_conditions(c):
...
@@ -284,19 +284,19 @@ def check_install_conditions(c):
sys
.
exit
(
1
)
sys
.
exit
(
1
)
if
c
.
install_target
and
c
.
install_target
!=
'
local
'
:
if
c
.
install_target
and
c
.
install_target
!=
'
local
'
:
if
not
c
.
ecgid
or
not
c
.
ecuid
or
\
if
not
c
.
ecgid
or
not
c
.
ecuid
:
not
c
.
gateway
or
not
c
.
destination
:
print
(
'
Please enter your ECMWF user id and group id
'
print
(
'
Please enter your ECMWF user id and group id as well
'
+
'
with command line options --ecuid --ecgid
'
)
'
as the
\n
name of the local gateway and the ectrans
'
+
'
destination
'
)
print
(
'
with command line options --ecuid --ecgid
\
--gateway --destination
'
)
print
(
'
Try
"'
+
sys
.
argv
[
0
].
split
(
'
/
'
)[
-
1
]
+
\
print
(
'
Try
"'
+
sys
.
argv
[
0
].
split
(
'
/
'
)[
-
1
]
+
\
'
-h
"
to print usage information
'
)
'
-h
"
to print usage information
'
)
print
(
'
Please consult ecaccess documentation or ECMWF user
\
print
(
'
Please consult ecaccess documentation or ECMWF user
'
support for further details
'
)
'
support for further details
.
\n
'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
if
not
c
.
gateway
or
not
c
.
destination
:
print
(
'
WARNING: Parameters GATEWAY and DESTINATION were
'
'
not properly set for working on ECMWF server.
\n
'
'
There will be no transfer of output files to the
'
'
local gateway server possible!
'
)
if
not
c
.
installdir
:
if
not
c
.
installdir
:
c
.
installdir
=
'
${HOME}
'
c
.
installdir
=
'
${HOME}
'
else
:
# local
else
:
# local
...
...
This diff is collapsed.
Click to expand it.
setup.sh
+
6
−
3
View file @
50f9ca6e
...
@@ -30,7 +30,7 @@ MAKEFILE='makefile_ecgate'
...
@@ -30,7 +30,7 @@ MAKEFILE='makefile_ecgate'
ECUID
=
'<username>'
ECUID
=
'<username>'
ECGID
=
'<groupID>'
ECGID
=
'<groupID>'
GATEWAY
=
'<gatewayname>'
GATEWAY
=
'<gatewayname>'
DESTINATION
=
'<name>@genericSftp'
DESTINATION
=
'<
user
name>@genericSftp'
INSTALLDIR
=
None
INSTALLDIR
=
None
JOB_TEMPLATE
=
''
JOB_TEMPLATE
=
''
CONTROLFILE
=
'CONTROL_EA5'
CONTROLFILE
=
'CONTROL_EA5'
...
@@ -58,13 +58,16 @@ fi
...
@@ -58,13 +58,16 @@ fi
# CHECK FOR MORE PARAMETER
# CHECK FOR MORE PARAMETER
if
[
"
$TARGET
"
==
"ecgate"
]
||
[
"
$TARGET
"
==
"cca"
]
;
then
if
[
"
$TARGET
"
==
"ecgate"
]
||
[
"
$TARGET
"
==
"cca"
]
;
then
# check if necessary Parameters are set
# check if necessary Parameters are set
if
[
-z
"
$ECUID
"
]
||
[
-z
"
$ECGID
"
]
||
[
-z
"
$GATEWAY
"
]
||
[
-z
"
$DESTINATION
"
]
;
then
if
[
-z
"
$ECUID
"
]
||
[
-z
"
$ECGID
"
]
||
[
"
$ECUID
"
==
"<username>"
]
||
[
"
$ECGID
"
==
"<groupID>
"
]
;
then
echo
"ERROR: At least one of the following parameters are not set: ECUID
,
ECGID
, GATEWAY, DESTINATION
!"
echo
"ERROR: At least one of the following parameters are not
properly
set: ECUID
or
ECGID!"
echo
"EXIT WITH ERROR"
echo
"EXIT WITH ERROR"
exit
exit
else
else
parameterlist+
=
" --ecuid=
$ECUID
--ecgid=
$ECGID
--gateway=
$GATEWAY
--destination=
$DESTINATION
"
parameterlist+
=
" --ecuid=
$ECUID
--ecgid=
$ECGID
--gateway=
$GATEWAY
--destination=
$DESTINATION
"
fi
fi
if
[
-z
"
$GATEWAY
"
]
||
[
-z
"
$DESTINATION
"
]
||
[
"
$GATEWAY
"
==
"<gatewayname>"
]
||
[
"
$DESTINATION
"
==
"<username>@genericSftp"
]
;
then
echo
"WARNING: Not setting parameters GATEWAY and DESTINATION means there will be no file transfer to local gateway server."
fi
fi
fi
if
[
-n
"
$MAKEFILE
"
]
;
then
if
[
-n
"
$MAKEFILE
"
]
;
then
parameterlist+
=
" --makefile=
$MAKEFILE
"
parameterlist+
=
" --makefile=
$MAKEFILE
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment