From 61a2bd3bd7c6b7bd784199ab11557e02a81ea72b Mon Sep 17 00:00:00 2001
From: Baptiste Jonglez <baptiste.jonglez@imag.fr>
Date: Mon, 30 Nov 2020 10:29:06 +0100
Subject: [PATCH] [oar-properties] Set initial state of new nodes to Absent
 (bug 12454)

---
 lib/refrepo/gen/oar-properties.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/refrepo/gen/oar-properties.rb b/lib/refrepo/gen/oar-properties.rb
index f0605f6066..bdcab0b96f 100644
--- a/lib/refrepo/gen/oar-properties.rb
+++ b/lib/refrepo/gen/oar-properties.rb
@@ -268,9 +268,9 @@ def export_rows_as_oar_command(generated_hierarchy, site_name, site_properties,
       if resource_id == -1 or resource_id.nil?
         # Add the resource to the OAR DB
         if gpu == ''
-          result += "oarnodesetting -a -h '#{host}' -p host='#{host}' -p cpu=#{cpu} -p core=#{core} -p cpuset=#{cpuset}\n"
+          result += "oarnodesetting -a -h '#{host}' -s Absent -p host='#{host}' -p cpu=#{cpu} -p core=#{core} -p cpuset=#{cpuset}\n"
         else
-          result += "oarnodesetting -a -h '#{host}' -p host='#{host}' -p cpu=#{cpu} -p core=#{core} -p cpuset=#{cpuset} -p gpu=#{gpu} -p gpu_model='#{gpumodel}' -p gpudevice=#{gpudevice} # This GPU is mapped on #{gpudevicepath}\n"
+          result += "oarnodesetting -a -h '#{host}' -s Absent -p host='#{host}' -p cpu=#{cpu} -p core=#{core} -p cpuset=#{cpuset} -p gpu=#{gpu} -p gpu_model='#{gpumodel}' -p gpudevice=#{gpudevice} # This GPU is mapped on #{gpudevicepath}\n"
         end
       else
         # Update the resource
-- 
GitLab