[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-05-04 Thread asfgit
Github user asfgit closed the pull request at: https://github.com/apache/cloudstack/pull/1408 --- 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: kvm: Aqcuire lock when running security g...

2016-05-02 Thread rhtyd
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-216423344 @swill no objection, let's merge this tag:mergeready --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub a

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-05-02 Thread swill
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-216319525 I am pretty comfortable with this because @wido is already using this. I don't have an SG environment setup right now for testing, so I would have to build one speci

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-05-02 Thread wido
Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-216318692 @swill and @rhtyd: The code in the PR is currently in production at PCextreme and running fine. With a 'with' statement in Python I couldn't get a proper lock.

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-05-02 Thread rhtyd
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-216304156 @swill I've validated the lock logic in a gist above, I've tested the elusiveness of critical code that runs when a lock is acquired; security groups is implemented u

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-05-02 Thread swill
Github user swill commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-216293581 @wido is this code currently deployed and working in your prod environment? @rhtyd any suggestions for validating this code before merge? Have you tested this? --

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-05-02 Thread rhtyd
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-216223801 tag:mergeready --- 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 feat

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-28 Thread rhtyd
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-215353392 reviewed updated PR, LGTM cc @swill --- 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 proje

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-28 Thread rhtyd
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-215353110 @wido +1 --- 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: kvm: Aqcuire lock when running security g...

2016-04-28 Thread wido
Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-215346544 @rhtyd: I tested and you are partially right. My test script: https://gist.github.com/wido/a236e9f065cef85b0497990e3d4798e6 When using the 'with open() as X' s

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-28 Thread wido
Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-215338991 @rhtyd Hmm, that's odd. My logs showed that the lock prevented the script from running twice and our problems were also solved with this. Before we had race co

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-27 Thread rhtyd
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-215217268 @wido I tested your original PR and the current updated PR, the locking never happened on my test env (Ubuntu x64). I read the manpage, and found that when yo

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-27 Thread wido
Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-215138161 @rhtyd The lock does not have to be released. It is done when the script exists. This is usually within 100ms or so. --- If your project is set up for it, you can rep

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-27 Thread rhtyd
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-215015234 @wido thanks, can you comment on how an acquired lock is released or it's not critical to release the lock at all? --- If your project is set up for it, you can repl

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-26 Thread wido
Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-214868739 @rhtyd Changed it to a with statement for Pythonic. I'd rather not use a external lib since with Basic Networking and KVM this runs on the hypervisor. --- If

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-26 Thread rhtyd
Github user rhtyd commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-214855374 @wido in general alright, I've left few comments that can help us improve this For master, looks like we'll need to build/publish a new 4.9+ a systemvm template -

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-26 Thread rhtyd
Github user rhtyd commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1408#discussion_r61146384 --- Diff: scripts/vm/network/security_group.py --- @@ -36,6 +39,20 @@ hyper = cfo.getEntry("hypervisor.type") if hyper == "lxc": driver =

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-26 Thread rhtyd
Github user rhtyd commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1408#discussion_r61146381 --- Diff: scripts/vm/network/security_group.py --- @@ -1029,6 +1046,14 @@ def addFWFramework(brname): sys.exit(1) cmd = args[0]

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-04-26 Thread wido
Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-214732460 Can you take another look @rhtyd ? It works on our systems in production --- If your project is set up for it, you can reply to this email and have your reply

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-02-10 Thread bhaisaab
Github user bhaisaab commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1408#discussion_r5255 --- Diff: scripts/vm/network/security_group.py --- @@ -1029,6 +1044,14 @@ def addFWFramework(brname): sys.exit(1) cmd = args[0]

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-02-10 Thread bhaisaab
Github user bhaisaab commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1408#discussion_r52552153 --- Diff: scripts/vm/network/security_group.py --- @@ -36,6 +39,18 @@ hyper = cfo.getEntry("hypervisor.type") if hyper == "lxc": drive

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-02-10 Thread wido
Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-182444102 To update, we ran more tests on our production platform spread out over 60 hypervisors we saw these lock message pop up in various occasions. Internally we use

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-02-10 Thread jlk
Github user jlk commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-182427828 Cool - 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

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-02-10 Thread wido
Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-182265889 I updated the code and tested it. We came across this mainly when Terraform was being used. Just checked the logs of two hypervisors: 2016-02-10 10:00

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-02-10 Thread wido
Github user wido commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-182246389 @jlk What I've seen is that it all happens in a 2 to 3 second window. Usually the security group script doesn't run for a very long time, so that made me think 10 seco

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-02-09 Thread jlk
Github user jlk commented on the pull request: https://github.com/apache/cloudstack/pull/1408#issuecomment-182075756 Is 10 seconds enough time to wait for the lock to release? Also, might want to have the loop print status that it's waiting for lock to release... --- If your

[GitHub] cloudstack pull request: kvm: Aqcuire lock when running security g...

2016-02-09 Thread wido
GitHub user wido opened a pull request: https://github.com/apache/cloudstack/pull/1408 kvm: Aqcuire lock when running security group Python script It could happen that when multiple instances are starting at the same time on a KVM host the Agent spawns multiple instances of secur