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

rhel-system-role.storage is not idempotent

    • rhel-system-roles-1.79.0-0.2.el9
    • None
    • Moderate
    • ZStream
    • 4
    • rhel-sst-system-roles
    • 2
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • System Roles Sprint 1, System Roles Sprint 2, System Roles Sprint 3, System Roles Sprint 4
    • Approved Blocker
    • Bug Fix
    • Hide
      .The `storage` RHEL system role is idempotent again

      The `storage` RHEL system role in some cases incorrectly calculated sizes of existing devices. Consequently, running the same playbook again without changes caused the role to attempt resizing the device that already had the correct size, instead of passing without errors. With this update, the size calculation was fixed. As a result, the role now correctly identifies that the device already has the size specified by the playbook and does not try to resize it.
      Show
      .The `storage` RHEL system role is idempotent again The `storage` RHEL system role in some cases incorrectly calculated sizes of existing devices. Consequently, running the same playbook again without changes caused the role to attempt resizing the device that already had the correct size, instead of passing without errors. With this update, the size calculation was fixed. As a result, the role now correctly identifies that the device already has the size specified by the playbook and does not try to resize it.
    • Done
    • All
    • None

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

      Configure System logical volumes using the Storage role from rhel_system_roles collection.

      Please provide the package NVR for which bug is seen:

      redhat.rhel_system_roles    1.22.0

      How reproducible:

      always

      Steps to reproduce

      1. install redhat.rhel_system.roles collection
      2. apply following playbook twice
      ---
      - name: Demo RHEL System Role Storage
        hosts: client-1.example.com
        collections:
          - redhat.rhel_system_roles  tasks:
          - name: Apply Storage role
            ansible.builtin.import_role:
              name: redhat.rhel_system_roles.storage
            vars:
              storage_pools:
                - name: "vg01"
                  disks: 
                    - vdb
                  volumes:
                    - name: "lv01"
                      size: "1.2 GiB"
                      fs_type: "xfs"
                      mount_point: "/mount/lv01"
                      state: present
       

      Expected results

      The playbook should be executed without any error and modifications, when there is nothing required

      Actual results

      TASK [redhat.rhel_system_roles.storage : Manage the pools and volumes to match the specified state] *************************************************************************************************************************************************
      fatal: [client-1.example.com]: FAILED! => {"actions": [], "changed": false, "crypts": [], "leaves": [], "mounts": [], "msg": "volume 'lv01' cannot be resized to '1.2 GiB'", "packages": [], "pools": [], "volumes": []}

              vtrefny@redhat.com Vojtěch Trefný
              rhn-support-sfroemer Steffen Frömer
              Vojtěch Trefný Vojtěch Trefný
              David Jez David Jez
              Jaroslav Klech Jaroslav Klech
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: