Soft delete port forwarding, load balancing and firewall rules#13015
Soft delete port forwarding, load balancing and firewall rules#13015bernardodemarco wants to merge 1 commit intoapache:mainfrom
Conversation
|
@blueorangutan package |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13015 +/- ##
=========================================
Coverage 17.95% 17.95%
Complexity 16502 16502
=========================================
Files 6019 6019
Lines 540743 540771 +28
Branches 66255 66256 +1
=========================================
+ Hits 97082 97090 +8
- Misses 432720 432741 +21
+ Partials 10941 10940 -1
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:
|
|
@blueorangutan package |
|
@bernardodemarco 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 17475 |
| CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.nics','enabled', 'TINYINT(1) NOT NULL DEFAULT 1 COMMENT ''Indicates whether the NIC is enabled or not'' '); | ||
|
|
||
| -- Soft delete port forwarding, load balancing and firewall rules | ||
| CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.firewall_rules', 'removed', 'datetime DEFAULT NULL'); |
There was a problem hiding this comment.
it is a very good idea to add removed column to firewall rules/lbs/pf rules.
for other tables, I suspect if the changes are necessary
Description
Currently, when port forwarding, load balancing and firewall rules are removed, their records are permanently deleted from the database. This makes it impossible to track and audit previously applied rules after their removal.
Therefore, this PR proposes to, instead of deleting the records associated with such network rules, only marking them as removed. To achieve that, a
removedcolumn has been added to the tables that store the rules metadata, allowing to track the exact date and time when a rule was removed.Maintaining these records is essential for auditing and traceability purposes. It ensures that historical network configurations remain accessible for cloud administrators/operators, enabling proper investigation, compliance verification and analysis of past behavior, even after rules are no longer active.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?
Egress rules (ER)
Records persisted in the database after the tests
Firewall (FW)
Records persisted in the database after the tests
Port forwarding (PF)
Records persisted in the database after the tests
Public Load balancing (LB)
Records persisted in the database after the tests
Internal Load balancing (LB)
Records persisted in the database after the tests