[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-8758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15333325#comment-15333325
 ] 

ASF subversion and git services commented on CLOUDSTACK-8758:
-------------------------------------------------------------

Commit 44ba14d17ba3b8fa00cd05c97eaceed49367816c in cloudstack's branch 
refs/heads/deploy-from-snapshot from [~remibergsma]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=44ba14d ]

Merge pull request #737 from 
miguelaferreira/feature/mferreira/ncx-follow-redirects-gardened-rebase

CLOUDSTACK-8758: Handle redirects in communication with NXS controller (a.k.a. 
Nicira NVP)When an NSX controller node is part of a cluster it will redirect 
API calls to the master controller. Because the ACS management server does not 
follow such redirects, if there is a change of master within a NSX cluster, the 
NSX device (a.k.a.  NiciraNvp) needs to be reconfigured (via the management 
server DB).

The goal of this PR is to enable ACS management server to follow HTTP redirects 
sent by NSX controllers. However, other changes were made to the cloud-utils 
module that provides the REST client that the NSX plugin uses.

Cosmetic changes:
* Upgrade maven module structure for cloud-utils and cloud-plugin-netowkr-nvp 
to comply with maven default
* Several refactorings on both modules to consistently format the code, remove 
unused code, declare final when possible, remove auto generated comments, etc

Other changes:
* Upgrade HTTP library used in REST client to version 4.5 of Apache HTTP 
Components
* Implement generic REST client that supports HTTP redirects
* Implement NSX specific REST client
* Simplify NSX api implementation
* Previously existing unit tests for both the REST client and NSX api were 
either maintained in the same test classes, moved to new test classes (because 
code under tests also moved), or removed (because code under tests was also 
removed)
* New Marvin tests for NSX controllers

Testing:
* Ran all unit tests present in the project
* Ran Java Integration tests for NSX api targeting both a master and a slave 
controller
* Ran new Marvin test for NSX controller
* Manual inspection of logs to confirm redirection is taking place

* pr/737:
  Use NSX specific RestClient in API implementation (NiciraNvpApi)
  Refactor NSX api implementation (NiciraNvpApi)
  Add NSX specific RestClient implementation
  Delegate HTTP protocol activity in RESTServiceConnector to RestClient
  Add basic RestClient implentation based on HTTP Components 4.5
  Code clean up in cloud-plugin-network-nvp project
  Code clean up in cloud-utils project
  Refactor cloud-plugin-network-nvp project into Maven default structure
  Refactor cloud-utils project into Maven default structure
  Fix unit-test library dependencies
  Add Marvin test for Nicira NVP plugin
  Create Nicira NVP devices and enable plugin at deploy

Signed-off-by: Remi Bergsma <git...@remi.nl>


> Handle redirects in communication with NXS controller (a.k.a. Nicira NVP)
> -------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-8758
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8758
>             Project: CloudStack
>          Issue Type: Improvement
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Network Devices
>            Reporter: Miguel Ferreira
>            Priority: Minor
>             Fix For: 4.6.0
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> When setup in a cluster, NSX controllers will redirect calls to the cluster 
> master. However, the NiciraNvp plugin does not handle those redirects 
> correctly. The underlying HTTP client will transparently redirect calls, but 
> the plugin will aways override the target host to the initial value.
> The underlying HTTP library being used at the moment is Apache HTTP Commons, 
> which has been superseded by Apache HTTP Components which introduces a new 
> architecture. This library should be upgraded to the new architecture since 
> this will make it easier to transparently handle redirects,



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to