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

VMware: vmware_inventory contrib testing #42879

Merged
merged 2 commits into from
Sep 22, 2018
Merged

Conversation

Akasurde
Copy link
Member

SUMMARY

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

test/integration/targets/vmware_inventory/aliases
test/integration/targets/vmware_inventory/runme.sh
test/integration/targets/vmware_inventory/test_vmware_inventory.yml

ANSIBLE VERSION
2.7-devel

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. support:community This issue/PR relates to code supported by the Ansible community. test This PR relates to tests. labels Jul 17, 2018
@ansibot
Copy link
Contributor

ansibot commented Jul 17, 2018

The test ansible-test sanity --test shellcheck [explain] failed with 8 errors:

test/integration/targets/vmware_inventory/runme.sh:11:4: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/vmware_inventory/runme.sh:29:9: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/vmware_inventory/runme.sh:32:8: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/vmware_inventory/runme.sh:32:25: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/vmware_inventory/runme.sh:45:13: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/vmware_inventory/runme.sh:47:12: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/vmware_inventory/runme.sh:47:32: SC2086 Double quote to prevent globbing and word splitting.
test/integration/targets/vmware_inventory/runme.sh:65:43: SC2086 Double quote to prevent globbing and word splitting.

click here for bot help

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jul 17, 2018
@ansibot ansibot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 17, 2018
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Jul 17, 2018
@ansibot ansibot removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Jul 17, 2018
@Akasurde
Copy link
Member Author

cc @mattclay

@@ -0,0 +1,4 @@
posix/ci/cloud/group1/vcenter
cloud/vcenter
skip/python3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is python 3 being skipped?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vmware_inventory.py is not supported for Python 3. Right now, we don't have any plan around supporting that.

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 25, 2018
@@ -0,0 +1,4 @@
posix/ci/cloud/group1/vcenter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new group alias is shippable/vcenter/group1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

fi
}

trap cleanup INT TERM EXIT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Register the trap before backing up the file. Otherwise a failure between the two steps won't restore the original config.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Jul 27, 2018
@mattclay
Copy link
Member

@Akasurde I'm seeing warnings in the test output. Are these supposed to be showing up?

2018-07-27 04:11:36  [WARNING]:  * Failed to parse
2018-07-27 04:11:36 /root/ansible/contrib/inventory/vmware_inventory.py with script plugin:
2018-07-27 04:11:36 Inventory script (/root/ansible/contrib/inventory/vmware_inventory.py) had an
2018-07-27 04:11:36 execution error: ERROR: This inventory script required 'pyVmomi' Python module,
2018-07-27 04:11:36 it was not able to load it

@mattclay
Copy link
Member

There are a few more as well:

2018-07-27 04:11:36  [WARNING]:  * Failed to parse
2018-07-27 04:11:36 /root/ansible/contrib/inventory/vmware_inventory.py with ini plugin:
2018-07-27 04:11:36 /root/ansible/contrib/inventory/vmware_inventory.py:14: Error parsing host
2018-07-27 04:11:36 definition '"""': No closing quotation
2018-07-27 04:11:36 
2018-07-27 04:11:36  [WARNING]: Unable to parse /root/ansible/contrib/inventory/vmware_inventory.py
2018-07-27 04:11:36 as an inventory source
2018-07-27 04:11:36 
2018-07-27 04:11:36  [WARNING]: No inventory was parsed, only implicit localhost is available
2018-07-27 04:11:36 
2018-07-27 04:11:36  [WARNING]: provided hosts list is empty, only localhost is available. Note
2018-07-27 04:11:36 that the implicit localhost does not match 'all'

See https://app.shippable.com/github/ansible/ansible/runs/76106/77/console

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 5, 2018
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 7, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Aug 16, 2018
@ansibot ansibot removed the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Sep 21, 2018
@ansibot
Copy link
Contributor

ansibot commented Sep 21, 2018

The test ansible-test sanity --test shellcheck [explain] failed with 1 error:

test/integration/targets/vmware_inventory/runme.sh:69:100: SC2016 Expressions don't expand in single quotes, use double quotes for that.

click here for bot help

@ansibot ansibot added the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Sep 21, 2018
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Sep 21, 2018
curl "http://${vcenter_host}:5000/govc_find"

# Change Python interpreter in vmware_inventory
sed -i 's/ python/ python2/' ./vmware_inventory.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#45995 will eliminate the need for hacking the shebang on the inventory script and will allow collection of code coverage. Creating an inventory wrapper script will take care of things then:

#!/usr/bin/env bash
python.py "../../../../contrib/inventory/vmware_inventory.py" "$@"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.

@Akasurde Akasurde merged commit 905acd7 into ansible:devel Sep 22, 2018
@Akasurde Akasurde deleted the i26030 branch September 22, 2018 06:38
@dagwieers dagwieers added the vmware VMware community label Feb 10, 2019
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 cloud feature This issue/PR relates to a feature request. support:community This issue/PR relates to code supported by the Ansible community. test This PR relates to tests. vmware VMware community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants