Skip to content

prevent nic removal on out of bounds router stop - #8371

Merged
DaanHoogland merged 15 commits into
apache:4.19from
shapeblue:destroyNicOnVRDestroy
Feb 16, 2024
Merged

DaanHoogland merged 15 commits into
apache:4.19from
shapeblue:destroyNicOnVRDestroy

Conversation

@DaanHoogland

@DaanHoogland DaanHoogland commented Dec 18, 2023

Copy link
Copy Markdown
Contributor

Description

This PR...

Fixes: #8284

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@codecov

codecov Bot commented Dec 18, 2023

Copy link
Copy Markdown

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (1411da1) 30.88% compared to head (c51d5ce) 30.94%.
Report is 88 commits behind head on 4.19.

Files Patch % Lines
...ork/router/VirtualNetworkApplianceManagerImpl.java 42.85% 9 Missing and 3 partials ⚠️
...ava/com/cloud/network/guru/ControlNetworkGuru.java 14.28% 6 Missing ⚠️
...tack/engine/orchestration/NetworkOrchestrator.java 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19    #8371      +/-   ##
============================================
+ Coverage     30.88%   30.94%   +0.06%     
- Complexity    34079    34232     +153     
============================================
  Files          5341     5347       +6     
  Lines        374861   375574     +713     
  Branches      54518    54629     +111     
============================================
+ Hits         115769   116220     +451     
- Misses       243825   244046     +221     
- Partials      15267    15308      +41     
Flag Coverage Δ
simulator-marvin-tests 24.83% <67.21%> (+0.01%) ⬆️
uitests 4.39% <ø> (-0.01%) ⬇️
unit-tests 16.55% <40.98%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8081

@weizhouapache

Copy link
Copy Markdown
Member

This code snippet seems not related to private ip release.

@DaanHoogland DaanHoogland changed the title move nic removal from shutdown to expunge prevent nic removal on out of bounds router stop Dec 19, 2023
@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8087

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8091

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8098

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8104

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title needs to be updated

  • ip release, not nic removal
  • it is not related to out-of-band stop. currently control ip is released even if vr is stopped by cloudstack api. If VR is started out of band, but the previous used / released control ip is allocated to other VRs, there will be some issues.

Comment thread server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManager.java Outdated
Comment thread server/src/main/java/com/cloud/network/router/VirtualNetworkApplianceManager.java Outdated
Comment thread server/src/main/java/com/cloud/network/guru/ControlNetworkGuru.java Outdated
@DaanHoogland

Copy link
Copy Markdown
Contributor Author

just noticed that the client vlan is being removed as well. I think this must be fixed as well @weizhouapache @andrijapanicsb .

@weizhouapache

weizhouapache commented Dec 21, 2023

Copy link
Copy Markdown
Member

just noticed that the client vlan is being removed as well. I think this must be fixed as well @weizhouapache @andrijapanicsb .

@DaanHoogland
I think the vlan is released when isolated network is being shutdown (not during stopping of VR)
the whole process of the issue we faced is

  • (due to whatever reason) number of active nics is 0 (incorrect)
  • ACS detects the active nics is 0 and tries to shutdown the network as it is not persistent
  • stop the VR as part of network shutdown. (the control IP is VR is released)
  • release the vlan

if only VR is stopped, the vlan is not released.

@weizhouapache

Copy link
Copy Markdown
Member

just noticed that the client vlan is being removed as well. I think this must be fixed as well @weizhouapache @andrijapanicsb .

@DaanHoogland I think the vlan is released when isolated network is being shutdown (not during stopping of VR) the whole process of the issue we faced is

  • (due to whatever reason) number of active nics is 0 (incorrect)
  • ACS detects the active nics is 0 and tries to shutdown the network as it is not persistent
  • stop the VR as part of network shutdown. (the control IP is VR is released)
  • release the vlan

if only VR is stopped, the vlan is not released.

ignore this. what @DaanHoogland mentioned is, the vlan of VR nics is set to empty, when VR is stopped (by CloudStack API/UI or OOB)

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

ignore this. what @DaanHoogland mentioned is, the vlan of VR nics is set to empty, when VR is stopped (by CloudStack API/UI or OOB)

thanks @weizhouapache , we also discussed and agreed that this does need fixing (in the scope of this fix). The more general issue (might become) handling of OOB actions in genenral and OOB DRS specifically.

I will wrap/clean up the PR

@yadvr

yadvr commented Feb 13, 2024

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8637

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

Comment thread core/src/main/java/com/cloud/serializer/GsonHelper.java
Comment thread core/src/main/java/com/cloud/serializer/GsonHelper.java
Comment thread server/src/main/java/com/cloud/network/guru/ControlNetworkGuru.java Outdated
Comment thread server/src/main/java/com/cloud/network/guru/ControlNetworkGuru.java Outdated
@DaanHoogland

Copy link
Copy Markdown
Contributor Author

have a look @weizhouapache . should implement what you suggested.

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-9190)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 49755 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8371-t9190-kvm-centos7.zip
Smoke tests completed. 128 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 3678.17 test_kubernetes_clusters.py

@yadvr

yadvr commented Feb 15, 2024

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@rohityadavcloud a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaanHoogland
overall lgtm

left some comments

Comment thread core/src/main/java/com/cloud/serializer/GsonHelper.java
@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8667

DaanHoogland and others added 2 commits February 15, 2024 12:51
Co-authored-by: Wei Zhou <weizhou@apache.org>
@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 8668

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-9237)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43139 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8371-t9237-kvm-centos7.zip
Smoke tests completed. 129 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@borisstoyanov borisstoyanov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, code review

@DaanHoogland
DaanHoogland merged commit a0e592e into apache:4.19 Feb 16, 2024
@DaanHoogland
DaanHoogland deleted the destroyNicOnVRDestroy branch February 16, 2024 13:33
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Feb 23, 2024
Co-authored-by: Vishesh <vishesh92@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Better handling for outband power operations on VR

7 participants