community.vmware icon indicating copy to clipboard operation
community.vmware copied to clipboard

vmware_datastore - New Module to Change Settings on the Datastore

Open Nina2244 opened this issue 2 years ago • 13 comments

SUMMARY

New Module to Change Settings on the Datastore. Settings like:

  • storage_io_control
  • congestion_threshold_percentage
  • congestion_threshold_manual
  • statistic_collection
ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

vmware_datastore.py

ADDITIONAL INFORMATION

Nina2244 avatar Jul 05 '22 11:07 Nina2244

Build failed.

:heavy_check_mark: ansible-tox-linters SUCCESS in 3m 57s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 15s :x: ansible-test-sanity-docker-devel FAILURE in 11m 04s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 8m 03s :x: ansible-test-sanity-docker-stable-2.11 FAILURE in 9m 40s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 8m 23s :heavy_check_mark: ansible-test-units-community-vmware-python27 SUCCESS in 6m 13s :heavy_check_mark: ansible-test-units-community-vmware-python36 SUCCESS in 5m 41s :heavy_check_mark: ansible-test-units-community-vmware-python37 SUCCESS in 5m 51s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 4m 50s :x: ansible-test-cloud-integration-vcenter7_only-python36-stable211 RETRY_LIMIT in 1h 00m 52s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_2esxi-python36-stable211 SUCCESS in 18m 30s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-python36-stable211_1_of_2 SUCCESS in 1h 02m 16s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-python36-stable211_2_of_2 SUCCESS in 42m 49s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 26s

@mariolenz do you understand the Problem why build-ansible-collection fails?

Nina2244 avatar Jul 06 '22 12:07 Nina2244

@mariolenz do you understand the Problem why build-ansible-collection fails?

I think when trying to create the docs, tox has a problem with this:

description:
    - # TODO

I looks to me like tox also interprets the # as comment and therefor tries to render an empty string which fails. Try:

description:
    - TODO

I hope this helps.

mariolenz avatar Jul 07 '22 08:07 mariolenz

@Nina2244 It looks like build-ansible-collection succeeds now, but the sanity tests are failing. I'm not sure if this is the only problem, but the datacenter parameter is documented as required, but according to the argument_spec it is not.

mariolenz avatar Jul 07 '22 14:07 mariolenz

Build failed.

:heavy_check_mark: ansible-tox-linters SUCCESS in 4m 01s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 14s :x: ansible-test-sanity-docker-devel FAILURE in 9m 50s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 10m 38s :x: ansible-test-sanity-docker-stable-2.11 FAILURE in 10m 57s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 9m 11s :heavy_check_mark: ansible-test-units-community-vmware-python27 SUCCESS in 7m 03s :heavy_check_mark: ansible-test-units-community-vmware-python36 SUCCESS in 5m 12s :heavy_check_mark: ansible-test-units-community-vmware-python37 SUCCESS in 5m 26s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 5m 24s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-python36-stable211 SUCCESS in 23m 37s :x: ansible-test-cloud-integration-vcenter7_2esxi-python36-stable211 RETRY_LIMIT in 1h 00m 54s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-python36-stable211_1_of_2 SUCCESS in 1h 01m 19s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-python36-stable211_2_of_2 SUCCESS in 41m 47s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 25s

There seems to be a problem with the documentation for congestion_threshold_percentage:

