shwstppr commented on code in PR #11350:
URL: https://github.com/apache/cloudstack/pull/11350#discussion_r2671826816
##########
api/src/main/java/org/apache/cloudstack/alert/AlertService.java:
##########
@@ -71,8 +71,8 @@ private AlertType(short type, String name, boolean isDefault)
{
public static final AlertType ALERT_TYPE_HA_ACTION = new
AlertType((short)30, "ALERT.HA.ACTION", true);
public static final AlertType ALERT_TYPE_CA_CERT = new
AlertType((short)31, "ALERT.CA.CERT", true);
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);
Review Comment:
@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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]