GitHub user karuturi opened a pull request:

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

    [4.6][BLOCKER] CLOUDSTACK-8923: Create storage network IP range failed

    This is a regression from commit 0cd8c06f7dceaf999acf202862c5d1d580e7aa0e
    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
    ```
    


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

    $ git pull https://github.com/karuturi/cloudstack CLOUDSTACK-8923

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

    https://github.com/apache/cloudstack/pull/934.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 #934
    
----
commit 3fee203fac3d612dfa48e11a8d38ac5ded0aa589
Author: Rajani Karuturi <rajani.karut...@citrix.com>
Date:   2015-10-15T09:33:31Z

    CLOUDSTACK-8923: Create storage network IP range failed
    
    transaction.getConnection() was wrapped in try-with-resource.
    This caused transaction to get closed even before its committed.

----


---
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.
---

Reply via email to