1. Message and message index table db writes were happening without going
   through rate limits set for db queue and hence contrail-collector would
   end up having huge db queues and high memory usage when
   contrail-vrouter-agent was sending AgentRouteLog in a loop due to
   route flaps/another unrelated bug. libstdc++ default allocator
   does not release memory back to the OS and hence contrail-collector
   would seem to have a memory leak due to the above scenario.
2. Add rates limits in sandesh client state machine and in collector per
   generator state machine and db queues even for SYS_EMERG messages.
3. Reset the db handler drop level on initializing also to handle
   reinitialization scenarios.

Change-Id: I9a26f414994eaea7af0ce9078839deb1dd391656
Closes-Bug: #1391757
netns command crashes not reported through nodemgr Closes-Bug: #1374396

Change-Id: Ie9d475a46f36b5cd36d2da1f5065d0eba115455a
Add netns white-list compute nodes

Use availability-zone with aggregate hosts to define
a set of white-list compute nodes where LB or SNAT
network namespaces can be launched.

User can configure the zone in contrail-svc-monitor.conf
netns_availability_zone = <name of avail zone>

Change-Id: I19303538bb79f67f2936190e95c8a753ad24555a
Add default SG policy to allow IPv6 addresses.
bug #1395104

Change-Id: I03f2a032c88d96c223db380229292268851fcc55
New java zookeeper library to handle leader election. Only 2 apis need to be called from the client. 1) MasterSelection construction with path and id-node, along with zookeeper ip and 2) waitForLeadership(), which will keep the process waiting till it attains leadership

Change-Id: Iead29f5176021d93e4570c26a4b81a0a0a171160
Program network policies on MX

Program contrail network policies on MX by creating import/export policy rules on MX.
We create an import and an export rule for each VRF being programmed on MX. We add the corresponding route targets to the appropriate policy statements. We also derive import/export route targets from routing instance connections.
Added unit test case for this.

Change-Id: I308e534a9a9533b062de76e9968d1604c540767b
Closes-Bug: 1395943
Issue: When both discovery IP and service IP is configured in contrail-vrouter-agent.conf, the expected_connections count (used by NodeStatus UVE to declare whether agent is Functional or not) computed by agent was incorrect.
Fix: While updating expected_connections count we should consider whether agent has subscribed for a given discovery service or not.
Closes-Bug: #1396164

Change-Id: Idbef7de5e63bec52dbeb50547ed61ba37255c288
Merge "Add netns white-list compute nodes"
Merge "netns command crashes not reported through nodemgr Closes-Bug: #1374396"
Merge "Program network policies on MX"
Handle error 502 from haproxy

If haproxy has successfully sent the request to API server, but API server dies before sending any response, haproxy sends error 502 to the caller. Added retry to handle this case.

Change-Id: I19aa17c0e337906e3c643fdff99da1b39a617686
Closes-Bug: 1396440
Handler BadRequest error while creating routing instance

Change-Id: I96bd462eba273a3b7dfa1705ed2507b0f3faa7a3
Closes-Bug: 1396439
Merge "Add default SG policy to allow IPv6 addresses. bug #1395104"
Merge "New java zookeeper library to handle leader election. Only 2 apis need to be called from the client. 1) MasterSelection construction with path and id-node, along with zookeeper ip and 2) waitForLeadership(), which will keep the process waiting till it attains leadership"
Merge "1. Message and message index table db writes were happening without going    through rate limits set for db queue and hence contrail-collector would    end up having huge db queues and high memory usage when    contrail-vrouter-agent was sending AgentRouteLog in a loop due to    route flaps/another unrelated bug. libstdc++ default allocator    does not release memory back to the OS and hence contrail-collector    would seem to have a memory leak due to the above scenario. 2. Add rates limits in sandesh client state machine and in collector per    generator state machine and db queues even for SYS_EMERG messages. 3. Reset the db handler drop level on initializing also to handle    reinitialization scenarios."
Merge "Handler BadRequest error while creating routing instance"
Merge "Handle error 502 from haproxy"
Merge "Issue: When both discovery IP and service IP is configured in contrail-vrouter-agent.conf, the expected_connections count (used by NodeStatus UVE to declare whether agent is Functional or not) computed by agent was incorrect. Fix: While updating expected_connections count we should consider whether agent has subscribed for a given discovery service or not. Closes-Bug: #1396164"
Remove tsn.a reference from scons
Merge remote branch 'upstream/master' into ovs_gw_merge

Conflicts:
	src/vnsw/agent/init/agent_param.cc