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

Create podman secret when skip_existing=True and it does not exist

    • rhel-system-roles-1.79.0-0.2.el9
    • None
    • Moderate
    • ZStream
    • 531d3f9b464f2cf6c0d6a519b306ea82e7e46f50
    • 3
    • rhel-sst-system-roles
    • 1
    • Dev ack
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • System Roles Sprint 2, System Roles Sprint 3, System Roles Sprint 4
    • Approved Blocker
    • Bug Fix
    • Hide
      .The `podman` RHEL system role creates new secrets if necessary

      The `podman` RHEL system role incorrectly did not check whether a secret with the same name already existed if you used the `skip_existing: true` option of the `podman_secrets` role variable. Consequently, the role did not create any new secret if using that option. This update fixes the `podman` RHEL system role to check for existing secrets if you use `skip_existing: true`. As a result, the role properly creates new secrets if they do not exist. Conversely, it does not create a secret of the same name if you use `skip_existing: true`.
      Show
      .The `podman` RHEL system role creates new secrets if necessary The `podman` RHEL system role incorrectly did not check whether a secret with the same name already existed if you used the `skip_existing: true` option of the `podman_secrets` role variable. Consequently, the role did not create any new secret if using that option. This update fixes the `podman` RHEL system role to check for existing secrets if you use `skip_existing: true`. As a result, the role properly creates new secrets if they do not exist. Conversely, it does not create a secret of the same name if you use `skip_existing: true`.
    • Done
    • None

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

      Creating podman secrets using the rhel-system-roles.noarch version: 1.23.0-2.21.el9 is not successful. The secrets are not created.

      How reproducible:

      Steps to reproduce

      1. Run the following playbook: 
        ---      
        - name: Troubleshoot Podman Secrets
          hosts: localhost
          tasks: 
            - name: Deploy Podman Secrets
              ansible.builtin.include_role:
                name: rhel-system-roles.podman
              vars:
                podman_run_as_user: "{{ username }}"
                podman_run_as_group: "{{ groupname }}"
                podman_secrets:
                  - name: mysql-root-password-container
                    state: present
                    skip_existing: true
                    data: "mysql_root_password"
                  - name: mysql-user-password-container
                    state: present
                    skip_existing: true
                    data: "mysql_user_password" 

      Expected results

      The two secrets `mysql-root-password-container` and `mysql-root-password-container` should exists.

      Actual results

      The two podman screts were not created.

      Information on troubleshooting and fix

      Information regarding timeline

      I would like to showcase the usage of rhel-system-roles.podman in a customer facing workshop on June 27th. To have the fix included in the rhel-system-roles package for RHEL 9.4 woudl be awesome. This way i would be able to do a flawless demo with released software.

      In case it is not possible to ship the update by June 25 I could do the workshop with a downgraded version of the rhel-system-roles package that works.
       

              rmeggins@redhat.com Richard Megginson
              rhn-support-jkastnin Joerg Kastning
              Richard Megginson Richard Megginson
              David Jez David Jez
              Jaroslav Klech Jaroslav Klech
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: