Skip to content

Shared Network Firewall (Security groups) in Advanced zone without security groups - #9415

Merged
DaanHoogland merged 10 commits into
apache:mainfrom
shapeblue:sg-for-shared-network
Sep 5, 2024
Merged

Shared Network Firewall (Security groups) in Advanced zone without security groups#9415
DaanHoogland merged 10 commits into
apache:mainfrom
shapeblue:sg-for-shared-network

Conversation

@vishesh92

@vishesh92vishesh92 commented Jul 18, 2024

Copy link
Copy Markdown
Member

Doc PR: apache/cloudstack-documentation#422

Description

This PR allows creating shared networks with Security Groups in a Zone with securitygroupenabled set to false. This flag is used to prevent creation of isolated networks as of now to maintain backward compatibility for Zone with Security Groups.

To enable SG, enable the SecurityGroupProvider for Guest physical network. After this change, you will be able to create a shared network with Security Groups.

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
  • test (unit or integration test code)

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?

@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 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.

@codecov

codecovBot commented Jul 18, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 12.24490% with 43 lines in your changes missing coverage. Please review.

Project coverage is 15.57%. Comparing base (47a6b70) to head (5637b12).
Report is 92 commits behind head on main.

Files with missing linesPatch %Lines
.../main/java/com/cloud/network/NetworkModelImpl.java12.00%19 Missing and 3 partials ⚠️
...g/apache/cloudstack/api/response/ZoneResponse.java0.00%9 Missing ⚠️
...er/actionworkers/KubernetesClusterStartWorker.java0.00%5 Missing ⚠️
...isor/xenserver/discoverer/XcpServerDiscoverer.java0.00%2 Missing ⚠️
...loudstack/api/command/user/vm/AddIpToVmNicCmd.java0.00%1 Missing ⚠️
...tack/api/command/user/vm/RemoveIpFromVmNicCmd.java0.00%1 Missing ⚠️
...KubernetesClusterResourceModifierActionWorker.java0.00%1 Missing ⚠️
.../src/main/java/com/cloud/vm/UserVmManagerImpl.java50.00%1 Missing ⚠️
...stack/storage/template/VnfTemplateManagerImpl.java0.00%0 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #9415 +/- ##
============================================
+ Coverage 15.53% 15.57% +0.03% - Complexity 11988 12049 +61 
============================================
Files 5496 5505 +9 Lines 481450 482703 +1253 Branches 60738 62405 +1667 ============================================
+ Hits 74809 75187 +378 - Misses 398364 399209 +845 - Partials 8277 8307 +30 
FlagCoverage Δ
uitests4.16% <ø> (-0.02%)⬇️
unittests16.35% <12.24%> (+0.04%)⬆️

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.

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
Member

@blueorangutan test alma9 kvm-alma9

@blueorangutan

Copy link
Copy Markdown

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

@vishesh92vishesh92 changed the title Enable Security groups for Shared networks in Advanced zone without security groupsWIP - Enable Security groups for Shared networks in Advanced zone without security groupsJul 18, 2024
@vishesh92

Copy link
Copy Markdown
MemberAuthor

@weizhouapache This PR is still in progress and needs more work. All the simulators tests have also failed. Add WIP in the PR title for now.

@vishesh92
vishesh92force-pushed the sg-for-shared-network branch 2 times, most recently from a7c3f8e to 84895aaCompareJuly 19, 2024 06:30
@apacheapache deleted a comment from blueorangutanJul 19, 2024
@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 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 10409

@github-actions

Copy link
Copy Markdown

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

@apacheapache deleted a comment from blueorangutanSep 2, 2024
@apacheapache deleted a comment from blueorangutanSep 2, 2024
@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 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]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10904

@vishesh92

Copy link
Copy Markdown
MemberAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 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]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 10931

@DaanHooglandDaanHoogland 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.

clgtm, needs testing

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test keepEnv

@blueorangutan

Copy link
Copy Markdown

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

@yadvr
yadvr marked this pull request as ready for review September 4, 2024 09:56
@blueorangutan

Copy link
Copy Markdown

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

TestResultTime (s)Test File

@yadvryadvr changed the title Enable Security groups for Shared networks in Advanced zone without security groupsShared Network Firewall (Security groups) in Advanced zone without security groupsSep 5, 2024
@DaanHoogland

Copy link
Copy Markdown
Contributor

basic functional test done:
secgroup network can be created.
old style shared network and isolated networks can still be created.

@kiranchavalakiranchavala 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.

LGTM,

Tested the security groups for shared network on a Cloudstack advanced zone +kvm

The SG Rules are applied successfully to the vm's and I was also able to change the security groups associated to the vm from the UI

@DaanHoogland
DaanHoogland merged commit 72d0546 into apache:mainSep 5, 2024
@DaanHoogland
DaanHoogland deleted the sg-for-shared-network branch September 5, 2024 08:35
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Sep 6, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@vishesh92@blueorangutan@weizhouapache@DaanHoogland@kiranchavala@yadvr