GitHub user bhaisaab opened a pull request:
https://github.com/apache/cloudstack/pull/222
server: Introduce Unknown Status to be used in AbstractInvestigatorImpl
The PR #211 introduced changes where the abstract investigator
testIpAddress()
would return other Status, which previously only returned null, Up or Down.
In
this patch we introduce a new Status "Unknown" that replaces null's
semantics.
The important changes #211 introduced was the debugging statements as
semantically
the changes would work same as the consumers of testIpAddress() method only
used
if returned values were Up or Down and in other cases (null, Alert etc) it
would
simply continue to loop through the resources being investigated.
Keeping the debug logs, this commit only replaces the previously returned
null
values with Status.Unknown and fixed the debug statements to reflect the
same.
In case of trapped exceptions too, we return Unknown status but log the
exception
we trapped.
Signed-off-by: Rohit Yadav <[email protected]>
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/cloudstack
HA-abstractinvestigatorimpl-nullstate
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/222.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #222
----
commit fee74106aabbd97693b829200fc4d8f30d965b88
Author: Rohit Yadav <[email protected]>
Date: 2015-05-01T14:03:51Z
server: Introduce Unknown Status to be used in AbstractInvestigatorImpl
The PR #211 introduced changes where the abstract investigator
testIpAddress()
would return other Status, which previously only returned null, Up or Down.
In
this patch we introduce a new Status "Unknown" that replaces null's
semantics.
The important changes #211 introduced was the debugging statements as
semantically
the changes would work same as the consumers of testIpAddress() method only
used
if returned values were Up or Down and in other cases (null, Alert etc) it
would
simply continue to loop through the resources being investigated.
Keeping the debug logs, this commit only replaces the previously returned
null
values with Status.Unknown and fixed the debug statements to reflect the
same.
In case of trapped exceptions too, we return Unknown status but log the
exception
we trapped.
Signed-off-by: Rohit Yadav <[email protected]>
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---