[GitHub] cloudstack pull request: CLOUDSTACK-7932: Fixed wrong semantics fo...

2014-11-18 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/cloudstack/pull/39


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-7932: Fixed wrong semantics fo...

2014-11-18 Thread karuturi
Github user karuturi commented on the pull request:

https://github.com/apache/cloudstack/pull/39#issuecomment-63441065
  
I dont see a case when it could return false then. 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-7932: Fixed wrong semantics fo...

2014-11-17 Thread anshul1886
GitHub user anshul1886 opened a pull request:

https://github.com/apache/cloudstack/pull/39

CLOUDSTACK-7932: Fixed wrong semantics for isVmAlive() method in 
HypervInvestigator

Fixed wrong semantics for isVmAlive() method in HypervInvestigator

Findbugs will report error on this as it is expecting true/false for 
Boolean value.
But we have diffrent meaning for null so it is false positive case from 
findbug

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/anshul1886/cloudstack-1 CLOUDSTACK-7932

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/39.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 #39


commit fe07c08c0093bbe89732bf6509f12ec8a8a0a8f2
Author: Anshul Gangwar anshul.gang...@citrix.com
Date:   2014-11-17T07:30:42Z

CLOUDSTACK-7932: Fixed wrong semantics for isVmAlive() method in 
HypervInvestigator

Findbugs will report error on this as it is expecting true/false for 
Boolean value.
But we have diffrent meaning for null so it is false positive case from 
findbug




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-7932: Fixed wrong semantics fo...

2014-11-17 Thread karuturi
Github user karuturi commented on the pull request:

https://github.com/apache/cloudstack/pull/39#issuecomment-63428603
  
From the method definition (isVmAlive), looks like what it is doing is 
right. 
ideally, we should change the return type from Boolean to boolean in the 
interface. 

Maybe in the caller(HighAvailabilityManagerImpl), you could check for both 
null and false for now. 

Also, can you add some unittests? 


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-7932: Fixed wrong semantics fo...

2014-11-17 Thread anshul1886
Github user anshul1886 commented on the pull request:

https://github.com/apache/cloudstack/pull/39#issuecomment-63429460
  
Actually null has different meaning than false. False means that vm is not 
alive while null means it cannot be determined whether it is alive or not. 

This is existing functionality for all hypervisor investigators so it 
doesn't make sense to write unit tests for this. This got changed to this 
behavior while fixing findbug  bugs. Better would be to use enum to represent 
various better states. But that will require many changes and can be taken for 
next release.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-7932: Fixed wrong semantics fo...

2014-11-17 Thread karuturi
Github user karuturi commented on the pull request:

https://github.com/apache/cloudstack/pull/39#issuecomment-63430873
  
In the second return statement, should it return false since the agent is 
alive and returned some status?

I didnt understand the argument for not adding unittests. I see that as an 
only way to avoid the same changes in future as findbugs would report it again 
and someone would attempt to fix it again. 
adding some documentation might help.



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request: CLOUDSTACK-7932: Fixed wrong semantics fo...

2014-11-17 Thread anshul1886
Github user anshul1886 commented on the pull request:

https://github.com/apache/cloudstack/pull/39#issuecomment-63432886
  
No. Because agent is reporting status of host. We cannot determine the 
status of VMs from that.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---