2022-07-07 16:03:27.373710 | controller | ERROR! Unable to retrieve documentation from 'community.vmware.vmware_datastore' due to: Expected string in description of congestion_threshold_percentage at index 3, got <class 'ansible.parsing.yaml.objects.AnsibleMapping'>. Expected string in description of congestion_threshold_percentage at index 3, got <class 'ansible.parsing.yaml.objects.AnsibleMapping'>[0m

and

2022-07-07 16:05:04.496975 | controller | ERROR: Found 1 validate-modules issue(s) which need to be resolved:
2022-07-07 16:05:04.497102 | controller | ERROR: plugins/modules/vmware_datastore.py:0:0: invalid-documentation: DOCUMENTATION.options.congestion_threshold_percentage.description: Must be a string for dictionary value @ data['options']

But I don't see it yet.

mariolenz avatar Jul 08 '22 11:07 mariolenz

recheck

goneri avatar Jul 26 '22 19:07 goneri

Build failed.

:heavy_check_mark: ansible-tox-linters SUCCESS in 4m 02s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 03s :x: ansible-test-sanity-docker-devel FAILURE in 8m 21s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 8m 29s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 8m 33s :x: ansible-test-sanity-docker-stable-2.13 FAILURE in 8m 57s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 5m 25s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-stable212 SUCCESS in 18m 39s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_2esxi-stable212 SUCCESS in 17m 02s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 SUCCESS in 40m 25s :x: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 RETRY_LIMIT in 1h 09m 52s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 25s

recheck

goneri avatar Aug 05 '22 19:08 goneri

Build failed.

:heavy_check_mark: ansible-tox-linters SUCCESS in 4m 00s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 07s :x: ansible-test-sanity-docker-devel FAILURE in 9m 23s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 7m 47s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 8m 46s :x: ansible-test-sanity-docker-stable-2.13 FAILURE in 8m 10s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 4m 22s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-stable212 SUCCESS in 17m 32s :x: ansible-test-cloud-integration-vcenter7_2esxi-stable212 RETRY_LIMIT in 1h 00m 56s :x: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 FAILURE in 24m 56s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 SUCCESS in 57m 11s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 01s

Build failed.

:heavy_check_mark: ansible-tox-linters SUCCESS in 4m 14s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 11s :x: ansible-test-sanity-docker-devel FAILURE in 10m 11s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 9m 48s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 8m 30s :x: ansible-test-sanity-docker-stable-2.13 FAILURE in 7m 24s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 4m 32s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_only-stable212 SUCCESS in 17m 56s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_2esxi-stable212 SUCCESS in 18m 27s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 SUCCESS in 56m 39s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 SUCCESS in 44m 18s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 06s

Build failed.

:heavy_check_mark: ansible-tox-linters SUCCESS in 5m 23s :heavy_check_mark: build-ansible-collection SUCCESS in 4m 13s :x: ansible-test-sanity-docker-devel FAILURE in 8m 55s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 9m 38s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 9m 59s :x: ansible-test-sanity-docker-stable-2.13 FAILURE in 8m 52s :heavy_check_mark: ansible-test-units-community-vmware-python38 SUCCESS in 6m 39s :x: ansible-test-cloud-integration-vcenter7_only-stable212 RETRY_LIMIT in 1h 00m 15s :x: ansible-test-cloud-integration-vcenter7_2esxi-stable212 FAILURE in 22m 13s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_1_of_2 SUCCESS in 1h 02m 04s :heavy_check_mark: ansible-test-cloud-integration-vcenter7_1esxi-stable212_2_of_2 SUCCESS in 43m 40s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 44s

@Nina2244 This PR is somehow weird. I'm sure I've fixed the last sanity test, but the CI keeps failing. Now what's interesting, when I check out the PR I don't see my changes:

# mkdir -p  github/ansible_collections/community/vmware
# git clone https://github.com/ansible-collections/community.vmware.git github/ansible_collections/community/vmware
# cd github/ansible_collections/community/vmware
# git fetch origin pull/1381/head:patch-12
# git checkout patch-12
# git log | head -n 7
commit c78cd91c3d31ecce2304ba6fc7b568a403d3f161
Author: Nina2244 <[email protected]>
Date:   Thu Jul 7 17:50:24 2022 +0200

    Update vmware_datastore.py

commit a9bfd910a030d371e029cb76abfcb4718d340dbc
# 

The last commit I see is your last one from July. I guess our CI has the same problem. I don't have any idea why, it looks OK here in the PR. And also in your repository.

If it's OK for you, I would close this PR and we track your new module in #1475. It's your code plus my changes to fix the sanity issue plus some minor docs changes (my commits from Sep 22, 2022).

mariolenz avatar Sep 26 '22 13:09 mariolenz

Yes I think thats ok :)

Nina2244 avatar Sep 26 '22 13:09 Nina2244

@Nina2244 Great! Then we'll track your changes in #1475.

I'll try to define one or two integration tests and merge when I have them.

mariolenz avatar Sep 26 '22 16:09 mariolenz