Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-70700

[RHEL10] Could not find luks2 key size in verify-pool-member-encryption.yml

    • rhel-system-roles-1.93.0-0.1.el10
    • No
    • Low
    • rhel-sst-system-roles
    • 0
    • Dev ack
    • False
    • Hide

      None

      Show
      None
    • No
    • Red Hat Enterprise Linux
    • None
    • Pass
    • Automated
    • Release Note Not Required
    • None

      What were you trying to do that didn't work?

      What is the impact of this issue to you?

      Please provide the package NVR for which the bug is seen:

      How reproducible is this bug?:

      Steps to reproduce

      1.  
      2.  
      3.  

      Expected results

      Actual results

      test task

              - name: Create an encrypted lvm pool using a key file and key size
                include_role:
                  name: linux-system-roles.storage
                vars:
                  storage_pools:
                    - name: foo
                      type: lvm
                      disks: "{{ unused_disks }}"
                      encryption: true
                      encryption_key: "{{ storage_test_key_file.path }}"
                      encryption_luks_version: luks2
                      encryption_key_size: 512
                      volumes:
                        - name: test2
                          mount_point: "{{ mount_location }}"
                          size: 4g
       

       

       

      TASK [Check LUKS key size] *****************************************************************************************************
      fatal: [localhost]: FAILED! => {
          "assertion": "_storage_test_luks_dump.stdout is search(__pattern, multiline=True)",
          "changed": false,
          "evaluated_to": false,
          "msg": "Wrong key size for pool foo"
      }TASK [Remove the key file] ***************************************************************************************************************
      ok: [localhost]PLAY RECAP *******************************************************************************************************************************
      localhost                  : ok=108  changed=11   unreachable=0    failed=1    skipped=72   rescued=2    ignored=0     
      - name: Check LUKS key size
        assert:
          that: _storage_test_luks_dump.stdout is search(__pattern, multiline=True)
          msg: Wrong key size for pool {{ storage_test_pool.name }}
        vars:
          __pattern: >-
            ^MK bits:\s+{{ storage_test_pool.encryption_key_size }}$
        when:
          - storage_test_pool.state == 'present'
          - storage_test_pool.encryption
          - storage_test_pool.encryption_key_size
       

      looks the task just support luks1

       

      add  key size check for luks2

       - name: Check LUKS key size for luks1
        assert:
          that: _storage_test_luks_dump.stdout is search(__pattern, multiline=True)
          msg: Wrong key size for pool {{ storage_test_pool.name }}
        vars:
          __pattern: >-
            ^MK bits:\s+{{ storage_test_pool.encryption_key_size }}$
        when:
          - storage_test_pool.state == 'present'
          - storage_test_pool.encryption
          - storage_test_pool.encryption_key_size
          - storage_test_pool.encryption_luks_version == 'luks1'
      
      - name: Check LUKS key size for luks2
        assert:
          that: _storage_test_luks_dump.stdout is search(__pattern, multiline=True)
          msg: Wrong key size for pool {{ storage_test_pool.name }}
        vars:
          __pattern: >-
            Key:.*{{ storage_test_pool.encryption_key_size  }}\s+bits$
        when:
          - storage_test_pool.state == 'present'
          - storage_test_pool.encryption
          - storage_test_pool.encryption_key_size
          - storage_test_pool.encryption_luks_version == 'luks2'

       

              rmeggins@redhat.com Richard Megginson
              guazhang@redhat.com Guangwu Zhang
              Richard Megginson Richard Megginson
              Guangwu Zhang Guangwu Zhang
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: