cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rafaelweingartner <...@git.apache.org>
Subject [GitHub] cloudstack pull request #837: CLOUDSTACK-8855 Improve Error Message for Host...
Date Tue, 14 Mar 2017 16:08:08 GMT
Github user rafaelweingartner commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/837#discussion_r105952120
  
    --- Diff: server/src/com/cloud/alert/AlertManagerImpl.java ---
    @@ -767,7 +767,9 @@ public void sendAlert(AlertType alertType, long dataCenterId, Long
podId, Long c
                     // set up a new alert
                     AlertVO newAlert = new AlertVO();
                     newAlert.setType(alertType.getType());
    -                newAlert.setSubject(subject);
    +                //do not have a seperate column for content.
    +                //appending the message to the subject for now.
    +                newAlert.setSubject(subject+content);
    --- End diff --
    
    I understand that 999 characters may seem a lot, but the `content` may contain some long
strings. for instance, in `com.cloud.network.router.VirtualNetworkApplianceManagerImpl.RvRStatusUpdateTask.checkDuplicateMaster(List<DomainRouterVO>)`,
it is generated a `subject` and a `content` that together (depending on variable combinations
used to create those strings) can go over 500 chars.
    
    What concerns me the most are methods such as `org.apache.cloudstack.storage.image.BaseImageStoreDriverImpl.createVolumeAsyncCallback(AsyncCallbackDispatcher<?
extends BaseImageStoreDriverImpl, DownloadAnswer>, CreateContext<CreateCmdResult>)`,
where the `subject` and `content` would be the same, and they are created using an error message
that may come from the most different places.
    
    The use of `com.cloud.alert.AlertManagerImpl.sendAlert(AlertType, long, Long, String,
String)` is quite broad and it would be a lot of work to check every single place it is used.
For me, the code that you are adding at line 772 seem like a half-measure that is bug prone.
I would like to hear the feedback from others on this topic.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message