Added support for removing unused port groups on VMWare#4701
Conversation
|
@blueorangutan package |
|
@Spaceman1984 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2735 |
|
@blueorangutan test centos7 vmware-67u3 |
|
@Spaceman1984 a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
Trillian test result (tid-3570)
|
|
@blueorangutan package |
|
@Spaceman1984 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. [S] |
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 88 |
|
code looks good @Spaceman1984 , but i don't see how it is being called. Am I missing something? |
| "Vmware script timeout for ova packaging process", true, ConfigKey.Scope.Global, 1000); | ||
|
|
||
| static final ConfigKey<Boolean> s_vmwareCleanupPortGroups = new ConfigKey<Boolean>("Advanced", Boolean.class, "vmware.cleanup.port.groups", "false", | ||
| "Remove unused port groups. WARNING: When set to true, native VMware HA might not work.", true, ConfigKey.Scope.Global); |
There was a problem hiding this comment.
@Spaceman1984 If my understanding is correct, cleanup port groups happens only on the network cleanup only and the old uncleaned port groups of other networks (when this setting is false) still remains. If so, Can you mention in the setting description that port groups cleanup happens on the network cleanup for that network only.
Is it possible to clean old port groups of other networks through any garbage collector, when this setting is true.
There was a problem hiding this comment.
To my knowledge, this setting is not used through garbage collection, it is checked when an instance is destroyed. I'm not sure if there is some kind of garbage collection that would destroy a VR, if there is, then I suppose this will also apply.
|
Hi @Spaceman1984 there are some open questions on this PR, can you please advise? |
Sure, @nvazquez |
This setting is checked when an instance is destroyed @DaanHoogland. If the instance being destroyed is the last instance (including VR) using a specific network, the port group will be removed. |
|
@blueorangutan test centos7 vmware-67u3 |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
Trillian test result (tid-1380)
|
|
@Spaceman1984 Tested this manually with multiple vSphere hosts (and Standard vSwitches), I noticed the port groups are removed only on one host where the last destroyed VM (usually VR) resides. Make sure the unused port groups are removed from all the hosts. Also, verify this with Distributed vSwitch. Thanks. |
|
@sureshanaparti @andrijapanicsb @borisstoyanov @vladimirpetrov @nvazquez are we lgtm to merge this? |
|
@Spaceman1984 could you check @sureshanaparti's last comment? |
no @rhtyd |
5cc8fb6 to
e0a3f40
Compare
|
@blueorangutan package |
|
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Addressed the changes for cleaning up of the unused port groups on all the hosts. Tested this manually with multiple vSphere hosts, network configured through standard vSwitches on them. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 997 |
|
@blueorangutan test centos7 vmware-67u3 |
|
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
Trillian test result (tid-1763)
|
|
@Spaceman1984, can you look at the conflicts here |
|
Conflicts fixed @blueorangutan package |
|
@nvazquez a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1044 |
|
@blueorangutan test centos7 vmware-67u3 |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
|
Trillian test result (tid-1817)
|
Description
This PR adds a global setting (vmware.cleanup.port.groups) to toggle removing unused port groups from VMware hypervisor hosts.
Fixes: #3779
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
This has been manually tested, with the below steps: