TWSD-1308 - Virtual and real services should not delete if these are attached to any policies.
Review Request #1342 — Created Jan. 29, 2026 and submitted
| Information | |
|---|---|
| shuinvy | |
| APV10 | |
| rel_apv_10_7 | |
| TWSD-1308 | |
| Reviewers | |
| kevin.poh, mingji, peteryeh | |
Forbidden deleting Real Service or Virtual Service if it bind any policy or Real Service Group
The Jira ticket is:
https://arraynetworks.atlassian.net/browse/TWSD-1308The scenario is:
1. If a RS bind any Real Service Group, then it cannot be deleted
2. If a RS bind any Policy(Static Policy), then it cannot be deleted
3. If a RS doesn't bind any Real Service Group or Policy, it can be deleted
4. If a VS bind any Policy, then it cannot be deleted.
5. If a VS doesn't bind any Policy, then it can be deleted.I have checked both CLI and WebUI,
you can see attachment for reference.For WebUI changes,
the deletion API of RS isdelete_rs_custom, it doesn't handle case if CLI return error message,
so I fix it.For CLI changes,
I wrote some function inslb_rs_group_kern.cto check:
1. Is a RS bind any Static Policy(It is relationship between a VS and RS, so we should find VS to check the static policy member)
2. Is a VS bind any policy. I found there is structure with the information:slb_vs_t, so I use it and check it by different type of policy.
3. Is a RS bind any Real Service Group: We can get real_id by its name fromslb_real_name_to_id, then checkslb_memfor Real Service Group member.
Then I checked RS inno_slb_real_kernwhether it is bind Real Service Group or Static Policy and show error message if so.
I also added new error code inproxy_errs.h
To use the function inslb_rs_group_kern.c, I added it to the header file:slb_kern.h,
Then check VS in the functionno_slb_virtual_generic_kernofslb_vs_policy_kern.cfile.
If the VS bind to any policy,
it will stop continue and show error message.
