Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
advLigoRTS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue 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
CDS
software
advLigoRTS
Commits
a5637780
Commit
a5637780
authored
4 years ago
by
Erik von Reis
Browse files
Options
Downloads
Patches
Plain Diff
rtcds: add check of system to see if model is assigned to it
parent
7c043f9a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!195
Rtcds check model
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
support/bin/rtcds.in
+25
-7
25 additions, 7 deletions
support/bin/rtcds.in
with
25 additions
and
7 deletions
support/bin/rtcds.in
+
25
−
7
View file @
a5637780
...
...
@@ -26,6 +26,7 @@ site=${SITE,,*}
IFO
=
${
IFO
^^*
}
ifo
=
${
IFO
,,*
}
CHECK_MODEL_IN_HOST
=
${
CHECK_MODEL_IN_HOST
:-
false
}
IS_DOLPHIN_NODE
=
${
IS_DOLPHIN_NODE
:-
false
}
DAQ_STREAMING
=
${
DAQ_STREAMING
:-
false
}
...
...
@@ -144,6 +145,17 @@ list_host_sys() {
fi
}
# returns 0 if $1 names a system that's designated to run
# on this host
check_sys_in_host
()
{
echo
"CHECK_MODEL_IN_HOST=
$CHECK_MODEL_IN_HOST
"
echo
"force_start=
$force_start
"
if
$CHECK_MODEL_IN_HOST
&&
!
$force_start
;
then
local
systems
=
`
list_host_sys
`
contains
$1
$systems
fi
}
check_unit_available
()
{
if
!
systemctl
cat
rts@
$1
.target
>
/dev/null
;
then
log
"RTS front end systemd units don't seem to be available. Is the advligorts-fe package installed?"
...
...
@@ -216,13 +228,18 @@ install_world() {
start_sys
()
{
for
sys
;
do
log
"### starting
$sys
..."
local
unit_name
=
`
get_model_unit
${
sys
}
`
sudo
systemctl start
$unit_name
# pause needed to avoid timing glitch when user model started immediately after IOP
log
"... waiting for start of
${
sys
}
to complete"
sleep
15
log
"
${
sys
}
started"
if
check_sys_in_host
$sys
;
then
local
unit_name
=
`
get_model_unit
${
sys
}
`
sudo
systemctl start
$unit_name
# pause needed to avoid timing glitch when user model started immediately after IOP
log
"... waiting for start of
${
sys
}
to complete"
sleep
15
log
"
${
sys
}
started"
else
log
"
$sys
can't be run on
$(
hostname
)
"
log
"Override with the '--force-start' option."
fi
done
}
...
...
@@ -425,6 +442,7 @@ Available commands:
${
enable_usage
}
disable <sys>...|--all disable system start at boot
start <sys>...|--all start systems
--force-start start a model even if it fails some checks
restart <sys>...|--all restart running systems
stop|kill <sys>...|--all stop running systems
...
...
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