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

Unable to delete vswitch using vmware_vswitch #36009

Closed
umrikar opened this issue Feb 11, 2018 · 8 comments
Closed

Unable to delete vswitch using vmware_vswitch #36009

umrikar opened this issue Feb 11, 2018 · 8 comments
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. cloud has_pr This issue has an associated PR. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community

Comments

@umrikar
Copy link

umrikar commented Feb 11, 2018

ISSUE TYPE
  • Bug Report
COMPONENT NAME

vmware_vswitch

ANSIBLE VERSION
ansible 2.5.0a1
CONFIGURATION
OS / ENVIRONMENT
N/A
SUMMARY
STEPS TO REPRODUCE
---
- hosts: 127.0.0.1
  connection: local
  tasks:
    - name: Delete a VMware vSwitch
      action:
        module: vmware_vswitch
        hostname: 10.243.1.43
        username: root
        password: PASSW0RD
        switch: vSwitch0
        nics: vmnic0
        mtu: 1500
        validate_certs: no
        state: absent


EXPECTED RESULTS
Expect vswitch vSwitch0 to be deleted from ESXI host
ACTUAL RESULTS
The full traceback is:
  File "/tmp/ansible_u4aPP7/ansible_module_vmware_vswitch.py", line 152, in process_state
    vswitch_states[self.state][self.check_vswitch_configuration()]()
  File "/tmp/ansible_u4aPP7/ansible_module_vmware_vswitch.py", line 191, in state_destroy_vswitch
    self.host_system.configManager.networkSystem.UpdateNetworkConfig(config, "modify")
  File "/usr/local/lib/python2.7/dist-packages/pyVmomi/VmomiSupport.py", line 580, in <lambda>
    self.f(*(self.args + (obj,) + args), **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pyVmomi/VmomiSupport.py", line 386, in _InvokeMethod
    return self._stub.InvokeMethod(self, info, args)
  File "/usr/local/lib/python2.7/dist-packages/pyVmomi/SoapAdapter.py", line 1366, in InvokeMethod
    raise obj # pylint: disable-msg=E0702

fatal: [127.0.0.1]: FAILED! => {
    "changed": false, 
    "failed": true, 
    "invocation": {
        "module_args": {
            "esxi_hostname": null, 
            "hostname": "10.243.1.43", 
            "mtu": 1500, 
            "nics": [
                "vmnic0"
            ], 
            "number_of_ports": 128, 
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", 
            "port": 443, 
            "state": "absent", 
            "switch": "vSwitch0", 
            "username": "root", 
            "validate_certs": false
        }
    }, 
    "msg": "A specified parameter was not correct: "
}

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bug_report needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 11, 2018
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Feb 11, 2018
@Akasurde
Copy link
Member

Akasurde commented Feb 11, 2018

@umrikar Thanks for reporting this issue. I am sure that you are not using latest Ansible 2.5 version. As API UpdateNetworkConfig is not used in latest version which caused this error. Please check this commit for more information.

needs_info

@Akasurde Akasurde changed the title unable to delete vswitch Unable to delete vswitch using vmware_vswitch Feb 11, 2018
@Akasurde Akasurde added the vmware VMware community label Feb 11, 2018
@Akasurde
Copy link
Member

!component=lib/ansible/modules/cloud/vmware/vmware_vswitch.py

@ansibot
Copy link
Contributor

ansibot commented Feb 11, 2018

@ansibot ansibot added cloud module This issue/PR relates to a module. needs_info This issue requires further information. Please answer any outstanding questions. support:community This issue/PR relates to code supported by the Ansible community. and removed support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Feb 11, 2018
@umrikar
Copy link
Author

umrikar commented Feb 11, 2018

@Akasurde i am using ansible 2.5.0a1

@ansibot ansibot removed the needs_info This issue requires further information. Please answer any outstanding questions. label Feb 11, 2018
@Akasurde
Copy link
Member

Akasurde commented Feb 12, 2018

Could you please try latest 2.5.0b1 or latest devel branch ?

needs_info

@ansibot ansibot added the needs_info This issue requires further information. Please answer any outstanding questions. label Feb 12, 2018
@Akasurde
Copy link
Member

resolved_by_pr #36091

@Akasurde Akasurde added the has_pr This issue has an associated PR. label Feb 13, 2018
@umrikar
Copy link
Author

umrikar commented Feb 27, 2018

resolved with patch #36091

@Akasurde
Copy link
Member

@umrikar Thanks for reporting.

@ansibot ansibot removed the needs_info This issue requires further information. Please answer any outstanding questions. label Feb 27, 2018
@umrikar umrikar closed this as completed Feb 27, 2018
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 7, 2018
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. cloud has_pr This issue has an associated PR. module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community
Projects
None yet
Development

No branches or pull requests

3 participants