diff --git a/lib/refrepo/gen/oar-properties.rb b/lib/refrepo/gen/oar-properties.rb index 2e1072d6cf39537f85b705c5c23fdd714fe801b9..1e16f1a10f119c4e588e93c37ea4c2a49e551197 100644 --- a/lib/refrepo/gen/oar-properties.rb +++ b/lib/refrepo/gen/oar-properties.rb @@ -722,7 +722,7 @@ def ignore_default_keys() "slash_21", "slash_22", "available_upto", - "besteffort", + # "besteffort", "chunks", "comment", # TODO "core", # This property was created by 'oar_resources_add' diff --git a/spec/oar_properties_spec.rb b/spec/oar_properties_spec.rb index fbe37d3b1c0a1281473e255fe14d753147efe895..ae9c3ef40b698bdb4b7295648f1166ddd9e519c3 100644 --- a/spec/oar_properties_spec.rb +++ b/spec/oar_properties_spec.rb @@ -222,7 +222,7 @@ oarnodesetting -a -h 'clustera-2.fakesite.grid5000.fr' -p host='clustera-2.fakes oarnodesetting -a -h 'clustera-2.fakesite.grid5000.fr' -p host='clustera-2.fakesite.grid5000.fr' -p cpu=4 -p core=32 -p cpuset=15 -p gpu=8 -p gpu_model='GeForce RTX 2080 Ti' -p gpudevice=3 # This GPU is mapped on /dev/nvidia3 TXT expected_clustera3_cmds = <<-TXT -oarnodesetting --sql "host='clustera-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clustera' -p nodemodel='Dell PowerEdge T640' -p switch='gw-fakesite' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=0 +oarnodesetting --sql "host='clustera-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clustera' -p nodemodel='Dell PowerEdge T640' -p switch='gw-fakesite' -p besteffort='YES' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=0 TXT generator_output = capture do @@ -255,6 +255,7 @@ TXT expected_clustera1_diff = <<-TXT clustera-1: new node ! + ["+", "besteffort", "YES"] ["+", "cluster", "clustera"] ["+", "cluster_priority", 201906] ["+", "cpuarch", "x86_64"] @@ -291,6 +292,7 @@ TXT expected_clustera2_diff = <<-TXT clustera-2: new node ! + ["+", "besteffort", "YES"] ["+", "cluster", "clustera"] ["+", "cluster_priority", 201906] ["+", "cpuarch", "x86_64"] @@ -441,7 +443,7 @@ oarnodesetting --sql "host='clustera-2.fakesite.grid5000.fr' AND resource_id='21 TXT expected_clustera3_cmds = <<-TXT -oarnodesetting --sql "host='clustera-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clustera' -p nodemodel='Dell PowerEdge T640' -p switch='gw-fakesite' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=0 +oarnodesetting --sql "host='clustera-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clustera' -p nodemodel='Dell PowerEdge T640' -p switch='gw-fakesite' -p besteffort='YES' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=0 TXT generator_output = capture do @@ -648,7 +650,7 @@ oarnodesetting -a -h 'clustera-2.fakesite.grid5000.fr' -p host='clustera-2.fakes oarnodesetting -a -h 'clustera-2.fakesite.grid5000.fr' -p host='clustera-2.fakesite.grid5000.fr' -p cpu=4 -p core=32 -p cpuset=15 -p gpu=8 -p gpu_model='GeForce RTX 2080 Ti' -p gpudevice=3 # This GPU is mapped on /dev/nvidia3 TXT expected_clustera3_cmds = <<-TXT -oarnodesetting --sql "host='clustera-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clustera' -p nodemodel='Dell PowerEdge T640' -p switch='gw-fakesite' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=0 +oarnodesetting --sql "host='clustera-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clustera' -p nodemodel='Dell PowerEdge T640' -p switch='gw-fakesite' -p besteffort='YES' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=0 TXT generator_output = capture do @@ -681,6 +683,7 @@ oarnodesetting --sql "host='clustera-2.fakesite.grid5000.fr' and type='default'" expected_clustera1_diff = <<-TXT clustera-1: new node ! + ["+", "besteffort", "YES"] ["+", "cluster", "clustera"] ["+", "cluster_priority", 201906] ["+", "cpuarch", "x86_64"] @@ -717,6 +720,7 @@ oarnodesetting --sql "host='clustera-2.fakesite.grid5000.fr' and type='default'" expected_clustera2_diff = <<-TXT clustera-2: new node ! + ["+", "besteffort", "YES"] ["+", "cluster", "clustera"] ["+", "cluster_priority", 201906] ["+", "cpuarch", "x86_64"] @@ -868,7 +872,7 @@ oarnodesetting -a -h 'clusterb-2.fakesite.grid5000.fr' -p host='clusterb-2.fakes TXT expected_clusterb3_cmds = <<-TXT -oarnodesetting --sql "host='clusterb-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterb' -p nodemodel='Dell PowerEdge T640' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 +oarnodesetting --sql "host='clusterb-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterb' -p nodemodel='Dell PowerEdge T640' -p besteffort='YES' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 TXT expected_clusterb4_cmds = <<-TXT @@ -912,6 +916,7 @@ TXT expected_clusterb1_diff = <<-TXT clusterb-1: new node ! + ["+", "besteffort", "YES"] ["+", "cluster", "clusterb"] ["+", "cluster_priority", 201906] ["+", "cpuarch", "x86_64"] @@ -948,6 +953,7 @@ TXT expected_clusterb2_diff = <<-TXT clusterb-2: new node ! + ["+", "besteffort", "YES"] ["+", "cluster", "clusterb"] ["+", "cluster_priority", 201906] ["+", "cpuarch", "x86_64"] @@ -1181,7 +1187,7 @@ oarnodesetting --sql "host='clusterb-2.fakesite.grid5000.fr' AND resource_id='35 TXT expected_clusterb3_cmds = <<-TXT -oarnodesetting --sql "host='clusterb-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterb' -p nodemodel='Dell PowerEdge T640' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 +oarnodesetting --sql "host='clusterb-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterb' -p nodemodel='Dell PowerEdge T640' -p besteffort='YES' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 TXT generator_output = capture do @@ -1342,7 +1348,7 @@ oarnodesetting -a -h 'clusterc-2.fakesite.grid5000.fr' -p host='clusterc-2.fakes oarnodesetting -a -h 'clusterc-2.fakesite.grid5000.fr' -p host='clusterc-2.fakesite.grid5000.fr' -p cpu=4 -p core=32 -p cpuset=15 TXT expected_clusterc3_cmds = <<-TXT -oarnodesetting --sql "host='clusterc-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterc' -p nodemodel='Dell PowerEdge T640' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=0 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 +oarnodesetting --sql "host='clusterc-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterc' -p nodemodel='Dell PowerEdge T640' -p besteffort='YES' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=0 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 TXT @@ -1376,6 +1382,7 @@ TXT expected_clusterc1_diff = <<-TXT clusterc-1: new node ! + ["+", "besteffort", "YES"] ["+", "cluster", "clusterc"] ["+", "cluster_priority", 201906] ["+", "cpuarch", "x86_64"] @@ -1412,6 +1419,7 @@ TXT expected_clusterc2_diff = <<-TXT clusterc-2: new node ! + ["+", "besteffort", "YES"] ["+", "cluster", "clusterc"] ["+", "cluster_priority", 201906] ["+", "cpuarch", "x86_64"] @@ -1555,7 +1563,7 @@ oarnodesetting --sql "host='clusterc-2.fakesite.grid5000.fr' AND resource_id='34 oarnodesetting --sql "host='clusterc-2.fakesite.grid5000.fr' AND resource_id='35' AND type='default'" -p cpu=4 -p core=32 -p cpuset=15 TXT expected_clusterc3_cmds = <<-TXT -oarnodesetting --sql "host='clusterc-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterc' -p nodemodel='Dell PowerEdge T640' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=0 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 +oarnodesetting --sql "host='clusterc-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterc' -p nodemodel='Dell PowerEdge T640' -p besteffort='YES' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=0 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 TXT generator_output = capture do @@ -1710,7 +1718,7 @@ oarnodesetting --sql "host='clusterc-2.fakesite.grid5000.fr' AND resource_id='34 oarnodesetting --sql "host='clusterc-2.fakesite.grid5000.fr' AND resource_id='35' AND type='default'" -p cpu=4 -p core=32 -p cpuset=15 TXT expected_clusterc3_cmds = <<-TXT -oarnodesetting --sql "host='clusterc-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterc' -p nodemodel='Dell PowerEdge T640' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=0 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 +oarnodesetting --sql "host='clusterc-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterc' -p nodemodel='Dell PowerEdge T640' -p besteffort='YES' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=0 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 TXT generator_output = capture do @@ -2110,6 +2118,7 @@ Properties that need to be created on the fakesite server: ib_rate "cluster": "clustera", "nodemodel": "Dell PowerEdge T640", "switch": "gw-fakesite", + "besteffort": "YES", "virtual": "ivt", "cpuarch": "x86_64", "cpucore": 8, @@ -2378,11 +2387,11 @@ CORE has an unexpected number of resources (current:31 vs expected:32). } expected_output = <<-TXT -oarnodesetting --sql "host='clusterb-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterb' -p nodemodel='Dell PowerEdge T640' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 +oarnodesetting --sql "host='clusterb-2.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.2' -p cluster='clusterb' -p nodemodel='Dell PowerEdge T640' -p besteffort='YES' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 TXT expected_output2 = <<-TXT -oarnodesetting --sql "host='clusterb-1.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.1' -p cluster='clusterb' -p nodemodel='Dell PowerEdge T640' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 +oarnodesetting --sql "host='clusterb-1.fakesite.grid5000.fr' and type='default'" -p ip='172.16.64.1' -p cluster='clusterb' -p nodemodel='Dell PowerEdge T640' -p besteffort='YES' -p virtual='ivt' -p cpuarch='x86_64' -p cpucore=8 -p cputype='Intel Xeon Silver 4110' -p cpufreq='2.1' -p disktype='SATA' -p eth_count=1 -p eth_rate=10 -p ib_count=0 -p ib_rate=0 -p ib='NO' -p opa_count=0 -p opa_rate=0 -p opa='NO' -p myri_count=0 -p myri_rate=0 -p myri='NO' -p memcore=8192 -p memcpu=65536 -p memnode=131072 -p gpu_count=4 -p mic='NO' -p wattmeter='MULTIPLE' -p cluster_priority=201906 -p max_walltime=86400 -p production='YES' -p maintenance='NO' -p disk_reservation_count=3 TXT expected_output3 = <<-TXT @@ -2414,4 +2423,45 @@ echo; echo 'Adding disk sdb.clusterb-2 on host clusterb-1.fakesite.grid5000.fr:' end end + context 'OAR server with data' do + before do + prepare_stubs("dump_oar_api_configured_server.json", "load_data_hierarchy_stubbed_data_bad_best_effort_property.json") + end + + it 'should generate correctly a diff with the OAR server' do + + uri = URI(conf["uri"]) + + response = Net::HTTP.get(uri) + + expect(response).to be_an_instance_of(String) + + options = { + :table => false, + :print => false, + :update => false, + :diff => true, + :site => "fakesite", + :clusters => ["clustera"], + :verbose => 2 + } + + expected_clustera1_diff = <<-TXT + clustera-1: OK + TXT + + expected_clustera2_diff = <<-TXT + clustera-2: + ["~", "besteffort", "YES", "NO"] + TXT + + generator_output = capture do + generate_oar_properties(options) + end + + expect(generator_output[:stdout]).to include(expected_clustera1_diff) + expect(generator_output[:stdout]).to include(expected_clustera2_diff) + end + end + end diff --git a/spec/stub_oar_properties/load_data_hierarchy_stubbed_data_bad_best_effort_property.json b/spec/stub_oar_properties/load_data_hierarchy_stubbed_data_bad_best_effort_property.json new file mode 100644 index 0000000000000000000000000000000000000000..91cc6db5b6c20792efdc610b8e3eed55d1f3925d --- /dev/null +++ b/spec/stub_oar_properties/load_data_hierarchy_stubbed_data_bad_best_effort_property.json @@ -0,0 +1,815 @@ +{ + "sites": { + "fakesite": { + "clusters": { + "clustera": { + "nodes": { + "clustera-1": { + "architecture": { + "nb_cores": 16, + "nb_procs": 2, + "nb_threads": 32, + "platform_type": "x86_64", + "cpu_core_numbering": "contiguous" + }, + "bios": { + "release_date": "06/14/2019", + "vendor": "Dell Inc.", + "version": "2.2.11" + }, + "chassis": { + "manufacturer": "Dell Inc.", + "name": "PowerEdge T640", + "serial": "FL1CBX2" + }, + "gpu": { + "gpu": true, + "gpu_cores": 17408, + "gpu_count": 4, + "gpu_model": "RTX 2080 Ti", + "gpu_vendor": "Nvidia" + }, + "gpu_devices": { + "nvidia0": { + "cpu_affinity": 0, + "device": "/dev/nvidia0", + "memory": 10989000000, + "model": "GeForce RTX 2080 Ti", + "power_default_limit": "250.00 W", + "vbios_version": "90.02.17.00.B2", + "vendor": "Nvidia" + }, + "nvidia1": { + "cpu_affinity": 0, + "device": "/dev/nvidia1", + "memory": 10989000000, + "model": "GeForce RTX 2080 Ti", + "power_default_limit": "250.00 W", + "vbios_version": "90.02.17.00.B2", + "vendor": "Nvidia" + }, + "nvidia2": { + "cpu_affinity": 1, + "device": "/dev/nvidia2", + "memory": 10989000000, + "model": "GeForce RTX 2080 Ti", + "power_default_limit": "250.00 W", + "vbios_version": "90.02.0B.40.09", + "vendor": "Nvidia" + }, + "nvidia3": { + "cpu_affinity": 1, + "device": "/dev/nvidia3", + "memory": 10989000000, + "model": "GeForce RTX 2080 Ti", + "power_default_limit": "250.00 W", + "vbios_version": "90.02.17.00.B2", + "vendor": "Nvidia" + } + }, + "main_memory": { + "ram_size": 137438953472 + }, + "monitoring": { + "wattmeter": "multiple" + }, + "network_adapters": [{ + "bridged": false, + "device": "eth0", + "driver": "bnxt_en", + "enabled": false, + "firmware_version": "214.0.173/1.9.2 pkg 21.40.20.0", + "interface": "Ethernet", + "mac": "f4:02:70:9a:3f:64", + "management": false, + "model": "BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller", + "mountable": false, + "mounted": false, + "name": "eno1", + "vendor": "Broadcom" + }, { + "bridged": false, + "device": "eth1", + "driver": "bnxt_en", + "enabled": false, + "firmware_version": "214.0.173/1.9.2 pkg 21.40.20.0", + "interface": "Ethernet", + "mac": "f4:02:70:9a:3f:65", + "management": false, + "model": "BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller", + "mountable": false, + "mounted": false, + "name": "eno2d1", + "vendor": "Broadcom" + }, { + "bridged": true, + "device": "eth2", + "driver": "i40e", + "enabled": true, + "firmware_version": "6.80 0x80003d72 18.8.9", + "interface": "Ethernet", + "ip": "172.16.64.1", + "mac": "f8:f2:1e:60:41:20", + "management": false, + "model": "Ethernet Controller X710 for 10GbE SFP+", + "mountable": true, + "mounted": true, + "name": "enp137s0f0", + "network_address": "clustera-1.fakesite.grid5000.fr", + "rate": 10000000000, + "switch": "gw-fakesite", + "switch_port": "Ethernet6/39", + "vendor": "Intel" + }, { + "bridged": false, + "device": "eth3", + "driver": "i40e", + "enabled": false, + "firmware_version": "6.80 0x80003d72 18.8.9", + "interface": "Ethernet", + "mac": "f8:f2:1e:60:41:21", + "management": false, + "model": "Ethernet Controller X710 for 10GbE SFP+", + "mountable": false, + "mounted": false, + "name": "enp137s0f1", + "vendor": "Intel" + }, { + "device": "bmc", + "enabled": true, + "interface": "Ethernet", + "ip": "172.17.64.1", + "mac": "f4:02:70:9a:3f:74", + "management": true, + "mountable": false, + "mounted": false, + "network_address": "clustera-1-bmc.fakesite.grid5000.fr" + }], + "operating_system": { + "cstate_driver": "intel_idle", + "cstate_governor": "menu", + "ht_enabled": true, + "pstate_driver": "intel_pstate", + "pstate_governor": "performance", + "turboboost_enabled": true + }, + "performance": { + "core_flops": 17713000000, + "node_flops": 202670000000 + }, + "processor": { + "cache_l1": null, + "cache_l1d": 32768, + "cache_l1i": 32768, + "cache_l2": 1048576, + "cache_l3": 11534336, + "clock_speed": 2100000000, + "ht_capable": true, + "instruction_set": "x86-64", + "microarchitecture": "Skylake", + "model": "Intel Xeon", + "other_description": "Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz", + "vendor": "Intel", + "version": "Silver 4110" + }, + "sensors": { + "power": { + "available": true, + "via": { + "api": { + "metric": "power" + }, + "pdu": [{ + "port": 1, + "uid": "clustera-pdu1" + }, { + "port": 1, + "uid": "clustera-pdu2" + }] + } + } + }, + "storage_devices": [{ + "by_id": "/dev/disk/by-id/wwn-0x6f402700aefea00024afe4c307e10af8", + "by_path": "/dev/disk/by-path/pci-0000:19:00.0-scsi-0:2:0:0", + "device": "sda", + "driver": "megaraid_sas", + "firmware_version": 4.29, + "interface": "SATA", + "model": "PERC H330 Adp", + "size": 479559942144, + "storage": "SSD", + "vendor": "Dell (Raid)" + }], + "supported_job_types": { + "besteffort": true, + "deploy": true, + "max_walltime": 86400, + "queues": ["admin", "production"], + "virtual": "ivt" + }, + "type": "node", + "uid": "clustera-1" + }, + "clustera-2": { + "architecture": { + "nb_cores": 16, + "nb_procs": 2, + "nb_threads": 32, + "platform_type": "x86_64", + "cpu_core_numbering": "contiguous" + }, + "bios": { + "release_date": "06/14/2019", + "vendor": "Dell Inc.", + "version": "2.2.11" + }, + "chassis": { + "manufacturer": "Dell Inc.", + "name": "PowerEdge T640", + "serial": "9L1CBX2" + }, + "gpu": { + "gpu": true, + "gpu_cores": 17408, + "gpu_count": 4, + "gpu_model": "RTX 2080 Ti", + "gpu_vendor": "Nvidia" + }, + "gpu_devices": { + "nvidia0": { + "cpu_affinity": 0, + "device": "/dev/nvidia0", + "memory": 10989000000, + "model": "GeForce RTX 2080 Ti", + "power_default_limit": "250.00 W", + "vbios_version": "90.02.17.00.B2", + "vendor": "Nvidia" + }, + "nvidia1": { + "cpu_affinity": 0, + "device": "/dev/nvidia1", + "memory": 10989000000, + "model": "GeForce RTX 2080 Ti", + "power_default_limit": "250.00 W", + "vbios_version": "90.02.0B.40.09", + "vendor": "Nvidia" + }, + "nvidia2": { + "cpu_affinity": 1, + "device": "/dev/nvidia2", + "memory": 10989000000, + "model": "GeForce RTX 2080 Ti", + "power_default_limit": "250.00 W", + "vbios_version": "90.02.0B.40.09", + "vendor": "Nvidia" + }, + "nvidia3": { + "cpu_affinity": 1, + "device": "/dev/nvidia3", + "memory": 10989000000, + "model": "GeForce RTX 2080 Ti", + "power_default_limit": "250.00 W", + "vbios_version": "90.02.17.00.AC", + "vendor": "Nvidia" + } + }, + "main_memory": { + "ram_size": 137438953472 + }, + "monitoring": { + "wattmeter": "multiple" + }, + "network_adapters": [{ + "bridged": false, + "device": "eth0", + "driver": "bnxt_en", + "enabled": false, + "firmware_version": "214.0.173/1.9.2 pkg 21.40.20.0", + "interface": "Ethernet", + "mac": "f4:02:70:9a:48:d8", + "management": false, + "model": "BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller", + "mountable": false, + "mounted": false, + "name": "eno1", + "vendor": "Broadcom" + }, { + "bridged": false, + "device": "eth1", + "driver": "bnxt_en", + "enabled": false, + "firmware_version": "214.0.173/1.9.2 pkg 21.40.20.0", + "interface": "Ethernet", + "mac": "f4:02:70:9a:48:d9", + "management": false, + "model": "BCM57416 NetXtreme-E 10GBase-T RDMA Ethernet Controller", + "mountable": false, + "mounted": false, + "name": "eno2d1", + "vendor": "Broadcom" + }, { + "bridged": true, + "device": "eth2", + "driver": "i40e", + "enabled": true, + "firmware_version": "6.80 0x80003d72 18.8.9", + "interface": "Ethernet", + "ip": "172.16.64.2", + "mac": "f8:f2:1e:60:3f:a0", + "management": false, + "model": "Ethernet Controller X710 for 10GbE SFP+", + "mountable": true, + "mounted": true, + "name": "enp137s0f0", + "network_address": "clustera-2.fakesite.grid5000.fr", + "rate": 10000000000, + "switch": "gw-fakesite", + "switch_port": "Ethernet6/40", + "vendor": "Intel" + }, { + "bridged": false, + "device": "eth3", + "driver": "i40e", + "enabled": false, + "firmware_version": "6.80 0x80003d72 18.8.9", + "interface": "Ethernet", + "mac": "f8:f2:1e:60:3f:a1", + "management": false, + "model": "Ethernet Controller X710 for 10GbE SFP+", + "mountable": false, + "mounted": false, + "name": "enp137s0f1", + "vendor": "Intel" + }, { + "device": "bmc", + "enabled": true, + "interface": "Ethernet", + "ip": "172.17.64.2", + "mac": "f4:02:70:9a:48:e8", + "management": true, + "mountable": false, + "mounted": false, + "network_address": "clustera-2-bmc.fakesite.grid5000.fr" + }], + "operating_system": { + "cstate_driver": "intel_idle", + "cstate_governor": "menu", + "ht_enabled": true, + "pstate_driver": "intel_pstate", + "pstate_governor": "performance", + "turboboost_enabled": true + }, + "performance": { + "core_flops": 17713000000, + "node_flops": 202670000000 + }, + "processor": { + "cache_l1": null, + "cache_l1d": 32768, + "cache_l1i": 32768, + "cache_l2": 1048576, + "cache_l3": 11534336, + "clock_speed": 2100000000, + "ht_capable": true, + "instruction_set": "x86-64", + "microarchitecture": "Skylake", + "model": "Intel Xeon", + "other_description": "Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz", + "vendor": "Intel", + "version": "Silver 4110" + }, + "sensors": { + "power": { + "available": true, + "via": { + "api": { + "metric": "power" + }, + "pdu": [{ + "port": 6, + "uid": "clustera-pdu1" + }, { + "port": 6, + "uid": "clustera-pdu2" + }] + } + } + }, + "storage_devices": [{ + "by_id": "/dev/disk/by-id/wwn-0x6f402700aeff430024929b4003cd51d0", + "by_path": "/dev/disk/by-path/pci-0000:19:00.0-scsi-0:2:0:0", + "device": "sda", + "driver": "megaraid_sas", + "firmware_version": 4.29, + "interface": "SATA", + "model": "PERC H330 Adp", + "size": 479559942144, + "storage": "SSD", + "vendor": "Dell (Raid)" + }], + "supported_job_types": { + "besteffort": false, + "deploy": true, + "max_walltime": 86400, + "queues": ["admin", "production"], + "virtual": "ivt" + }, + "type": "node", + "uid": "clustera-2" + } + }, + "created_at": "Fri, 07 Jun 2019 00:00:00 GMT", + "kavlan": false, + "model": "Dell PowerEdge T640", + "queues": ["admin", "production"], + "type": "cluster", + "uid": "clustera" + } + }, + "network_equipments": { + "gw-fakesite": { + "backplane_bps": 1280000000000, + "kind": "router", + "linecards": [{}, {}, {}, {}, {}, {}, { + "backplane_bps": 1280000000000, + "kavlan_pattern": "Ethernet%LINECARD%/%PORT%", + "kind": "node", + "model": "N9K-X9464PX", + "ports": [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, { + "kind": "node", + "port": "eth2", + "uid": "clustera-1" + }, { + "kind": "node", + "port": "eth2", + "uid": "clustera-2" + }], + "rate": 10000000000, + "snmp_pattern": "Ethernet%LINECARD%/%PORT%" + }], + "model": "Cisco Nexus 9508", + "monitoring": { + "metric": "power", + "wattmeter": "multiple" + }, + "sensors": { + "network": { + "available": true, + "resolution": 10 + }, + "power": { + "available": true, + "resolution": 1, + "via": { + "pdu": [{ + "port": 8, + "uid": "graoully-pdu1" + }, { + "port": 8, + "uid": "graoully-pdu2" + }, { + "port": 8, + "uid": "grimoire-pdu1" + }, { + "port": 8, + "uid": "grimoire-pdu2" + }] + } + } + }, + "site": "fakesite", + "snmp_community": "public", + "type": "network_equipment", + "uid": "gw-fakesite", + "vlans": { + "vlan100": { + "addresses": ["172.16.79.254"], + "administrative": true + }, + "vlan101": { + "addresses": ["172.17.79.254"] + }, + "vlan500": { + "addresses": ["192.168.4.14"] + }, + "vlan701": { + "addresses": ["192.168.192.0/20"], + "name": "kavlan-1" + }, + "vlan702": { + "addresses": ["192.168.208.0/20"], + "name": "kavlan-2" + }, + "vlan703": { + "addresses": ["192.168.224.0/20"], + "name": "kavlan-3" + }, + "vlan704": { + "addresses": ["10.16.0.0/18"], + "name": "kavlan-4" + }, + "vlan705": { + "addresses": ["10.16.64.0/18"], + "name": "kavlan-5" + }, + "vlan706": { + "addresses": ["10.16.128.0/18"], + "name": "kavlan-6" + }, + "vlan707": { + "addresses": ["10.16.192.0/18"], + "name": "kavlan-7" + }, + "vlan708": { + "addresses": ["10.17.0.0/18"], + "name": "kavlan-8" + }, + "vlan709": { + "addresses": ["10.17.64.0/18"], + "name": "kavlan-9" + }, + "vlan714": { + "addresses": ["10.19.192.0/18"], + "name": "kavlan-14" + } + }, + "warranty": "2020-09-01", + "weathermap": {} + } + }, + "pdus": { + "clustera-pdu1": { + "ip": "172.17.79.226", + "mac": "28:29:86:0B:3B:06", + "model": "AP8653", + "ports": { + "1": "clustera-1", + "6": "clustera-2" + }, + "sensors": [{ + "power": { + "per_outlets": true, + "resolution": 1, + "snmp": { + "available": true, + "outlet_prefix_oid": "iso.3.6.1.4.1.318.1.1.26.9.4.3.1.7", + "total_oids": ["iso.3.6.1.4.1.318.1.1.12.1.16.0"], + "unit": "W" + } + } + }], + "type": "pdu", + "uid": "clustera-pdu1", + "vendor": "APC" + }, + "clustera-pdu3": { + "ip": "172.17.79.231", + "mac": "28:29:86:12:27:FF", + "model": "AP8653", + "ports": {}, + "sensors": [{ + "power": { + "per_outlets": true, + "resolution": 1, + "snmp": { + "available": true, + "outlet_prefix_oid": "iso.3.6.1.4.1.318.1.1.26.9.4.3.1.7", + "total_oids": ["iso.3.6.1.4.1.318.1.1.12.1.16.0"], + "unit": "W" + } + } + }], + "type": "pdu", + "uid": "clustera-pdu3", + "vendor": "APC" + }, + "clustera-pdu2": { + "ip": "172.17.79.227", + "mac": "28:29:86:10:0E:8C", + "model": "AP8653", + "ports": { + "1": "clustera-1", + "6": "clustera-2" + }, + "sensors": [{ + "power": { + "per_outlets": true, + "resolution": 1, + "snmp": { + "available": true, + "outlet_prefix_oid": "iso.3.6.1.4.1.318.1.1.26.9.4.3.1.7", + "total_oids": ["iso.3.6.1.4.1.318.1.1.12.1.16.0"], + "unit": "W" + } + } + }], + "type": "pdu", + "uid": "clustera-pdu2", + "vendor": "APC" + }, + "clustera-pdu4": { + "ip": "172.17.79.232", + "mac": "28:29:86:10:0E:B4", + "model": "AP8653", + "ports": {}, + "sensors": [{ + "power": { + "per_outlets": true, + "resolution": 1, + "snmp": { + "available": true, + "outlet_prefix_oid": "iso.3.6.1.4.1.318.1.1.26.9.4.3.1.7", + "total_oids": ["iso.3.6.1.4.1.318.1.1.12.1.16.0"], + "unit": "W" + } + } + }], + "type": "pdu", + "uid": "clustera-pdu4", + "vendor": "APC" + } + }, + "compilation_server": false, + "description": "Grid5000 Fakesite site", + "email_contact": "support-staff@lists.grid5000.fr", + "frontend_ip": "172.16.79.101", + "g5ksubnet": { + "gateway": "10.147.255.254", + "network": "10.144.0.0/14" + }, + "latitude": 48.7, + "location": "Fakesite, France", + "longitude": 6.2, + "name": "Fakesite", + "production": true, + "renater_ip": "192.168.4.14", + "security_contact": "support-staff@lists.grid5000.fr", + "storage5k": false, + "sys_admin_contact": "support-staff@lists.grid5000.fr", + "type": "site", + "uid": "fakesite", + "user_support_contact": "support-staff@lists.grid5000.fr", + "virt_ip_range": "10.144.0.0/14", + "web": "http://www.grid5000.fr/mediawiki/index.php/Fakesite:Home" + } + }, + "network_equipments": { + "renater-lyon": { + "kind": "virtual", + "linecards": [{ + "ports": [{ + "uid": "renater-paris" + }, { + "uid": "renater-sophia" + }, { + "uid": "renater-grenoble" + }, { + "uid": "renater-nantes" + }, { + "kind": "router", + "site_uid": "lyon", + "uid": "gw-lyon" + }], + "rate": 10000000000 + }], + "type": "network_equipment", + "uid": "renater-lyon", + "weathermap": {} + }, + "renater-grenoble": { + "kind": "virtual", + "linecards": [{ + "ports": [{ + "uid": "renater-lyon" + }, { + "kind": "router", + "site_uid": "grenoble", + "uid": "gw-grenoble" + }], + "rate": 10000000000 + }], + "type": "network_equipment", + "uid": "renater-grenoble", + "weathermap": {} + }, + "renater-nancy": { + "kind": "virtual", + "linecards": [{ + "ports": [{ + "uid": "renater-luxembourg" + }, { + "uid": "renater-paris" + }, { + "kind": "router", + "site_uid": "nancy", + "uid": "gw-nancy" + }], + "rate": 10000000000 + }], + "type": "network_equipment", + "uid": "renater-nancy", + "weathermap": {} + }, + "renater-luxembourg": { + "kind": "virtual", + "linecards": [{ + "ports": [{ + "uid": "renater-nancy" + }, { + "kind": "router", + "site_uid": "luxembourg", + "uid": "gw-luxembourg" + }], + "rate": 10000000000 + }], + "type": "network_equipment", + "uid": "renater-luxembourg", + "weathermap": {} + }, + "renater-sophia": { + "kind": "virtual", + "linecards": [{ + "ports": [{ + "uid": "renater-lyon" + }, { + "kind": "router", + "site_uid": "sophia", + "uid": "gw-sophia" + }], + "rate": 10000000000 + }], + "type": "network_equipment", + "uid": "renater-sophia", + "weathermap": {} + }, + "renater-paris": { + "kind": "virtual", + "linecards": [{ + "ports": [{ + "uid": "renater-lille" + }, { + "uid": "renater-lyon" + }, { + "uid": "renater-nancy" + }], + "rate": 10000000000 + }], + "type": "network_equipment", + "uid": "renater-paris", + "weathermap": {} + }, + "renater-rennes": { + "kind": "virtual", + "linecards": [{ + "ports": [{ + "uid": "renater-nantes" + }, { + "kind": "router", + "site_uid": "rennes", + "uid": "gw-rennes" + }], + "rate": 10000000000 + }], + "type": "network_equipment", + "uid": "renater-rennes", + "weathermap": {} + }, + "renater-nantes": { + "kind": "virtual", + "linecards": [{ + "ports": [{ + "uid": "renater-lyon" + }, { + "uid": "renater-rennes" + }, { + "kind": "router", + "site_uid": "nantes", + "uid": "gw-nantes" + }], + "rate": 10000000000 + }], + "type": "network_equipment", + "uid": "renater-nantes", + "weathermap": {} + }, + "renater-lille": { + "kind": "virtual", + "linecards": [{ + "ports": [{ + "uid": "renater-paris" + }, { + "kind": "router", + "site_uid": "lille", + "uid": "gw-lille" + }], + "rate": 10000000000 + }], + "type": "network_equipment", + "uid": "renater-lille", + "weathermap": {} + } + }, + "type": "grid", + "uid": "grid5000" +}