go-bigip icon indicating copy to clipboard operation
go-bigip copied to clipboard

`ModifyVirtualServer` function `patch` instead `put`

Open rawmind0 opened this issue 6 years ago • 3 comments

Hey,

we are having some issues updating f5 bigip virtual servers on v12+, getting errors like 12/21/2018 9:33:53 AMtime="2018-12-21T15:33:53Z" level=error msg="f5 RemoveLBConfig: Error modifying virtual server: 0107028c:3: The source (::) and destination (10.3.5.143) addresses for virtual server (/Common/cos_vs_electrode_storefront_beta) must be be the same type (IPv4 or IPv6).\n".

The errors came from calling ModifyVirtualServer function https://github.com/rancher/external-lb/blob/master/providers/f5/f5_bigip.go#L196

Reading this post https://devcentral.f5.com/questions/script-to-modify-virtual-servers-default-pool, it seems that bigip API v12+ versions uses patch instead put for modifying virtual servers.

Taking a look to the code, ModifyVirtualServer function is still using put method https://github.com/scottdware/go-bigip/blob/master/ltm.go#L1818 . Are you planning to update it?? Could we contribute with a PR to address it??

Related rancher issue, https://github.com/rancher/rancher/issues/13269

Thanks....

rawmind0 avatar Jan 21 '19 21:01 rawmind0

@scottdware do you think this issue could be addressed in the near future?

alena1108 avatar Jan 23 '19 06:01 alena1108

Thanks, @rawmind0 for catching this. If you want to go ahead and submit a PR for this, I'd be more than happy to merge it. Unfortunately, I don't work with F5's a lot anymore in my new job, so my access to them is extremely limited for testing purposes, etc.

scottdware avatar Jan 23 '19 15:01 scottdware

@scottdware, submitted PR https://github.com/scottdware/go-bigip/pull/87 to solve this issue.

Tested using azure f5 bigip virtual appliance 12.1.4 and working fine.

rawmind0 avatar Jan 29 '19 20:01 rawmind0