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
76533453
Commit
76533453
authored
7 years ago
by
Lucas Nussbaum
Browse files
Options
Downloads
Patches
Plain Diff
[dev/oar-properties] improve error msg
parent
8abd6900
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
generators/oar-properties/oar-properties-check.rb
+2
-2
2 additions, 2 deletions
generators/oar-properties/oar-properties-check.rb
with
2 additions
and
2 deletions
generators/oar-properties/oar-properties-check.rb
+
2
−
2
View file @
76533453
...
@@ -85,7 +85,7 @@ options[:sites].each do |site|
...
@@ -85,7 +85,7 @@ options[:sites].each do |site|
# 'core' must be globally unique
# 'core' must be globally unique
dupe_cores
=
default_resources
.
map
{
|
e
|
e
.
slice
(
'id'
,
'core'
,
'host'
,
'cpu'
,
'cpuset'
)
}.
group_by
{
|
e
|
e
[
'core'
]
}.
to_a
.
select
{
|
e
|
e
[
1
].
length
>
1
}
dupe_cores
=
default_resources
.
map
{
|
e
|
e
.
slice
(
'id'
,
'core'
,
'host'
,
'cpu'
,
'cpuset'
)
}.
group_by
{
|
e
|
e
[
'core'
]
}.
to_a
.
select
{
|
e
|
e
[
1
].
length
>
1
}
unless
dupe_cores
.
empty?
unless
dupe_cores
.
empty?
puts
"ERROR: some resources have the same 'core' value. it should be globally unique."
puts
"ERROR: some resources have the same 'core' value. it should be globally unique
over the site
."
ret
=
false
ret
=
false
pp
dupe_cores
if
options
[
:verbose
]
pp
dupe_cores
if
options
[
:verbose
]
end
end
...
@@ -93,7 +93,7 @@ options[:sites].each do |site|
...
@@ -93,7 +93,7 @@ options[:sites].each do |site|
# 'cpu' must be unique to a 'host'
# 'cpu' must be unique to a 'host'
dupe_cpus
=
default_resources
.
map
{
|
e
|
[
e
[
'cpu'
],
e
[
'host'
]
]}.
uniq
.
group_by
{
|
e
|
e
[
0
]
}.
to_a
.
select
{
|
e
|
e
[
1
].
length
>
1
}
dupe_cpus
=
default_resources
.
map
{
|
e
|
[
e
[
'cpu'
],
e
[
'host'
]
]}.
uniq
.
group_by
{
|
e
|
e
[
0
]
}.
to_a
.
select
{
|
e
|
e
[
1
].
length
>
1
}
unless
dupe_cpus
.
empty?
unless
dupe_cpus
.
empty?
puts
"ERROR: some hosts have the same 'cpu' value. it should be globally unique."
puts
"ERROR: some hosts have the same 'cpu' value. it should be globally unique
over the site
."
ret
=
false
ret
=
false
pp
dupe_cores
if
options
[
:verbose
]
pp
dupe_cores
if
options
[
:verbose
]
end
end
...
...
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