Forum Discussion
Unable to delete and create virtual server in the same transaction via iControl api
Hello What Lies Beneath!
Thanks for your response. I think you're on the right track with the profile. However, i'm not convinced that adding & removing VS in the same transaction shouldn't* work. I think one of the core motivations behind the transaction was to bridge the gap between "remove" and "add" by emulating a "update" feature since iControl does not provide atomic operations for updating numerous objects.
https://devcentral.f5.com/articles/v11-icontrol-transactions This post discusses the behavior of transaction and shows that pools are added and then removed, which highlights both failure and success "produce the same result". I can also confirm that deleting an iRule and then creating it (repeated several times) in the same transaction works flawlessly.
Having said that, I think you're right about the profile. I don't mind writing additional code if I can recreate virtual server and then add the protocol client/server profiles immediately after (it'll just have to be in the same transaction). However, the docs for create virtual server requires associated profiles to be specified in the args. In fact, if you attempt to remove the client profile, it would default to "TCP" and if you try to remove the server profile, it would default to "client profile". The reason, i believe, is that the protocol profiles are required for the virtual server to behave properly. See post on similar issue: https://devcentral.f5.com/questions/virtualserveradd_profile-cannot-set-a-new-client-protocol-profile
In the end, what I really need is a way to update a virtual server in one atomic operation or with rollback feature in order to eliminate risk of outage. If you have a workaround, even better if it is compatible with f5 v9/10, that would be awesome! Thanks!
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com