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

Use re.search for more flexibility in selecting a datastore #1793

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

nikatbu
Copy link
Contributor

@nikatbu nikatbu commented Jul 14, 2023

SUMMARY

When finding the datastore(s) with autoselect_datastore, using re.search() provides more flexibility to match above what .find() substring matching can do.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

vmware_guest.py autoselect_datastore functionality

ADDITIONAL INFORMATION

Swapped call ds.name.find() over to using re.search() to provide regex searching ability.

- name: Create a virtual machine on given ESXi hostname
  community.vmware.vmware_guest:
[...]
    disk:
    - size_gb: 10
      type: thin
      datastore: datastore1_SSD
      autoselect_datastore: True
[...]

- name: Create a virtual machine on given ESXi hostname
  community.vmware.vmware_guest:
[...]
    disk:
    - size_gb: 10
      type: thin
      datastore: '_SSD$'
      autoselect_datastore: True
[...]

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/29b273820f654ba7b424c31c1f431c2e

✔️ ansible-tox-linters SUCCESS in 8m 44s
✔️ build-ansible-collection SUCCESS in 9m 18s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006200858 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006200859 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006200860 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006200861 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 3m 47s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 14, 2023

Hi @jillr @mariolenz I started getting merge conflicts on my other PR as community.vmware had moved on so I ended up closing that PR, refreshed everything, opened up this new PR. Looks like we are still seeing the node failures. I'll drop a note on the main thread where we have been working through this. Jill, thanks very much for continuing to poke the hosting service on getting this cleared up. I'll do occasional rechecks on this in case the node failures are transitory (I think Mario was indicating this may have been the case earlier).

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 14, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/ad77809cfc9e4791b9b68a93a0685c5c

✔️ ansible-tox-linters SUCCESS in 9m 01s
✔️ build-ansible-collection SUCCESS in 9m 31s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006201009 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006201010 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006201011 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006201012 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 3m 30s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 14, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/d8c43d27e1c34becbf564a534ec91230

✔️ ansible-tox-linters SUCCESS in 8m 32s
✔️ build-ansible-collection SUCCESS in 9m 21s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006201124 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006201125 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006201126 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006201127 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 51s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 14, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/52ec739e4d804b88ae6db3be61ab43a9

✔️ ansible-tox-linters SUCCESS in 8m 41s
✔️ build-ansible-collection SUCCESS in 9m 27s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006201183 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006201184 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006201185 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006201186 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 3m 57s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 14, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/5a3589fdbc09404590ad54f199a3e72e

✔️ ansible-tox-linters SUCCESS in 8m 41s
✔️ build-ansible-collection SUCCESS in 9m 20s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006201240 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006201241 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006201242 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006201243 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 3m 43s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 14, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/8fc8b6b57e5042e19a7df92b9f6a9bc3

✔️ ansible-tox-linters SUCCESS in 8m 45s
✔️ build-ansible-collection SUCCESS in 9m 33s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006201343 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006201344 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006201345 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006201346 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 3m 51s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 14, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/e6474484a7124e49b43b243ee7f2f451

✔️ ansible-tox-linters SUCCESS in 8m 40s
✔️ build-ansible-collection SUCCESS in 9m 24s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006201605 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006201606 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006201607 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006201608 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 17s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 14, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/0160ec685ad74b408221464c80801fa1

✔️ ansible-tox-linters SUCCESS in 8m 34s
✔️ build-ansible-collection SUCCESS in 9m 13s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006201650 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006201651 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006201652 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006201653 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 01s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 14, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/01acef758a14431aafceb7798e490df7

✔️ ansible-tox-linters SUCCESS in 8m 49s
✔️ build-ansible-collection SUCCESS in 9m 19s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006201702 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006201703 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006201704 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006201705 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 38s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 14, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/6edf8b72fb3b44f480039265cd512af1

✔️ ansible-tox-linters SUCCESS in 8m 39s
✔️ build-ansible-collection SUCCESS in 9m 30s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006201989 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006201990 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006201991 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006201992 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 33s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 17, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/3a07be5850094e518a68d72ceb4895ef

