[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-06 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/cloudstack/pull/660 --- 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

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-06 Thread mike-tutkowski
Github user mike-tutkowski commented on the pull request: https://github.com/apache/cloudstack/pull/660#issuecomment-128443925 Sounds good, @karuturi I'll go ahead and check the code in. Thanks for the comments. --- If your project is set up for it, you can reply to this email and ha

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-06 Thread karuturi
Github user karuturi commented on the pull request: https://github.com/apache/cloudstack/pull/660#issuecomment-128293184 ok. There are lot of ifs in that part of the code which makes it difficult to read. I will have to try it to understand fully for which I dont have time now. So, I

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-05 Thread mike-tutkowski
Github user mike-tutkowski commented on the pull request: https://github.com/apache/cloudstack/pull/660#issuecomment-128250790 So, the way we got around the issue of occasionally acquiring the same device ID was to move the retrieve-device-ID logic from the API layer (which can be cal

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-05 Thread karuturi
Github user karuturi commented on the pull request: https://github.com/apache/cloudstack/pull/660#issuecomment-128250223 if we dont persist the deviceId at the time of generation, as you said multiple calls around the same time will still get the same id and the attach would fail (whi

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-05 Thread mike-tutkowski
Github user mike-tutkowski commented on the pull request: https://github.com/apache/cloudstack/pull/660#issuecomment-128244090 The reason we could pick multiple same device IDs is because the ID is not written to the DB until late in the attach process (after a successful attach on th

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-05 Thread mike-tutkowski
Github user mike-tutkowski commented on the pull request: https://github.com/apache/cloudstack/pull/660#issuecomment-128243816 I don't think there's a race condition anymore (it was fixed by my initial commit (not this code)). The attach code is run in serial for the VM in que

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-05 Thread karuturi
Github user karuturi commented on the pull request: https://github.com/apache/cloudstack/pull/660#issuecomment-128242754 Even after e5ffcab0 and this change, race condition is possible right? Let us say the hypervisor takes time to attach and another attach command came in before this

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-05 Thread mike-tutkowski
Github user mike-tutkowski commented on the pull request: https://github.com/apache/cloudstack/pull/660#issuecomment-128234545 @bhaisaab I don't think there's any issue with the hypervisor matrix. What was happening was a NPE was being thrown in one scenario when trying to attach a vo

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-05 Thread anshul1886
Github user anshul1886 commented on the pull request: https://github.com/apache/cloudstack/pull/660#issuecomment-128231212 LGTM --- 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 en

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-05 Thread bhaisaab
Github user bhaisaab commented on the pull request: https://github.com/apache/cloudstack/pull/660#issuecomment-128230242 LGTM @mike-tutkowski can this cause any side effect on any hypervisor/storage permutation? --- If your project is set up for it, you can reply to this email and ha

[GitHub] cloudstack pull request: CLOUDSTACK-8698: Retrieve a new device ID...

2015-08-05 Thread mike-tutkowski
GitHub user mike-tutkowski opened a pull request: https://github.com/apache/cloudstack/pull/660 CLOUDSTACK-8698: Retrieve a new device ID, if needed This PR addresses https://issues.apache.org/jira/browse/CLOUDSTACK-8698. You can merge this pull request into a Git repository by runn