Browse Source

Handle case change for dmidecode >= 3.1 in Ceph templates

Forces lowercase matching of user provided node data with dmidecode
output.

Change-Id: I844a2f7660dff5feda8397706671ac0efd37949f
Co-Authored-By: Francesco Pantano <fpantano@redhat.com>
Closes-Bug: 1814070
(cherry picked from commit c01d9d8475)
tags/9.3.0
Giulio Fidente 3 months ago
parent
commit
e9c6cf1004
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      docker/services/ceph-ansible/ceph-base.yaml

+ 5
- 2
docker/services/ceph-ansible/ceph-base.yaml View File

@@ -419,7 +419,10 @@ outputs:
419 419
             - name: generate nodes-uuid data file
420 420
               copy:
421 421
                 dest: "{{playbook_dir}}/ceph-ansible/nodes_uuid_data.json"
422
-                content: {get_param: NodeDataLookup}
422
+                content:
423
+                  yaql:
424
+                    expression: dict($.data.keys().select($.toLower()).zip($.data.values()))
425
+                    data: {get_param: NodeDataLookup}
423 426
             - name: generate nodes-uuid playbook
424 427
               copy:
425 428
                 dest: "{{playbook_dir}}/ceph-ansible/nodes_uuid_playbook.yml"
@@ -431,7 +434,7 @@ outputs:
431 434
                         set_fact:
432 435
                           nodes_data: "{% raw %}{{ lookup('file','./nodes_uuid_data.json') | from_json  }}{% endraw %}"
433 436
                       - name: register machine id
434
-                        command: dmidecode -s system-uuid
437
+                        command: dmidecode -s system-uuid | tr A-F a-f
435 438
                         register: machine_uuid
436 439
                         # NOTE(tonyb): 0 == no error, 1 == -EPERM or bad data and 2 == Command not found
437 440
                         # 1 and 2 aren't great but shouldn't cause the deploy to fail.  If we're using

Loading…
Cancel
Save