From 6b09e1bdfa875b4f5d6fb147cd9a9b0ff8b4a55e Mon Sep 17 00:00:00 2001
From: Simon Delamare <simon.delamare@ens-lyon.fr>
Date: Mon, 12 May 2025 16:27:32 +0200
Subject: [PATCH 1/2] [lib] Support for describing several nodes connected to
 the same PDU/Wattmetre port (shared PSU case)

---
 .../templates/kwollect-wattmetre-mapping.erb  |  9 ++++
 lib/refrepo/input_loader.rb                   | 46 +++++++++++++------
 2 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/lib/refrepo/gen/puppet/templates/kwollect-wattmetre-mapping.erb b/lib/refrepo/gen/puppet/templates/kwollect-wattmetre-mapping.erb
index 0ec8a7132f3..eb5f582a890 100644
--- a/lib/refrepo/gen/puppet/templates/kwollect-wattmetre-mapping.erb
+++ b/lib/refrepo/gen/puppet/templates/kwollect-wattmetre-mapping.erb
@@ -4,6 +4,15 @@
 #
 
 <%-
+  wattmetre_port_per_node_flat = {}
+  wattmetre_port_per_node.each do |nodes, ports|
+    nodes = [nodes] if nodes.is_a?(String)
+    nodes.each do |node|
+      wattmetre_port_per_node_flat[node] = ports
+    end
+  end
+  wattmetre_port_per_node = wattmetre_port_per_node_flat
+
   # Sort by cluster and node number
   wattmetre_port_per_node.to_a.sort_by { |e| n = e[0].split('-') ; n[1] = n[1].to_i ; n }.each { |e| node, ports = e
 -%>
diff --git a/lib/refrepo/input_loader.rb b/lib/refrepo/input_loader.rb
index 0bf0e71cca9..2fa42260d10 100644
--- a/lib/refrepo/input_loader.rb
+++ b/lib/refrepo/input_loader.rb
@@ -120,15 +120,18 @@ def add_node_pdu_mapping(h)
       end
 
       # Merge pdu information from pdus/ hierachy into node information
-      pdu.fetch("ports", {}).each do |port_uid, node_uid|
-        node_uid = node_uid["uid"] if node_uid.is_a?(Hash)
-        node = site["clusters"].fetch(node_uid.split("-")[0], {}).fetch("nodes", {}).fetch(node_uid, nil)
-        next if not node
-        node["pdu"] ||= []
-        if node["pdu"].any?{|p| p["uid"] == pdu_uid && p["port"] == port_uid}
-          raise "ERROR: Node #{node_uid}.#{site_uid} has PDU #{pdu_uid} description defined both in clusters/ and pdus/ hierarchy"
-        end
-        node["pdu"].append({"uid" => pdu_uid, "port" => port_uid})
+      pdu.fetch("ports", {}).each do |port_uid, nodes_uid|
+        nodes_uid = nodes_uid["uid"] if nodes_uid.is_a?(Hash)
+        nodes_uid = [nodes_uid] if nodes_uid.is_a?(String)
+        nodes_uid.each do |node_uid|
+          node = site["clusters"].fetch(node_uid.split("-")[0], {}).fetch("nodes", {}).fetch(node_uid, nil)
+          next if not node
+          node["pdu"] ||= []
+          if node["pdu"].any?{|p| p["uid"] == pdu_uid && p["port"] == port_uid}
+            raise "ERROR: Node #{node_uid}.#{site_uid} has PDU #{pdu_uid} description defined both in clusters/ and pdus/ hierarchy"
+          end
+          node["pdu"].append({"uid" => pdu_uid, "port" => port_uid})
+        end
       end
 
       # Merge pdu information from node description in pdus/ hierachy
@@ -137,7 +140,13 @@ def add_node_pdu_mapping(h)
           raise "ERROR: Port #{port_uid} of #{pdu_uid}.#{site_uid} is defined both in PDU description and in node #{node_uid} description"
         end
         pdu["ports"] ||= {}
-        pdu["ports"][port_uid] = node_uid
+        if not pdu["ports"].key?(port_uid)
+          pdu["ports"][port_uid] = node_uid
+        elsif pdu["ports"].key?(port_uid) and pdu["ports"]["port_uid"].is_a?(String)
+          pdu["ports"][port_uid] = [pdu["ports"][port_uid], node_uid]
+        else
+          pdu["ports"][port_uid].append(node_uid)
+        end
       end
     end
   end
@@ -182,12 +191,15 @@ def add_wattmetre_mapping(h)
             pdu["ports"][port_num] = node_uid
 
             # Add mapping to node description under clusters/ hierarchy
-            node = site["clusters"].fetch(node_uid.split("-")[0], {}).fetch("nodes", {}).fetch(node_uid, nil)
-            node["pdu"] ||= []
-            if node["pdu"].any?{|p| p["uid"] == pdu_uid && p["port"] == port_num}
-              raise "ERROR: Node #{node_uid}.#{site_uid} has PDU #{pdu_num} description defined both in clusters/ and pdus/ hierarchy"
+            nodes_uid = node_uid.is_a?(String) ? [node_uid] : node_uid
+            nodes_uid.each do |nnode_uid|
+              node = site["clusters"].fetch(nnode_uid.split("-")[0], {}).fetch("nodes", {}).fetch(nnode_uid, nil)
+              node["pdu"] ||= []
+              if node["pdu"].any?{|p| p["uid"] == pdu_uid && p["port"] == port_num}
+                raise "ERROR: Node #{nnode_uid}.#{site_uid} has PDU #{pdu_num} description defined both in clusters/ and pdus/ hierarchy"
+              end
+              node["pdu"].append({"uid" => pdu_uid, "port" => port_num, "kind" => "wattmetre-only"})
             end
-            node["pdu"].append({"uid" => pdu_uid, "port" => port_num, "kind" => "wattmetre-only"})
           end
         end
       end
@@ -665,6 +677,10 @@ def add_pdu_metrics(h)
       # remove any PDU metrics defined in cluster
       cluster['metrics'] = cluster.fetch('metrics', []).reject {|m| m['name'] =~ /(wattmetre_power_watt|pdu_outlet_power_watt)/ }
 
+      # Do not add metric to cluster if PDU/wattmetre port is connected to several nodes at a time (shared PSU case)
+      nodes_pdu_ports = cluster['nodes'].select{|_, v| v['status'] != 'retired'}.each_value.map{|node| node["pdu"]}.flatten
+      next if nodes_pdu_ports.uniq.length != nodes_pdu_ports.length # nodes pdu_ports has duplicate, meaning the a port is shared by several nodes
+
       # get the list of "wattmetre-only" used by the cluster
       cluster_wm = cluster['nodes'].each_value.map{|node| node.fetch('pdu', [])}.flatten.select{|p| p.fetch('kind', '') == 'wattmetre-only'}.map{|p| p['uid']}.uniq
 
-- 
GitLab


From ae0cf63f6299e6cc6d02970c479046424efd9a0b Mon Sep 17 00:00:00 2001
From: Simon Delamare <simon.delamare@ens-lyon.fr>
Date: Mon, 12 May 2025 16:28:54 +0200
Subject: [PATCH 2/2] [lille] Add chuc PDU/wattmetre mapping

---
 .../lille/clusters/chuc/nodes/chuc-1.json     |  56 ++++++
 .../lille/clusters/chuc/nodes/chuc-2.json     |  56 ++++++
 .../lille/clusters/chuc/nodes/chuc-3.json     |  56 ++++++
 .../lille/clusters/chuc/nodes/chuc-4.json     |  56 ++++++
 .../lille/clusters/chuc/nodes/chuc-5.json     |  56 ++++++
 .../lille/clusters/chuc/nodes/chuc-6.json     |  56 ++++++
 .../lille/clusters/chuc/nodes/chuc-7.json     |  56 ++++++
 .../lille/clusters/chuc/nodes/chuc-8.json     |  56 ++++++
 data/grid5000/sites/lille/pdus/pdu-c4-1.json  |  22 +-
 data/grid5000/sites/lille/pdus/pdu-c4-2.json  |  30 ++-
 data/grid5000/sites/lille/pdus/pdu-c5-1.json  |  20 ++
 data/grid5000/sites/lille/pdus/pdu-c5-2.json  |  20 ++
 data/grid5000/sites/lille/pdus/pdu-c6-1.json  |  20 ++
 data/grid5000/sites/lille/pdus/pdu-c6-2.json  |  20 ++
 .../sites/lille/pdus/wattmetrev3-1.json       |  96 +++++++++
 input/grid5000/sites/lille/pdus.yaml          | 190 +++++++++++++++++-
 lib/refrepo/valid/homogeneity.rb              |   4 +
 17 files changed, 867 insertions(+), 3 deletions(-)
 create mode 100644 data/grid5000/sites/lille/pdus/pdu-c5-1.json
 create mode 100644 data/grid5000/sites/lille/pdus/pdu-c5-2.json
 create mode 100644 data/grid5000/sites/lille/pdus/pdu-c6-1.json
 create mode 100644 data/grid5000/sites/lille/pdus/pdu-c6-2.json

diff --git a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-1.json b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-1.json
index 7b9f4053b85..17d351a6f7a 100644
--- a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-1.json
+++ b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-1.json
@@ -298,6 +298,62 @@
     "pstate_governor": "performance",
     "turboboost_enabled": true
   },
