-
Notifications
You must be signed in to change notification settings - Fork 1.3k
alert: fix type ID for alerts #11350
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11350 +/- ##
============================================
- Coverage 16.24% 16.24% -0.01%
- Complexity 13396 13397 +1
============================================
Files 5658 5658
Lines 499169 499273 +104
Branches 60579 60600 +21
============================================
+ Hits 81087 81101 +14
- Misses 409041 409128 +87
- Partials 9041 9044 +3
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 |
|
@shwstppr 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14494 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13999)
|
| public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)33, "ALERT.VR.PUBLIC.IFACE.MTU", true); | ||
| public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)34, "ALERT.VR.PRIVATE.IFACE.MTU", true); |
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.
like Capacity.CAPACITY_TYPE_MEMORY all these numbers should be mnenomic. I think. an enum is in order, but a growable Set could be used as well, to make it more dynamic. btw I don’t think the Alert types should be gotten from external entities to this component (like Capacity) but external components should at best be allowed to register types, or else use type provided by the AlertService . I hope this makes sense.
Also all this said, this is not a rejection of this change, just some remarks on the design quality/techdebt we are looking at.
|
@shwstppr , any testing needed here? |
|
@DaanHoogland I can't say what kind of testing we can do other than our integration tests. The only case I see this may cause an issue is when someone has already added some external automation based on the alert in value. Updated base branch to 4.20 @blueorangutan package |
|
@shwstppr 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16285 |
ok, one for the release notes then (cc @abh1sar ) |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-15132)
|
| public static final AlertType ALERT_TYPE_VM_SNAPSHOT = new AlertType((short)32, "ALERT.VM.SNAPSHOT", true); | ||
| public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PUBLIC.IFACE.MTU", true); | ||
| public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PRIVATE.IFACE.MTU", true); | ||
| public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)33, "ALERT.VR.PUBLIC.IFACE.MTU", true); |
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.
@shwstppr any db upgrade is needed for the records with alert type 32 and not belonging to vm snapshot?
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.
@sureshanaparti , how would we make the distinction?
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.
maybe, based on the subject or content in the alerts.
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.
ok, could be done (maybe). I just wonder if this is worth the trouble. Alerts are just that ; a one of alerting of the operator to signal the system needs attention. I am not sure maintaining old alerts is a worthwhile endeavour.
Also, we would need to be deadsure the conversion is correct and complete for it to make any sense.
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.
@DaanHoogland @sureshanaparti I think it can be done with some confidence as alert DB entry does contain both type and name,
mysql> SELECT * FROM alert LIMIT 4\G
*************************** 1. row ***************************
id: 1
uuid: 6b0e308c-5d98-4574-98fe-479b9c70d633
type: 14
cluster_id: NULL
pod_id: NULL
data_center_id: 0
subject: Management network CIDR is not configured originally. Set it default to 192.168.1.0/24
sent_count: 1
created: 2025-12-22 10:31:21
last_sent: 2025-12-22 10:31:21
resolved: NULL
archived: 0
name: ALERT.MANAGEMENT
content:
*************************** 2. row ***************************
id: 2
uuid: 8726e2ee-ebbd-44c8-9a98-38bf725e97e4
type: 14
cluster_id: NULL
pod_id: NULL
data_center_id: 0
subject: Management server node 127.0.0.1 is up
sent_count: 1
created: 2025-12-22 10:31:24
last_sent: 2025-12-22 10:31:24
resolved: NULL
archived: 0
name: ALERT.MANAGEMENT
content:
...
but some issues are:
- either we add a 4.20.2.0 to 4.20.3.0 path or target the changes for 4.22 branch.
- with newer versions more types have been added. 4.22 already has 3 new.
- this numeric constant approach will have the same issue again sooner or later.
I'm okay to close this and let things as it is as we don't have an issue reported and only something I saw wrong
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.
I think we must do this but on main/23 is better.
ALERT.VM.SNAPSHOT, ALERT.VR.PUBLIC.IFACE.MTU and ALERT.VR.PRIVATE.IFACE.MTU are all having type value 32. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
….PRIVATE.IFACE.MTU
21a7973 to
6be21fb
Compare
|
@shwstppr updated the upgrade path for the alerts, please check. cc @DaanHoogland @borisstoyanov |
|
@blueorangutan package |
|
@sureshanaparti 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. |
|
@sureshanaparti can you please create a new PR with your changes? |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16563 |
created new PR: #12527 cc @DaanHoogland @Pearl1594 @shwstppr |
Description
Alert types ALERT.VM.SNAPSHOT, ALERT.VR.PUBLIC.IFACE.MTU and ALERT.VR.PRIVATE.IFACE.MTU are all having type value 32.
TBD: will this cause any sort of issue?
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?