GitHub user miguelaferreira opened a pull request:

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

    Prevent live-lock in NSX API client

    The NSX api client relies on a sequence of responses to identify the need 
to authenticate and to follow redirects. In order to avoid live-locks, the NSX 
API client has a counter that will abort the execution after 5 consecutive 
requests that do not produce a Success (200) response.
    When a NSX controller enters a faulty state it can allow authentication 
requests but deny any other API call. In such cases the NSX API client will 
consider the denied request a reason to follow a redirect and will enter into a 
live-lock (because the actual redirection is not happening).
    This PR changes the NSX API client to no reset it's counter on a Success 
response from an authentication request. That is, the counter is only reset if 
another type of API call yields a Success response.
    
    In addition, this PR also:
    * changes the configuration of the license-maven-plugin to ignore files 
generated by pmd
    * moves the NSX marvin test to a plugins folder
    * refactors the NSX marvin test to reduce duplication
    * adds an extra test case to the NSX marvin test that checks that NSX 
tunnels are properly created

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

    $ git pull https://github.com/miguelaferreira/cloudstack nsx-livelock

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

    https://github.com/apache/cloudstack/pull/1178.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 #1178
    
----
commit d248e61a3128fe285a18c9836d1c7d18b5b946e9
Author: Miguel Ferreira <miguelferre...@me.com>
Date:   2015-12-02T13:53:26Z

    Add test for NSX plugin that simulates a live lock

commit cfe14462a3380c053ad174e0016632e6024e3573
Author: Miguel Ferreira <miguelferre...@me.com>
Date:   2015-12-02T13:53:56Z

    Fix NSX rest client to not reset execution counter after a login

commit 86e836196ed3374912da805f598961b3fe9c9033
Author: Miguel Ferreira <miguelferre...@me.com>
Date:   2015-12-02T14:42:38Z

    Ignore pmd generated files during license check
    
    This has been happening for the NSX and BigSwitch plugins.
    The maven build prints something like:
      [WARNING] Unknown file extension: 
.../plugins/network-elements/nicira-nvp/.pmd
      [WARNING] Missing header in: 
.../plugins/network-elements/nicira-nvp/.pmdruleset.xml

commit bafc2313bb872efa07c01dca2fdff4bec9b8dbb6
Author: Miguel Ferreira <miguelferre...@me.com>
Date:   2015-12-04T10:40:09Z

    Move NSX integrationt test to new plugins folder

commit 1e820e3906023ae43dbd3f01d632fbef5bb77430
Author: Miguel Ferreira <miguelferre...@me.com>
Date:   2015-12-04T10:46:08Z

    Use logger to print debug messages during test

commit a633ef811324a8dbf868c85922235c16a08cb1a0
Author: Miguel Ferreira <miguelferre...@me.com>
Date:   2015-12-04T11:10:55Z

    Refactor test cases to reduce duplication

commit 811f254e4ddcc8de0bc0375f35783eea4e04ef6d
Author: Miguel Ferreira <miguelferre...@me.com>
Date:   2015-12-05T14:51:07Z

    Test NSX tunnel in guest network

----


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