Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ome_diagnostics does not respect check_mode #345

Closed
MallocArray opened this issue Nov 29, 2021 · 0 comments · Fixed by #391
Closed

ome_diagnostics does not respect check_mode #345

MallocArray opened this issue Nov 29, 2021 · 0 comments · Fixed by #391
Labels
area/ome-modular OME-Modular modules type/feature A feature. This label is applied to a feature issues.
Milestone

Comments

@MallocArray
Copy link

MallocArray commented Nov 29, 2021

Summary

When using the ome_diagnostics module and running the playbook in check mode, the full task is ran, logs are extracted, when the expectation is that in check_mode it would not actually run the task the results in files being created. Same happens with log_type: application or support_assist_collection

Component Name

ome_diagnostics

Ansible Version
ansible 2.10.11
  config file = /home/username/Ansible/ansible.cfg
  configured module search path = ['/home/username/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.8 (default, Aug 12 2021, 07:06:15) [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)]
iDRAC or OpenManage Enterprise version

OME-M version 1.30.00

Steps to Reproduce

Run a playbook that extracts logs from an MX7000 chassis group to a CIFS location with check mode enabled at the command prompt.

Playbook used
  tasks:
    - name: Extract Logs from MX7000 chassis to CIFS share location
      # https://github.com/dell/dellemc-openmanage-ansible-modules/blob/collections/docs/modules/ome_diagnostics.rst
      dellemc.openmanage.ome_diagnostics:
        hostname: "{{ inventory_hostname }}"
        username: "{{ dell_ome_username }}"
        password: "{{ dell_ome_password }}"
        share_type: CIFS
        share_address: "{{ cifs_server_ip }}"
        share_name: "{{ cifs_share }}{{ cifs_path | default(omit) }}"
        share_user: "{{ cifs_username }}"
        share_password: "{{ cifs_password }}"
        log_type: application
        mask_sensitive_info: false
        job_wait: true

Expected Results

The expectation is that it will check if the task would run, but not actually run the log extract or at least not generate the output files in the destination folder. At a minimum it should just skip the task if check_mode is used and the module is unable to check, but there is a parameter to test the connection, so check mode could run only the test connection to ensure the destination path is valid and the parameters are valid but not actually run the extract log task.

Actual Results

Instead, the entire task runs in full, creating files and taking 8-15 minutes.

Community Note

  • Please vote on this issue by adding a 👍 reaction
    to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions,
    they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@MallocArray MallocArray changed the title ome_diagnostics application logs does not respect check_mode ome_diagnostics does not respect check_mode Nov 29, 2021
@anupamaloke anupamaloke added the type/bug Something isn't working label Nov 30, 2021
@anupamaloke anupamaloke added type/feature-request New feature or request and removed type/bug Something isn't working labels Dec 1, 2021
@anupamaloke anupamaloke moved this from To do to In progress in OpenManage Ansible Collection Feb 28, 2022
@anupamaloke anupamaloke added this to the v5.2.0 milestone Feb 28, 2022
@anupamaloke anupamaloke added area/ome-modular OME-Modular modules type/feature A feature. This label is applied to a feature issues. and removed type/feature-request New feature or request labels Mar 9, 2022
@sachin-apa sachin-apa linked a pull request Mar 28, 2022 that will close this issue
@anupamaloke anupamaloke moved this from In progress to Done in OpenManage Ansible Collection Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ome-modular OME-Modular modules type/feature A feature. This label is applied to a feature issues.
Development

Successfully merging a pull request may close this issue.

2 participants