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 question. For example, if 
multiple attaches come in for the VM, they are serialized and so any race 
condition is avoided.
    
    The original problem was that the device ID was selected before passing the 
work to the job queue. If multiple attach commands came in simultaneously, we 
could pick the same device ID multiple times (so the second attach would fail).


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