Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
c2a95466
Commit
c2a95466
authored
8 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
Task #8392: fix in redirecting jobs to lexar3/4
parent
1fcbafcb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
LTA/LTAIngest/ingest_config.py.in
+1
-1
1 addition, 1 deletion
LTA/LTAIngest/ingest_config.py.in
LTA/LTAIngest/master.py
+6
-3
6 additions, 3 deletions
LTA/LTAIngest/master.py
with
7 additions
and
4 deletions
LTA/LTAIngest/ingest_config.py.in
+
1
−
1
View file @
c2a95466
...
@@ -21,7 +21,7 @@ ltaClient = None
...
@@ -21,7 +21,7 @@ ltaClient = None
host
=
socket
.
gethostname
()
host
=
socket
.
gethostname
()
## Using netifaces module or something similar would be nicer, but it doesn't want to install in a custom dir
## Using netifaces module or something similar would be nicer, but it doesn't want to install in a custom dir
## So we use this hack
## So we use this hack
if
'
lexar00
1
'
in
host
or
'
lexar002
'
in
host
:
if
'
lexar00
'
in
host
:
host
=
host
+
'
.offline.lofar
'
host
=
host
+
'
.offline.lofar
'
if
'
gridftp01.target.rug.nl
'
in
host
:
if
'
gridftp01.target.rug.nl
'
in
host
:
host
=
'
lotar2.staging.lofar
'
host
=
'
lotar2.staging.lofar
'
...
...
This diff is collapsed.
Click to expand it.
LTA/LTAIngest/master.py
+
6
−
3
View file @
c2a95466
...
@@ -205,7 +205,9 @@ class jobHandler(Process):
...
@@ -205,7 +205,9 @@ class jobHandler(Process):
self
.
update_job_msg
.
put
((
job
,
job
[
'
Status
'
],
JobProducing
,
None
))
self
.
update_job_msg
.
put
((
job
,
job
[
'
Status
'
],
JobProducing
,
None
))
job
[
'
Status
'
]
=
JobProducing
job
[
'
Status
'
]
=
JobProducing
self
.
active
[
job
[
'
ExportID
'
]]
=
job
self
.
active
[
job
[
'
ExportID
'
]]
=
job
self
.
manager
.
get
(
job
.
get
(
'
slave_hosts
'
)).
put
(
job
)
## sends it to the slave with the shortest queue of the possible slave_hosts
job_slave_hosts
=
job
.
get
(
'
slave_hosts
'
)
slave_for_job
=
self
.
manager
.
get
(
job_slave_hosts
)
slave_for_job
.
put
(
job
)
## sends it to the slave with the shortest queue of the possible slave_hosts
self
.
logger
.
debug
(
"
Job
'
s started: %s (%i)
"
%
(
job
[
'
ExportID
'
],
len
(
self
.
active
)))
self
.
logger
.
debug
(
"
Job
'
s started: %s (%i)
"
%
(
job
[
'
ExportID
'
],
len
(
self
.
active
)))
first
=
True
first
=
True
except
Empty
:
pass
except
Empty
:
pass
...
@@ -263,8 +265,9 @@ class queueHandler(Process):
...
@@ -263,8 +265,9 @@ class queueHandler(Process):
job
[
'
destination
'
]
=
self
.
job_groups
[
job
[
'
job_group
'
]].
get_destination
()
job
[
'
destination
'
]
=
self
.
job_groups
[
job
[
'
job_group
'
]].
get_destination
()
sourcehost
=
job
[
'
Location
'
].
split
(
'
:
'
)[
0
]
sourcehost
=
job
[
'
Location
'
].
split
(
'
:
'
)[
0
]
self
.
logger
.
info
(
"
job: %s sourcehost=%s
"
%
(
fileName
,
sourcehost
))
if
'
cep4
'
in
sourcehost
.
lower
():
if
'
cep4
'
in
sourcehost
.
lower
():
job
[
'
slave_hosts
'
]
=
[
'
lexar003.
lexar.control
.lofar
'
,
'
lexar004.
lexar.control
.lofar
'
]
job
[
'
slave_hosts
'
]
=
[
'
lexar003.
offline
.lofar
'
,
'
lexar004.
offline
.lofar
'
]
self
.
scheduled
.
put
(
job
)
self
.
scheduled
.
put
(
job
)
# self.talker.put(job) ## Tell MoM we've done something
# self.talker.put(job) ## Tell MoM we've done something
...
@@ -376,7 +379,7 @@ class ltaMaster():
...
@@ -376,7 +379,7 @@ class ltaMaster():
result
=
None
result
=
None
length
=
sys
.
maxint
length
=
sys
.
maxint
for
k
in
s
elf
.
slaves
.
keys
()
:
for
k
in
s
lave_hosts
:
size
=
self
.
slaves
[
k
].
qsize
()
size
=
self
.
slaves
[
k
].
qsize
()
if
length
>
size
:
if
length
>
size
:
result
=
self
.
slaves
[
k
]
result
=
self
.
slaves
[
k
]
...
...
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