Configure lag on existing DVS
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 763
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
While configuring lag in passive mode on a existing DVS switch, method not found exception was caught, even though the method has been defined in the class.
Exception details:
(vmodl.fault.MethodNotFound) {
dynamicType = ,
dynamicProperty = (vmodl.DynamicProperty) [],
msg = ,
faultCause = ,
faultMessage = (vmodl.LocalizableMessage) [],
receiver = 'vim.dvs.VmwareDistributedVirtualSwitch:dvs-73',
method = 'UpdateLacpGroupConfig'
}
Reproduction steps
def create_lag(si, dvsName, lagName, numberOfUplinks):
try:
dvs_vim_type = [vim.DistributedVirtualSwitch]
vds = get_obj(si,dvs_vim_type,dvsName)
except Exception as e:
print(e)
return None
#create lacp in passive mode
try:
lacpGroupSpec_0 = vim.dvs.VmwareDistributedVirtualSwitch.LacpGroupSpec()
lacpGroupSpec_0.lacpGroupConfig = vim.dvs.VmwareDistributedVirtualSwitch.LacpGroupConfig()
lacpGroupSpec_0.lacpGroupConfig.mode = 'passive'
lacpGroupSpec_0.lacpGroupConfig.ipfix = vim.dvs.VmwareDistributedVirtualSwitch.LagIpfixConfig()
lacpGroupSpec_0.lacpGroupConfig.loadbalanceAlgorithm = 'srcDestIpTcpUdpPortVlan'
lacpGroupSpec_0.lacpGroupConfig.vlan = vim.dvs.VmwareDistributedVirtualSwitch.LagVlanConfig()
lacpGroupSpec_0.lacpGroupConfig.name = 'vsan_lag'
#lacpGroupSpec_0.lacpGroupConfig.timeoutMode = 'slow'
lacpGroupSpec_0.lacpGroupConfig.uplinkNum = 2
lacpGroupSpec_0.operation = 'add'
lacpGroupSpec = [lacpGroupSpec_0]
task = vds.UpdateDVSLacpGroupConfig_Task(lacpGroupSpec)
# The attributes of lacpGroupConfig includes: 'dynamicProperty', 'dynamicType', 'ipfix', 'key', 'loadbalanceAlgorithm', 'mode', 'name', 'uplinkName', 'uplinkNum', 'uplinkPortKey', 'vlan'
# this list does not contain timeoutMode. As default value for timeout mode is slow, ignoring this for now
# TO DO : how to set the timeoutMode should be explored
state, result = wait_for_task(task)
if not state:
print(result)
exit()
return result
except Exception as e:
print(e)
return None
Obtained similar result when task = vds.UpdateLacpGroupConfig(lacpGroupSpec) was used.
Expected behavior
- Exception should have fault cause and fault message set to an appropriate value that describes the nature of the fault.
- Clear instructions of what pre-requisites needs to be set should be documented.
Additional context
Please note that the main logic of the code was generated using the developer center's code capture feature
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the create_lag reproduction and compare vds.UpdateDVSLacpGroupConfig_Task with vds.UpdateLacpGroupConfig for an existing DVS in passive mode. Investigate the reported MethodNotFound response and the prerequisites for these operations. Done means the failure is appropriately described and the required prerequisites are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100