+  "pdu": [
+    {
+      "port": 28,
+      "uid": "pdu-c6-1"
+    },
+    {
+      "port": 35,
+      "uid": "pdu-c6-1"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c6-1"
+    },
+    {
+      "port": 28,
+      "uid": "pdu-c6-2"
+    },
+    {
+      "port": 35,
+      "uid": "pdu-c6-2"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c6-2"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 18,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 19,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 20,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 21,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 22,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 23,
+      "uid": "wattmetrev3-1"
+    }
+  ],
   "performance": {
     "core_flops": 41600000000,
     "node_flops": 1331200000000
diff --git a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-2.json b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-2.json
index db5b7dfc5e9..a9c439e7002 100644
--- a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-2.json
+++ b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-2.json
@@ -298,6 +298,62 @@
     "pstate_governor": "performance",
     "turboboost_enabled": true
   },
+  "pdu": [
+    {
+      "port": 28,
+      "uid": "pdu-c6-1"
+    },
+    {
+      "port": 35,
+      "uid": "pdu-c6-1"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c6-1"
+    },
+    {
+      "port": 28,
+      "uid": "pdu-c6-2"
+    },
+    {
+      "port": 35,
+      "uid": "pdu-c6-2"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c6-2"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 18,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 19,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 20,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 21,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 22,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 23,
+      "uid": "wattmetrev3-1"
+    }
+  ],
   "performance": {
     "core_flops": 41600000000,
     "node_flops": 1331200000000
diff --git a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-3.json b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-3.json
index fdcc4d2ea50..20cc9eff876 100644
--- a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-3.json
+++ b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-3.json
@@ -298,6 +298,62 @@
     "pstate_governor": "performance",
     "turboboost_enabled": true
   },
+  "pdu": [
+    {
+      "port": 28,
+      "uid": "pdu-c5-1"
+    },
+    {
+      "port": 35,
+      "uid": "pdu-c5-1"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c5-1"
+    },
+    {
+      "port": 28,
+      "uid": "pdu-c5-2"
+    },
+    {
+      "port": 35,
+      "uid": "pdu-c5-2"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c5-2"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 12,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 13,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 14,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 15,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 16,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 17,
+      "uid": "wattmetrev3-1"
+    }
+  ],
   "performance": {
     "core_flops": 41600000000,
     "node_flops": 1331200000000
diff --git a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-4.json b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-4.json
index 2d5cd248a0a..1f8ed67208c 100644
--- a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-4.json
+++ b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-4.json
@@ -298,6 +298,62 @@
     "pstate_governor": "performance",
     "turboboost_enabled": true
   },
+  "pdu": [
+    {
+      "port": 28,
+      "uid": "pdu-c5-1"
+    },
+    {
+      "port": 35,
+      "uid": "pdu-c5-1"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c5-1"
+    },
+    {
+      "port": 28,
+      "uid": "pdu-c5-2"
+    },
+    {
+      "port": 35,
+      "uid": "pdu-c5-2"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c5-2"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 12,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 13,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 14,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 15,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 16,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 17,
+      "uid": "wattmetrev3-1"
+    }
+  ],
   "performance": {
     "core_flops": 41600000000,
     "node_flops": 1331200000000
diff --git a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-5.json b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-5.json
index a85d6054601..d674240afa8 100644
--- a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-5.json
+++ b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-5.json
@@ -298,6 +298,62 @@
     "pstate_governor": "performance",
     "turboboost_enabled": true
   },
+  "pdu": [
+    {
+      "port": 28,
+      "uid": "pdu-c4-1"
+    },
+    {
+      "port": 30,
+      "uid": "pdu-c4-1"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c4-1"
+    },
+    {
+      "port": 28,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "port": 30,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 24,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 25,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 26,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 27,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 28,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 29,
+      "uid": "wattmetrev3-1"
+    }
+  ],
   "performance": {
     "core_flops": 41600000000,
     "node_flops": 1331200000000
diff --git a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-6.json b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-6.json
index 4ddb161edd8..2baf3f14ee1 100644
--- a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-6.json
+++ b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-6.json
@@ -298,6 +298,62 @@
     "pstate_governor": "performance",
     "turboboost_enabled": true
   },
+  "pdu": [
+    {
+      "port": 28,
+      "uid": "pdu-c4-1"
+    },
+    {
+      "port": 30,
+      "uid": "pdu-c4-1"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c4-1"
+    },
+    {
+      "port": 28,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "port": 30,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "port": 42,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 24,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 25,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 26,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 27,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 28,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 29,
+      "uid": "wattmetrev3-1"
+    }
+  ],
   "performance": {
     "core_flops": 41600000000,
     "node_flops": 1331200000000
diff --git a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-7.json b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-7.json
index 323feb9d2cd..1d0955021eb 100644
--- a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-7.json
+++ b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-7.json
@@ -298,6 +298,62 @@
     "pstate_governor": "performance",
     "turboboost_enabled": true
   },
+  "pdu": [
+    {
+      "port": 2,
+      "uid": "pdu-c4-1"
+    },
+    {
+      "port": 14,
+      "uid": "pdu-c4-1"
+    },
+    {
+      "port": 2,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "port": 14,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "port": 15,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "port": 16,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 30,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 31,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 32,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 33,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 34,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 35,
+      "uid": "wattmetrev3-1"
+    }
+  ],
   "performance": {
     "core_flops": 41600000000,
     "node_flops": 1331200000000
diff --git a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-8.json b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-8.json
index b28853064ee..d50e5275b03 100644
--- a/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-8.json
+++ b/data/grid5000/sites/lille/clusters/chuc/nodes/chuc-8.json
@@ -298,6 +298,62 @@
     "pstate_governor": "performance",
     "turboboost_enabled": true
   },
