Repository navigation
[4.6][BLOCKER] CLOUDSTACK-8923: Create storage network IP range failed - #934
Conversation
|
@NuxRo Can you test this please? |
c80c364 to
7642050
Compare
|
@karuturi Tested, it works! Thanks! |
transaction.getConnection() was wrapped in try-with-resource. This caused transaction to get closed even before its committed.
7642050 to
79b7391
Compare
|
@NuxRo for the benefit of the next reviewer, can you please outline the manual/automatic tests you executed? |
|
@karuturi sure, it was a normal, standard installation via the web UI on CentOS6 HVs and mgmt, no automation. |
|
I ran BVT tests on a setup with two xenserver 6.5. I didnt see any new failures. |
|
Code LGTM. I couldn't test but did a check in the source and found the recurring pattern for this was applied in several cases. It should not have been applied here as the connection should not have been closed. It will probably add a findbugs warning, so let's keep an eye on that. |
|
Thanks @DaanHoogland and @NuxRo . I will merge this in sometime. |
[4.6][BLOCKER] CLOUDSTACK-8923: Create storage network IP range failedThis is a regression from commit 0cd8c06 try-with-resource used at https://github.com/apache/cloudstack/blob/master/server/src/com/cloud/network/StorageNetworkManagerImpl.java#L107 is closing the transaction. At later point when the transaction is actually committed, it doesn't find the transaction and hence the exception. testing: manually tested that create storage network api succeeds. ``` cloudmonkey > create storagenetworkiprange gateway=192.168.200.67 netmask=255.255.255.0 startip=192.168.200.200 endip=192.168.200.202 podid=544e3be0-9bc6-428f-9237-bf777053ab2e \ accountid = 120b521c-725c-11e5-9244-7278fd1d2943 cmd = org.apache.cloudstack.api.command.admin.network.CreateStorageNetworkIpRangeCmd created = 2015-10-15T09:31:22+0000 jobid = c86c4968-bc6e-4255-aa11-39221eb2277f jobprocstatus = 0 jobresult: storagenetworkiprange: id = df491e87-7a00-4b5e-9bfe-e811fe78c9cd endip = 192.168.200.202 gateway = 192.168.200.67 netmask = 255.255.255.0 startip = 192.168.200.200 jobresultcode = 0 jobresulttype = object jobstatus = 1 userid = 120b6414-725c-11e5-9244-7278fd1d2943 ``` ``` cloudmonkey > list storagenetworkiprange count = 1 storagenetworkiprange: id = df491e87-7a00-4b5e-9bfe-e811fe78c9cd endip = 192.168.200.202 gateway = 192.168.200.67 netmask = 255.255.255.0 networkid = a0f7faf9-83a1-4af5-b420-d8a78f2f59d8 podid = 544e3be0-9bc6-428f-9237-bf777053ab2e startip = 192.168.200.200 zoneid = 34b9a0a1-758c-442b-9bc6-7bce03157d4c ``` * pr/934: CLOUDSTACK-8923: Create storage network IP range failed Signed-off-by: Rajani Karuturi <rajani.karuturi@citrix.com>
|
Run the following tests: The errors are known and unrelated. The error is: It is most likely unrelated. Since it's already merged, I'm not going to investigate it. |
|
So,
|
This is a regression from commit 0cd8c06
try-with-resource used at https://github.com/apache/cloudstack/blob/master/server/src/com/cloud/network/StorageNetworkManagerImpl.java#L107 is closing the transaction.
At later point when the transaction is actually committed, it doesn't find the transaction and hence the exception.
testing:
manually tested that create storage network api succeeds.