Uh oh!
There was an error while loading. Please reload this page.
Have HyperV behave in 4.4 and return null instead of false - #761
Conversation
asfbot
commented
Aug 29, 2015
cloudstack-pull-rats #444 FAILURE |
asfbot
commented
Aug 29, 2015
cloudstack-pull-analysis #377 SUCCESS |
miguelaferreira
commented
Aug 30, 2015
@remi: passing null to a method or returning null from a method is always a bad choice. There are better ways to express "I don't know" (e.g. Using Optional in this case). I understand the intention of your change, but it addresses the symptom, not the problem. The problem is most likely in how the return value is handled elseweare. Please reconsider this change. If it's a blocker we can work on fixing structurally ASAP. |
remibergsma
commented
Aug 30, 2015
@miguelaferreira Thanks. I guess returning The I could live with a quick hotfix for |
koushik-das
commented
Aug 31, 2015
Changes LGTM for 4.4. |
miguelaferreira
commented
Aug 31, 2015
I didn't realise this was a hotfix for 4.4. |
miguelaferreira
commented
Aug 31, 2015
The rats build failed because some files (mostly travis related) do not have license headers. |
Commit 6a4927f made the HyperV investigator return false insteads of null. Returning false means the VM is NOT running, returning null means "I don't know". In 4.4 I experienced corruption because of HyperV returning false, instead of null.
remibergsma
commented
Aug 31, 2015
Travis error seems not related. I can force push to see if it works this time. At least the Apache pull-analysis build succeeded. |
8ed4041 to
03929d2Compareasfbot
commented
Aug 31, 2015
cloudstack-pull-rats #450 FAILURE |
remibergsma
commented
Aug 31, 2015
Seems Travis is broken for 4.4 :-s |
wilderrodrigues
commented
Aug 31, 2015
It has been partially fixed on 4.6, but still the code can be improved since it might return null. Below an snippet of the 4.6 code: @OverRide As you can see, they now throw an Exception in canse the status is null. However, in the return it might return null. In addition, the return type is no longer a wrapper class, but a native boolean. Returning null would be very bad. Could you perhaps make an amalgama of the fix, @remibergsma ? You can then push it towards 4.4 and 4.6 Cheers, |
wilderrodrigues
commented
Aug 31, 2015
Just discussed with @remibergsma and went over the old (4.4) code, the change made by @rajesh-battala - which broke the behaviour - and how 4.6 now is. The change LGTM concerning the hotfix on 4.4. In terms of future proof fix, would be nice to have a massive tests on all the investigators and get rid of those things returning null instead of a boolean. Cheers, |
asfbot
commented
Aug 31, 2015
cloudstack-pull-analysis #383 SUCCESS |
Have HyperV behave in 4.4 and return null instead of falseCommit 6a4927f made the HyperV investigator return false instead of null. Returning false means the VM is NOT running, returning null means "I don't know". In 4.4 I experienced corruption because of HyperV returning false, instead of null. Tonight I experienced corruption when one of our management servers went down (out-of-memory, not root caused yet). While all hypervisors that were connected to this management server were connecting the other, HA work started as well with investigators. HyperV happily reported everything as down (while it was still running), causing a mess. In 4.5 and master this was already fixed. If you know a better way to fix this, please let me know! This may cause another FindBugs alert, not sure how to resolve that. I just want this out ASAP. Maybe @DaanHoogland@wilderrodrigues or @miguelaferreira can advise on how to fix this properly. * pr/761: Have HyperV behave in 4.4 and return null instead of false Signed-off-by: Wilder Rodrigues <wilder.rodrigues@ekholabs.nl>
wilderrodrigues
commented
Sep 1, 2015
I merged the PR following the new merge style you and @miguelaferreira did. I dunno why it's still not updated. Let's wait a bit more. commit b0a4593 Cheers, |
yadvr
commented
Sep 2, 2015
Anyone github bug? why is @hubot here? |
remibergsma
commented
Sep 4, 2015
Created issue for it: CLOUDSTACK-8811 |
Have HyperV behave in 4.4 and return null instead of falseCommit 6a4927f made the HyperV investigator return false instead of null. Returning false means the VM is NOT running, returning null means "I don't know". In 4.4 I experienced corruption because of HyperV returning false, instead of null. Tonight I experienced corruption when one of our management servers went down (out-of-memory, not root caused yet). While all hypervisors that were connected to this management server were connecting the other, HA work started as well with investigators. HyperV happily reported everything as down (while it was still running), causing a mess. In 4.5 and master this was already fixed. If you know a better way to fix this, please let me know! This may cause another FindBugs alert, not sure how to resolve that. I just want this out ASAP. Maybe @DaanHoogland@wilderrodrigues or @miguelaferreira can advise on how to fix this properly. * pr/761: Have HyperV behave in 4.4 and return null instead of false Signed-off-by: Wilder Rodrigues <wilder.rodrigues@ekholabs.nl>
* fix reload data after delete vm * fix call fetchData after pollJob success response Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
…in-import-instances' into '4.16.0.0-scclouds' [UI] Usar frequência de CPU das unconstrained offerings ao importar VMs do VMware Closesapache#761 See merge request scclouds/scclouds!306
Commit 6a4927f made the HyperV investigator return false instead of null.
Returning false means the VM is NOT running, returning null means "I don't know". In 4.4 I experienced corruption because of HyperV returning false, instead of null.
Tonight I experienced corruption when one of our management servers went down (out-of-memory, not root caused yet). While all hypervisors that were connected to this management server were connecting the other, HA work started as well with investigators. HyperV happily reported everything as down (while it was still running), causing a mess.
In 4.5 and master this was already fixed. If you know a better way to fix this, please let me know!
This may cause another FindBugs alert, not sure how to resolve that. I just want this out ASAP. Maybe @DaanHoogland@wilderrodrigues or @miguelaferreira can advise on how to fix this properly.