+  "pdu": [
+    {
+      "port": 2,
+      "uid": "pdu-c4-1"
+    },
+    {
+      "port": 14,
+      "uid": "pdu-c4-1"
+    },
+    {
+      "port": 2,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "port": 14,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "port": 15,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "port": 16,
+      "uid": "pdu-c4-2"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 30,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 31,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 32,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 33,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 34,
+      "uid": "wattmetrev3-1"
+    },
+    {
+      "kind": "wattmetre-only",
+      "port": 35,
+      "uid": "wattmetrev3-1"
+    }
+  ],
   "performance": {
     "core_flops": 41600000000,
     "node_flops": 1331200000000
diff --git a/data/grid5000/sites/lille/pdus/pdu-c4-1.json b/data/grid5000/sites/lille/pdus/pdu-c4-1.json
index 9c24f1e905f..819b1fc76cd 100644
--- a/data/grid5000/sites/lille/pdus/pdu-c4-1.json
+++ b/data/grid5000/sites/lille/pdus/pdu-c4-1.json
@@ -1,11 +1,31 @@
 {
   "model": "Unknown",
   "ports": {
+    "14": [
+      "chuc-7",
+      "chuc-8"
+    ],
     "17": "chirop-3",
+    "2": [
+      "chuc-7",
+      "chuc-8"
+    ],
     "22": "chirop-2",
+    "28": [
+      "chuc-5",
+      "chuc-6"
+    ],
+    "30": [
+      "chuc-5",
+      "chuc-6"
+    ],
     "34": "chirop-1",
     "35": "chirop-4",
-    "40": "chirop-5"
+    "40": "chirop-5",
+    "42": [
+      "chuc-5",
+      "chuc-6"
+    ]
   },
   "type": "pdu",
   "uid": "pdu-c4-1",
diff --git a/data/grid5000/sites/lille/pdus/pdu-c4-2.json b/data/grid5000/sites/lille/pdus/pdu-c4-2.json
index 86f22d77401..3bd8962d47a 100644
--- a/data/grid5000/sites/lille/pdus/pdu-c4-2.json
+++ b/data/grid5000/sites/lille/pdus/pdu-c4-2.json
@@ -1,11 +1,39 @@
 {
   "model": "Unknown",
   "ports": {
+    "14": [
+      "chuc-7",
+      "chuc-8"
+    ],
+    "15": [
+      "chuc-7",
+      "chuc-8"
+    ],
+    "16": [
+      "chuc-7",
+      "chuc-8"
+    ],
     "17": "chirop-3",
+    "2": [
+      "chuc-7",
+      "chuc-8"
+    ],
     "22": "chirop-2",
+    "28": [
+      "chuc-5",
+      "chuc-6"
+    ],
+    "30": [
+      "chuc-5",
+      "chuc-6"
+    ],
     "34": "chirop-1",
     "35": "chirop-4",
-    "40": "chirop-5"
+    "40": "chirop-5",
+    "42": [
+      "chuc-5",
+      "chuc-6"
+    ]
   },
   "type": "pdu",
   "uid": "pdu-c4-2",
diff --git a/data/grid5000/sites/lille/pdus/pdu-c5-1.json b/data/grid5000/sites/lille/pdus/pdu-c5-1.json
new file mode 100644
index 00000000000..f806c8ed338
--- /dev/null
+++ b/data/grid5000/sites/lille/pdus/pdu-c5-1.json
@@ -0,0 +1,20 @@
+{
+  "model": "Unknown",
+  "ports": {
+    "28": [
+      "chuc-3",
+      "chuc-4"
+    ],
+    "35": [
+      "chuc-3",
+      "chuc-4"
+    ],
+    "42": [
+      "chuc-3",
+      "chuc-4"
+    ]
+  },
+  "type": "pdu",
+  "uid": "pdu-c5-1",
+  "vendor": "Unknown"
+}
\ No newline at end of file
diff --git a/data/grid5000/sites/lille/pdus/pdu-c5-2.json b/data/grid5000/sites/lille/pdus/pdu-c5-2.json
new file mode 100644
index 00000000000..5819caeb4e9
--- /dev/null
+++ b/data/grid5000/sites/lille/pdus/pdu-c5-2.json
@@ -0,0 +1,20 @@
+{
+  "model": "Unknown",
+  "ports": {
+    "28": [
+      "chuc-3",
+      "chuc-4"
+    ],
+    "35": [
+      "chuc-3",
+      "chuc-4"
+    ],
+    "42": [
+      "chuc-3",
+      "chuc-4"
+    ]
+  },
+  "type": "pdu",
+  "uid": "pdu-c5-2",
+  "vendor": "Unknown"
+}
\ No newline at end of file
diff --git a/data/grid5000/sites/lille/pdus/pdu-c6-1.json b/data/grid5000/sites/lille/pdus/pdu-c6-1.json
new file mode 100644
index 00000000000..05d1789dbb4
--- /dev/null
+++ b/data/grid5000/sites/lille/pdus/pdu-c6-1.json
@@ -0,0 +1,20 @@
+{
+  "model": "Unknown",
+  "ports": {
+    "28": [
+      "chuc-1",
+      "chuc-2"
+    ],
+    "35": [
+      "chuc-1",
+      "chuc-2"
+    ],
+    "42": [
+      "chuc-1",
+      "chuc-2"
+    ]
+  },
+  "type": "pdu",
+  "uid": "pdu-c6-1",
+  "vendor": "Unknown"
+}
\ No newline at end of file
diff --git a/data/grid5000/sites/lille/pdus/pdu-c6-2.json b/data/grid5000/sites/lille/pdus/pdu-c6-2.json
new file mode 100644
index 00000000000..efe7c5d241f
--- /dev/null
+++ b/data/grid5000/sites/lille/pdus/pdu-c6-2.json
@@ -0,0 +1,20 @@
+{
+  "model": "Unknown",
+  "ports": {
+    "28": [
+      "chuc-1",
+      "chuc-2"
+    ],
+    "35": [
+      "chuc-1",
+      "chuc-2"
+    ],
+    "42": [
+      "chuc-1",
+      "chuc-2"
+    ]
+  },
+  "type": "pdu",
+  "uid": "pdu-c6-2",
+  "vendor": "Unknown"
+}
\ No newline at end of file
diff --git a/data/grid5000/sites/lille/pdus/wattmetrev3-1.json b/data/grid5000/sites/lille/pdus/wattmetrev3-1.json
index 1825db9f00e..691f79fc88b 100644
--- a/data/grid5000/sites/lille/pdus/wattmetrev3-1.json
+++ b/data/grid5000/sites/lille/pdus/wattmetrev3-1.json
@@ -18,8 +18,104 @@
     "1": "chirop-1",
     "10": "chirop-3",
     "11": "chirop-3",
+    "12": [
+      "chuc-3",
+      "chuc-4"
+    ],
+    "13": [
+      "chuc-3",
+      "chuc-4"
+    ],
+    "14": [
+      "chuc-3",
+      "chuc-4"
+    ],
+    "15": [
+      "chuc-3",
+      "chuc-4"
+    ],
+    "16": [
+      "chuc-3",
+      "chuc-4"
+    ],
+    "17": [
+      "chuc-3",
+      "chuc-4"
+    ],
+    "18": [
+      "chuc-1",
+      "chuc-2"
+    ],
+    "19": [
+      "chuc-1",
+      "chuc-2"
+    ],
     "2": "chirop-2",
+    "20": [
+      "chuc-1",
+      "chuc-2"
+    ],
+    "21": [
+      "chuc-1",
+      "chuc-2"
+    ],
+    "22": [
+      "chuc-1",
+      "chuc-2"
+    ],
+    "23": [
+      "chuc-1",
+      "chuc-2"
+    ],
+    "24": [
+      "chuc-5",
+      "chuc-6"
+    ],
+    "25": [
+      "chuc-5",
+      "chuc-6"
+    ],
+    "26": [
+      "chuc-5",
+      "chuc-6"
+    ],
+    "27": [
+      "chuc-5",
+      "chuc-6"
+    ],
+    "28": [
+      "chuc-5",
+      "chuc-6"
+    ],
+    "29": [
+      "chuc-5",
+      "chuc-6"
+    ],
     "3": "chirop-2",
+    "30": [
+      "chuc-7",
+      "chuc-8"
+    ],
+    "31": [
+      "chuc-7",
+      "chuc-8"
+    ],
+    "32": [
+      "chuc-7",
+      "chuc-8"
+    ],
+    "33": [
+      "chuc-7",
+      "chuc-8"
+    ],
+    "34": [
+      "chuc-7",
+      "chuc-8"
+    ],
+    "35": [
+      "chuc-7",
+      "chuc-8"
+    ],
     "6": "chirop-5",
     "7": "chirop-5",
     "8": "chirop-4",
diff --git a/input/grid5000/sites/lille/pdus.yaml b/input/grid5000/sites/lille/pdus.yaml
index f9112a8b820..d382bbb9e6f 100644
--- a/input/grid5000/sites/lille/pdus.yaml
+++ b/input/grid5000/sites/lille/pdus.yaml
@@ -61,6 +61,20 @@ pdus:
     vendor: Unknown
     model: Unknown
     ports:
+     2:
+        uid: [chuc-7, chuc-8]
+        wattmetre: wattmetrev3-1
+        module: '04000618'
+        channel: 4
+        phase: 1
+        phase_inverted: false
+     14:
+        uid: [chuc-7, chuc-8]
+        wattmetre: wattmetrev3-1
+        module: '04000618'
+        channel: 1
+        phase: 2
+        phase_inverted: false
      17:
         uid: chirop-3
         wattmetre: wattmetrev3-1
@@ -75,6 +89,20 @@ pdus:
         channel: 3
         phase: 1
         phase_inverted: false
+     28:
+        uid: [chuc-5, chuc-6]
+        wattmetre: wattmetrev3-1
+        module: '04000617'
+        channel: 5
+        phase: 1
+        phase_inverted: false
+     30:
+        uid: [chuc-5, chuc-6]
+        wattmetre: wattmetrev3-1
+        module: '04000617'
+        channel: 3
+        phase: 2
+        phase_inverted: false
      34:
         uid: chirop-1
         wattmetre: wattmetrev3-1
@@ -96,11 +124,46 @@ pdus:
         channel: 1
         phase: 3
         phase_inverted: false
-  
+     42:
+        uid: [chuc-5, chuc-6]
+        wattmetre: wattmetrev3-1
+        module: '04000617'
+        channel: 1
+        phase: 3
+        phase_inverted: false
+
   pdu-c4-2:
     vendor: Unknown
     model: Unknown
     ports:
+     2:
+        uid: [chuc-7, chuc-8]
+        wattmetre: wattmetrev3-1
+        module: '04000618'
+        channel: 2
+        phase: 1
+        phase_inverted: false
+     14:
+        uid: [chuc-7, chuc-8]
+        wattmetre: wattmetrev3-1
+        module: '04000618'
+        channel: 3
+        phase: 2
+        phase_inverted: false
+     15:
+        uid: [chuc-7, chuc-8]
+        wattmetre: wattmetrev3-1
+        module: '04000618'
+        channel: 5
+        phase: 3
+        phase_inverted: false
+     16:
+        uid: [chuc-7, chuc-8]
+        wattmetre: wattmetrev3-1
+        module: '04000618'
+        channel: 6
+        phase: 3
+        phase_inverted: false
      17:
         uid: chirop-3
         wattmetre: wattmetrev3-1
@@ -115,6 +178,20 @@ pdus:
         channel: 4
         phase: 1
         phase_inverted: false
+     28:
+        uid: [chuc-5, chuc-6]
+        wattmetre: wattmetrev3-1
+        module: '04000617'
+        channel: 6
+        phase: 1
+        phase_inverted: false
+     30:
+        uid: [chuc-5, chuc-6]
+        wattmetre: wattmetrev3-1
+        module: '04000617'
+        channel: 4
+        phase: 2
+        phase_inverted: false
      34:
         uid: chirop-1
         wattmetre: wattmetrev3-1
@@ -136,3 +213,114 @@ pdus:
         channel: 2
         phase: 2
         phase_inverted: false
+     42:
+        uid: [chuc-5, chuc-6]
+        wattmetre: wattmetrev3-1
+        module: '04000617'
+        channel: 2
+        phase: 3
+        phase_inverted: false
+
+  pdu-c5-1:
+    vendor: Unknown
+    model: Unknown
+    ports:
+     28:
+        uid: [chuc-3, chuc-4]
+        wattmetre: wattmetrev3-1
+        module: '04000615'
+        channel: 6
+        phase: 1
+        phase_inverted: false
+     35:
+        uid: [chuc-3, chuc-4]
+        wattmetre: wattmetrev3-1
+        module: '04000615'
+        channel: 3
+        phase: 2
+        phase_inverted: false
+     42:
+        uid: [chuc-3, chuc-4]
+        wattmetre: wattmetrev3-1
+        module: '04000615'
+        channel: 1
+        phase: 3
+        phase_inverted: false
+
+  pdu-c5-2:
+    vendor: Unknown
+    model: Unknown
+    ports:
+     28:
+        uid: [chuc-3, chuc-4]
+        wattmetre: wattmetrev3-1
+        module: '04000615'
+        channel: 5
+        phase: 1
+        phase_inverted: false
+     35:
+        uid: [chuc-3, chuc-4]
+        wattmetre: wattmetrev3-1
+        module: '04000615'
+        channel: 4
+        phase: 2
+        phase_inverted: false
+     42:
+        uid: [chuc-3, chuc-4]
+        wattmetre: wattmetrev3-1
+        module: '04000615'
+        channel: 2
+        phase: 3
+        phase_inverted: false
+
+  pdu-c6-1:
+    vendor: Unknown
+    model: Unknown
+    ports:
+     28:
+        uid: [chuc-1, chuc-2]
+        wattmetre: wattmetrev3-1
+        module: '04000616'
+        channel: 5
+        phase: 1
+        phase_inverted: false
+     35:
+        uid: [chuc-1, chuc-2]
+        wattmetre: wattmetrev3-1
+        module: '04000616'
+        channel: 3
+        phase: 2
+        phase_inverted: false
+     42:
+        uid: [chuc-1, chuc-2]
+        wattmetre: wattmetrev3-1
+        module: '04000616'
+        channel: 1
+        phase: 3
+        phase_inverted: false
+
+  pdu-c6-2:
+    vendor: Unknown
+    model: Unknown
+    ports:
+     28:
+        uid: [chuc-1, chuc-2]
+        wattmetre: wattmetrev3-1
+        module: '04000616'
+        channel: 6
+        phase: 1
+        phase_inverted: false
+     35:
+        uid: [chuc-1, chuc-2]
+        wattmetre: wattmetrev3-1
+        module: '04000616'
+        channel: 4
+        phase: 2
+        phase_inverted: false
+     42:
+        uid: [chuc-1, chuc-2]
+        wattmetre: wattmetrev3-1
+        module: '04000616'
+        channel: 2
+        phase: 3
+        phase_inverted: false
diff --git a/lib/refrepo/valid/homogeneity.rb b/lib/refrepo/valid/homogeneity.rb
index aa23189868d..ac45d61e9ea 100644
--- a/lib/refrepo/valid/homogeneity.rb
+++ b/lib/refrepo/valid/homogeneity.rb
@@ -41,6 +41,10 @@ def global_ignore_keys
     ~pdu[5]
     ~pdu[6]
     ~pdu[7]
+    ~pdu[8]
+    ~pdu[9]
+    ~pdu[10]
+    ~pdu[11]
 
     ~nodeset
 
-- 
GitLab