disabling security groups cleanly #11864
-
|
In 4.20.1 (edit: KVM), is there an established non-disruptive way to disable security groups in an advanced zone for a shared network? If there's one obvious answer please don't bother with the mess below, I got a little carried away. There's a few things that don't play nice with SGs (CAPI, floating IPs), so I'm exploring how to disable the feature in-place without rebuilding the network or zone. I can just rely on other security boundaries instead. Here's what I've tried in a lab:
I also remember reading a solution to just empty out security_group.py which would work until an agent update. So that's the UX options I could imagine, and here's the blind DB surgery solution that worked:
The only reason I kept playing with powering on/off is to simulate a real world live migration to an empty host since that's one of the triggers to apply the SG rules. Unless I completely missed the beaten path, I think the updateNetwork API should be allowed to change the network offering, and also update the network service map. Then it would be up to the user to remove the security groups from the VMs. Disabling the SG Provider should also clear the SG enabled flag on the zone so system VMs can get deployed. Of course that's just one service, maybe doing this breaks netscalers catastrophically for some unexpected reason. I'm also guessing the power off to modify security groups requirement is because that's an easy trigger to fire the script, so if I remove the relevant row in security_group_vm_map and live migrate to another host after disabling everything things will probably work correctly and avoid downtime. So if I butcher the DB and live migrate a VM to an empty host, everything should work out. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
@dstoy53 , Did you create a zone with security groups or did you create a shared network with security groups in an advanced zone? In the later case you could try to add another network to the VM and then make it the default one and delete the NIC for the old one. If you want to change the offering for the shared network , it would seem to me this would be a destructive action (especially when it involves adding/removing SG) |
Beta Was this translation helpful? Give feedback.
so, you need to decide if you want only sg or sg and other types of network isolation in your zone and create it accordingly. Also keep in mind that ACS is not vi-friendly. It is usually ill advised to edit anything in the DB.