Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reference-repository
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
grid5000
reference-repository
Commits
a76d41f2
Commit
a76d41f2
authored
6 years ago
by
Lucas Nussbaum
Browse files
Options
Downloads
Patches
Plain Diff
gen/oar-properties: fix DO=exec
parent
f77255da
No related branches found
No related tags found
No related merge requests found
Pipeline
#50900
passed
6 years ago
Stage: validate
Stage: generate
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Rakefile
+2
-2
2 additions, 2 deletions
Rakefile
lib/refrepo/gen/oar-properties.rb
+2
-1
2 additions, 1 deletion
lib/refrepo/gen/oar-properties.rb
with
4 additions
and
3 deletions
Rakefile
+
2
−
2
View file @
a76d41f2
...
...
@@ -125,7 +125,7 @@ namespace :gen do
exit
(
ret
)
end
desc
"Generate OAR properties -- parameters: [SITE={grenoble,...}] [CLUSTER={yeti,...}] [NODE={dahu-1,...}] DO={
prin
t,exec,diff,check} [VERBOSE={0,1,2,3}]"
desc
"Generate OAR properties -- parameters: [SITE={grenoble,...}] [CLUSTER={yeti,...}] [NODE={dahu-1,...}] DO={
outpu
t,exec,diff,check} [VERBOSE={0,1,2,3}]"
task
"oar-properties"
do
require
'refrepo/gen/oar-properties'
options
=
{}
...
...
@@ -144,7 +144,7 @@ namespace :gen do
ENV
[
'DO'
].
split
(
','
).
each
do
|
t
|
options
[
:diff
]
=
true
if
t
==
'diff'
options
[
:output
]
=
true
if
t
==
'output'
options
[
:exec
]
=
true
if
t
==
'
update
'
options
[
:exec
]
=
true
if
t
==
'
exec
'
if
t
==
'check'
options
[
:diff
]
=
true
# check requires diff
options
[
:check
]
=
true
...
...
This diff is collapsed.
Click to expand it.
lib/refrepo/gen/oar-properties.rb
+
2
−
1
View file @
a76d41f2
...
...
@@ -2,6 +2,7 @@
require
'hashdiff'
require
'refrepo/data_loader'
require
'net/ssh'
class
MissingProperty
<
StandardError
;
end
...
...
@@ -528,7 +529,7 @@ end
def
ssh_exec
(
site_uid
,
cmds
,
options
)
# The following is equivalent to : "cat cmds | bash"
#res = ""
c
=
Net
::
SSH
.
start
(
options
[
:ssh
][
:host
].
gsub
(
"%s"
,
site_uid
),
options
[
:ssh
][
:user
],
options
[
:ssh
][
:params
]
)
c
=
Net
::
SSH
.
start
(
"oar.
#{
site_uid
}
.g5kadmin"
,
"g5kadmin"
)
c
.
open_channel
{
|
channel
|
channel
.
exec
(
'sudo bash'
)
{
|
ch
,
success
|
# stdout
...
...
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