-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add conserve mode for VPC offerings #12487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12487 +/- ##
==========================================
Coverage 17.84% 17.85%
- Complexity 15980 15997 +17
==========================================
Files 5929 5930 +1
Lines 531084 531511 +427
Branches 64914 64989 +75
==========================================
+ Hits 94783 94882 +99
- Misses 425686 425999 +313
- Partials 10615 10630 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 16471 |
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 16473 |
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 16475 |
|
@blueorangutan test keepEnv |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-15239)
|
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✔️ debian ✖️ suse15. SL-JID 16547 |
sureshanaparti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 16549 |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
weizhouapache
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- can we create VPC offering with conserve mode via API and UI ?
- can you add smoke tests ?
- source nat can be used by vpc tiers
- other public Ips too
engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql
Outdated
Show resolved
Hide resolved
engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql
Outdated
Show resolved
Hide resolved
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16553 |
| // (except for VPCs with conserve mode = true) | ||
| if ((!isNewRuleOnVpcNetwork || !isVpcConserveModeEnabled) | ||
| && rule.getNetworkId() != newRule.getNetworkId() && rule.getState() != State.Revoke) { | ||
| String errMsg = String.format("New rule is for a different network than what's specified in rule %s", rule.getXid()); | ||
| if (isNewRuleOnVpcNetwork) { | ||
| errMsg += String.format(" - VPC id=%s is not using conserve mode", newRuleNetwork.getVpcId()); | ||
| } | ||
| throw new NetworkRuleConflictException(errMsg); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new method
| NetworkVO newRuleNetwork = _networkDao.findById(newRule.getNetworkId()); | ||
| if (newRuleNetwork == null) { | ||
| throw new InvalidParameterValueException("Unable to create firewall rule as cannot find network by id=" + newRule.getNetworkId()); | ||
| } | ||
| boolean isNewRuleOnVpcNetwork = newRuleNetwork.getVpcId() != null; | ||
| boolean isVpcConserveModeEnabled = false; | ||
| if (isNewRuleOnVpcNetwork) { | ||
| VpcOfferingVO vpcOffering = vpcOfferingDao.findById(newRuleNetwork.getVpcId()); | ||
| isVpcConserveModeEnabled = vpcOffering != null && vpcOffering.isConserveMode(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new method(s)?
RosiKyu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR needs some fixes:
Issues Identified:
- The
conservemodeparameter is not being passed from API command to the service layer (value not saved to DB) - The
conservemodefield is not being returned in the API response (VpcOfferingResponse)
TC1: Create VPC Offering with Conserve Mode = true
Objective: Verify VPC offering can be created with conserve mode enabled and the field is properly stored and returned via API.
Test Steps:
- Create VPC offering with
conservemode=trueparameter - Verify the offering via
list vpcofferingsAPI - Verify the value is stored correctly in the database
Expected Result:
- VPC offering is created successfully
- API response includes
conservemode: true - Database shows
conserve_mode = 1
Actual Result:
- VPC offering created successfully with ID
b9b783b2-b1fb-4588-b383-ff36cc9e54ab - BUG: API response does NOT include
conservemodefield at all - BUG: Database shows
conserve_mode = 0instead of1despite passingconservemode=true
Status: Failed
Test Evidence:
(localcloud) 🐱 > create vpcoffering name="Test-Conserve-Mode-VPC-Offering" displaytext="VPC Offering with Conserve Mode Enabled" supportedservices="Dhcp,Dns,SourceNat,PortForwarding,Lb,UserData,StaticNat,NetworkACL" conservemode=true
{
"vpcoffering": {
"created": "2026-01-30T09:02:54+0000",
"displaytext": "VPC Offering with Conserve Mode Enabled",
"distributedvpcrouter": false,
"fornsx": false,
"id": "b9b783b2-b1fb-4588-b383-ff36cc9e54ab",
"internetprotocol": "IPv4",
"isdefault": false,
"name": "Test-Conserve-Mode-VPC-Offering",
"service": [
{
"name": "Dhcp",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "StaticNat",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "UserData",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "SourceNat",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "Lb",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "NetworkACL",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "Dns",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "PortForwarding",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
}
],
"specifyasnumber": false,
"state": "Disabled",
"supportsregionLevelvpc": false
}
}
(localcloud) 🐱 > list vpcofferings name="Test-Conserve-Mode-VPC-Offering"
{
"count": 1,
"vpcoffering": [
{
"created": "2026-01-30T09:02:54+0000",
"displaytext": "VPC Offering with Conserve Mode Enabled",
"distributedvpcrouter": false,
"fornsx": false,
"id": "b9b783b2-b1fb-4588-b383-ff36cc9e54ab",
"internetprotocol": "IPv4",
"isdefault": false,
"name": "Test-Conserve-Mode-VPC-Offering",
"service": [...],
"specifyasnumber": false,
"state": "Disabled",
"supportsregionLevelvpc": false
}
]
}
mysql> SELECT id, name, conserve_mode FROM cloud.vpc_offerings WHERE name='Test-Conserve-Mode-VPC-Offering';
+----+---------------------------------+---------------+
| id | name | conserve_mode |
+----+---------------------------------+---------------+
| 8 | Test-Conserve-Mode-VPC-Offering | 0 |
+----+---------------------------------+---------------+
1 row in set (0.00 sec)
|
@blueorangutan package |
|
@nvazquez a [SL] Jenkins job has been kicked to build packages. It will be bundled with no SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16654 |
Description
This PR extends the conserve mode for VPCs tiers added on the previous PRs: #8309, #10744 by allowing:
This PR also introduces the following changes:
Fixes: #8317
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?