✔️ ansible-tox-linters SUCCESS in 8m 42s
✔️ build-ansible-collection SUCCESS in 9m 33s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006205906 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006205907 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006205908 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006205909 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 34s

@jillr
Copy link
Contributor

jillr commented Jul 19, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/70de76ad07174da18ed73ab2541b8c7d

✔️ ansible-tox-linters SUCCESS in 8m 34s
✔️ build-ansible-collection SUCCESS in 9m 28s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006213283 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006213284 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006213285 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006213286 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 45s

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/28e4f3bf0af744b6b53e64d7db8bac49

✔️ ansible-tox-linters SUCCESS in 8m 40s
✔️ build-ansible-collection SUCCESS in 9m 32s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006213333 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006213334 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006213335 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006213336 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 49s

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/27f240e62c7945f3adbe8a2afd35bead

✔️ ansible-tox-linters SUCCESS in 8m 35s
✔️ build-ansible-collection SUCCESS in 9m 30s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006213432 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006213433 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006213434 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006213435 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 45s

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/3022196e58ec4c168b49178d3902c3b6

✔️ ansible-tox-linters SUCCESS in 9m 02s
✔️ build-ansible-collection SUCCESS in 10m 44s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006213644 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006213645 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006213646 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 NODE_FAILURE Node request 200-0006213647 failed in 0s
✔️ ansible-galaxy-importer SUCCESS in 4m 27s

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 24, 2023

recheck

@softwarefactory-project-zuul
Copy link

@nikatbu
Copy link
Contributor Author

nikatbu commented Jul 24, 2023

recheck

@softwarefactory-project-zuul
Copy link

@nikatbu
Copy link
Contributor Author

nikatbu commented Aug 3, 2023

recheck

@softwarefactory-project-zuul
Copy link

@nikatbu
Copy link
Contributor Author

nikatbu commented Aug 9, 2023

recheck

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/b2d348d4109b41beb51d8389c2bb4b38

✔️ ansible-tox-linters SUCCESS in 8m 43s
✔️ build-ansible-collection SUCCESS in 9m 36s
ansible-test-cloud-integration-vcenter7_only-stable215 NODE_FAILURE Node request 200-0006273314 failed in 0s
ansible-test-cloud-integration-vcenter7_2esxi-stable215 NODE_FAILURE Node request 200-0006273315 failed in 0s
ansible-test-cloud-integration-vcenter7_1esxi-stable215_1_of_2 NODE_FAILURE Node request 200-0006273316 failed in 0s
✔️ ansible-test-cloud-integration-vcenter7_1esxi-stable215_2_of_2 SUCCESS in 53m 57s
✔️ ansible-galaxy-importer SUCCESS in 5m 20s

@nikatbu
Copy link
Contributor Author

nikatbu commented Oct 25, 2023

recheck

@nikatbu
Copy link
Contributor Author

nikatbu commented Oct 30, 2023

Hi @mariolenz - do you know what the "ansible/gate" check is and why it's waiting for status to be reported? Is this the next hurdle in the CICD pipeline that's a bit "funky"? Or did I miss something dumb that's non-obvious to me. :) Thanks.

@jillr
Copy link
Contributor

jillr commented Oct 30, 2023

@nikatbu The gate job is Zuul's merge job. When the PR is approved and ready to be merged it will get tagged with mergeit by the approver, which will trigger the gate pipeline which performs a series of pre-merge checks and then ultimately merges the PR. It will remain in Expected status until that tag is added - so no action needed on your part.

@nikatbu
Copy link
Contributor Author

nikatbu commented Jan 3, 2024

Hi @mariolenz what's the next step I should be doing here to get this PR approved? Is there some discussion thread I should be bringing this up on? Thanks.

@mariolenz
Copy link
Collaborator

@nikatbu TBH I'm not sure if we should merge this. Regular expressions are really a nice tool, but I'm afraid this would open a can of worms and might lead to unforeseeable problems.

@nikatbu
Copy link
Contributor Author

nikatbu commented Jan 3, 2024

Thanks @mariolenz, no worries, fair enough. Feel free to close/cancel if you think the risk of issues is not worth the benefit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants