Skip to content

[BUG]: port number gets filtered from dellemc.unity.info output #45

Open
@JanSkalny

Description

@JanSkalny

Describe the bug
Having no_log on port parameter in ./plugins/module_utils/storage/dell/utils.py:118 causes module.exit_json to scramble volume names and thus make dellemc.unity.info registered variable unusable for some volumes.

Quick fix is to remove no_log from port attribute, since leaking port number does not leak any sensitive information. Obfuscating server port is not a security control.

To Reproduce
Steps to reproduce the behavior:

  1. create volume with string "443" in it's name
  2. run dellemc.unity.info task and register outputs into test_var
  3. variable is scrambled when subsequently used in "with_items: "{{ test_var.Volumes | map(attribute='name') | list }}"

Expected behavior
test_var.Volumes should contain list of volums with real names

Logs
If applicable, submit logs or stack traces from the affected services

System Information (please complete the following information):

  • OS/Version: MacOS 14.x.x
  • Ansible Version 9.1.0
  • Python Version 3.11

Additional context
I'm running a playbook that first lists existing volumes and then creates ones that are missing, as a method to speed up execution.
However for some volumes, where name contains default port number (443), subsequent tasks are executed, since listing of volumes scrambled name with stars *****.

Example playbook

  - name: list existing volumes
    dellemc.unity.info:
      unispherehost: "{{ inventory_hostname }}"
      username: "{{ ansible_user }}"
      password: "{{ ansible_password }}"
      gather_subset:
      - vol
    register: storage_facts

  - set_fact:
      storage_defined_volumes: "{{ storage_volumes | map(attribute='name') | list }}"
      storage_existing_volumes: "{{ storage_facts.Volumes | map(attribute='name') | list }}"
  - set_fact:
      storage_missing_volumes: "{{ storage_defined_volumes | difference(storage_existing_volumes) | list }}"
      storage_orphanted_volumes: "{{ storage_existing_volumes | difference(storage_defined_volumes) | list }}"

  - debug:
      msg: "{{ storage_missing_volumes }}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions