You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ka...@apache.org on 2017/07/06 17:01:18 UTC
[1/2] mesos git commit: Fixed windows failure due to new
`net::IP::Network` class.
Repository: mesos
Updated Branches:
refs/heads/master 46f97991c -> ee7e7c793
Fixed windows failure due to new `net::IP::Network` class.
Review: https://reviews.apache.org/r/60674/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7c81d390
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7c81d390
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7c81d390
Branch: refs/heads/master
Commit: 7c81d390328e1dbc53948ed47abc86beeb1939c5
Parents: 46f9799
Author: Avinash sridharan <av...@mesosphere.io>
Authored: Thu Jul 6 12:41:58 2017 -0400
Committer: Kapil Arya <ka...@mesosphere.io>
Committed: Thu Jul 6 12:41:58 2017 -0400
----------------------------------------------------------------------
3rdparty/stout/include/stout/windows/ip.hpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/7c81d390/3rdparty/stout/include/stout/windows/ip.hpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/include/stout/windows/ip.hpp b/3rdparty/stout/include/stout/windows/ip.hpp
index e2ed99e..76f23c8 100644
--- a/3rdparty/stout/include/stout/windows/ip.hpp
+++ b/3rdparty/stout/include/stout/windows/ip.hpp
@@ -28,7 +28,7 @@
namespace net {
-inline Result<IPNetwork> IPNetwork::fromLinkDevice(
+inline Result<IP::Network> IP::Network::fromLinkDevice(
const std::string& name,
int family)
{
@@ -67,7 +67,7 @@ inline Result<IPNetwork> IPNetwork::fromLinkDevice(
if (ip_adapter.IpAddressList.IpMask.String[0] != '\0') {
IP netmask = IP::parse(ip_adapter.IpAddressList.IpMask.String).get();
- Try<IPNetwork> network = IPNetwork::create(address, netmask);
+ Try<IP::Network> network = IP::Network::create(address, netmask);
if (network.isError()) {
return Error(network.error());
}
@@ -79,7 +79,7 @@ inline Result<IPNetwork> IPNetwork::fromLinkDevice(
// We've seen such cases when VPN is used. In that case, a
// default /32 prefix for IPv4 and /64 for IPv6 is used.
int prefix = (family == AF_INET ? 32 : 64);
- Try<IPNetwork> network = IPNetwork::create(address, prefix);
+ Try<IP::Network> network = IP::Network::create(address, prefix);
if (network.isError()) {
return Error(network.error());
}
[2/2] mesos git commit: Fixed compilation failure in port-mapping
network isolator.
Posted by ka...@apache.org.
Fixed compilation failure in port-mapping network isolator.
Review: https://reviews.apache.org/r/60675/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ee7e7c79
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ee7e7c79
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ee7e7c79
Branch: refs/heads/master
Commit: ee7e7c7934db22ae040956b7546f94c95e846672
Parents: 7c81d39
Author: Avinash sridharan <av...@mesosphere.io>
Authored: Thu Jul 6 12:42:10 2017 -0400
Committer: Kapil Arya <ka...@mesosphere.io>
Committed: Thu Jul 6 12:42:10 2017 -0400
----------------------------------------------------------------------
src/linux/routing/filter/icmp.hpp | 2 +-
src/linux/routing/filter/ip.hpp | 2 +-
src/linux/routing/route.cpp | 4 ++--
src/linux/routing/route.hpp | 4 ++--
.../mesos/isolators/network/port_mapping.cpp | 18 +++++++++---------
.../mesos/isolators/network/port_mapping.hpp | 4 ++--
src/tests/containerizer/port_mapping_tests.cpp | 4 ++--
7 files changed, 19 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/ee7e7c79/src/linux/routing/filter/icmp.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/filter/icmp.hpp b/src/linux/routing/filter/icmp.hpp
index bc0aed0..c6a3c49 100644
--- a/src/linux/routing/filter/icmp.hpp
+++ b/src/linux/routing/filter/icmp.hpp
@@ -45,7 +45,7 @@ struct Classifier
return destinationIP == that.destinationIP;
}
- // TODO(evelinad): Replace net::IP with net::IPNetwork when we will
+ // TODO(evelinad): Replace net::IP with net::IP::Network when we will
// support classifiers for the entire subnet.
Option<net::IP> destinationIP;
};
http://git-wip-us.apache.org/repos/asf/mesos/blob/ee7e7c79/src/linux/routing/filter/ip.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/filter/ip.hpp b/src/linux/routing/filter/ip.hpp
index ee416bc..fef80d2 100644
--- a/src/linux/routing/filter/ip.hpp
+++ b/src/linux/routing/filter/ip.hpp
@@ -107,7 +107,7 @@ struct Classifier
Option<net::MAC> destinationMAC;
- // TODO(evelinad): Replace net::IP with net::IPNetwork when we will
+ // TODO(evelinad): Replace net::IP with net::IP::Network when we will
// support classifiers for the entire subnet.
Option<net::IP> destinationIP;
http://git-wip-us.apache.org/repos/asf/mesos/blob/ee7e7c79/src/linux/routing/route.cpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/route.cpp b/src/linux/routing/route.cpp
index ceeaf8e..ba39eac 100644
--- a/src/linux/routing/route.cpp
+++ b/src/linux/routing/route.cpp
@@ -75,11 +75,11 @@ Try<vector<Rule>> table()
CHECK_EQ(AF_INET, rtnl_route_get_family(route));
// Get the destination IP network if exists.
- Option<net::IPNetwork> destination;
+ Option<net::IP::Network> destination;
struct nl_addr* dst = rtnl_route_get_dst(route);
if (dst != nullptr && nl_addr_get_len(dst) != 0) {
struct in_addr* addr = (struct in_addr*) nl_addr_get_binary_addr(dst);
- Try<net::IPNetwork> network = net::IPNetwork::create(
+ Try<net::IP::Network> network = net::IP::Network::create(
net::IP(*addr),
nl_addr_get_prefixlen(dst));
http://git-wip-us.apache.org/repos/asf/mesos/blob/ee7e7c79/src/linux/routing/route.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/route.hpp b/src/linux/routing/route.hpp
index 01d4e75..23174bd 100644
--- a/src/linux/routing/route.hpp
+++ b/src/linux/routing/route.hpp
@@ -31,14 +31,14 @@ namespace route {
// Represents a rule in the routing table (for IPv4).
struct Rule
{
- Rule(const Option<net::IPNetwork>& _destination,
+ Rule(const Option<net::IP::Network>& _destination,
const Option<net::IP>& _gateway,
const std::string& _link)
: destination(_destination),
gateway(_gateway),
link(_link) {}
- Option<net::IPNetwork> destination;
+ Option<net::IP::Network> destination;
Option<net::IP> gateway;
std::string link;
};
http://git-wip-us.apache.org/repos/asf/mesos/blob/ee7e7c79/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp b/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
index cd008aa..57d4ccd 100644
--- a/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
+++ b/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
@@ -496,7 +496,7 @@ static Try<Nothing> addContainerIPFilters(
ingress::HANDLE,
ip::Classifier(
None(),
- net::IPNetwork::LOOPBACK_V4().address(),
+ net::IP::Network::LOOPBACK_V4().address(),
None(),
range),
Priority(IP_FILTER_PRIORITY, NORMAL),
@@ -547,7 +547,7 @@ static Try<Nothing> removeContainerIPFilters(
ingress::HANDLE,
ip::Classifier(
None(),
- net::IPNetwork::LOOPBACK_V4().address(),
+ net::IP::Network::LOOPBACK_V4().address(),
None(),
range));
@@ -1641,8 +1641,8 @@ Try<Isolator*> PortMappingIsolatorProcess::create(const Flags& flags)
}
// Get the host IP network, MAC and default gateway.
- Result<net::IPNetwork> hostIPNetwork =
- net::IPNetwork::fromLinkDevice(eth0.get(), AF_INET);
+ Result<net::IP::Network> hostIPNetwork =
+ net::IP::Network::fromLinkDevice(eth0.get(), AF_INET);
if (!hostIPNetwork.isSome()) {
return Error(
@@ -3678,7 +3678,7 @@ Try<Nothing> PortMappingIsolatorProcess::addHostIPFilters(
ingress::HANDLE,
ip::Classifier(
None(),
- net::IPNetwork::LOOPBACK_V4().address(),
+ net::IP::Network::LOOPBACK_V4().address(),
range,
None()),
Priority(IP_FILTER_PRIORITY, NORMAL),
@@ -3881,7 +3881,7 @@ Try<Nothing> PortMappingIsolatorProcess::removeHostIPFilters(
ingress::HANDLE,
ip::Classifier(
None(),
- net::IPNetwork::LOOPBACK_V4().address(),
+ net::IP::Network::LOOPBACK_V4().address(),
range,
None()));
@@ -4005,7 +4005,7 @@ string PortMappingIsolatorProcess::scripts(Info* info)
<< " prio " << Priority(IP_FILTER_PRIORITY, NORMAL).get() << " u32"
<< " flowid ffff:0"
<< " match ip dst "
- << net::IPNetwork::LOOPBACK_V4().address()
+ << net::IP::Network::LOOPBACK_V4().address()
<< " action mirred egress redirect dev " << eth0 << "\n";
foreach (const PortRange& range,
@@ -4025,7 +4025,7 @@ string PortMappingIsolatorProcess::scripts(Info* info)
<< " prio " << Priority(IP_FILTER_PRIORITY, NORMAL).get() << " u32"
<< " flowid ffff:0"
<< " match ip dst "
- << net::IPNetwork::LOOPBACK_V4().address()
+ << net::IP::Network::LOOPBACK_V4().address()
<< " match ip dport " << range.begin() << " "
<< hex << range.mask() << dec
<< " action mirred egress redirect dev " << lo << "\n";
@@ -4045,7 +4045,7 @@ string PortMappingIsolatorProcess::scripts(Info* info)
<< " flowid ffff:0"
<< " match ip protocol 1 0xff"
<< " match ip dst "
- << net::IPNetwork::LOOPBACK_V4().address() << "\n";
+ << net::IP::Network::LOOPBACK_V4().address() << "\n";
// Display the filters created on eth0 and lo.
script << "tc filter show dev " << eth0
http://git-wip-us.apache.org/repos/asf/mesos/blob/ee7e7c79/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp b/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
index 9d38289..6ff3820 100644
--- a/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
+++ b/src/slave/containerizer/mesos/isolators/network/port_mapping.hpp
@@ -252,7 +252,7 @@ private:
const std::string& _eth0,
const std::string& _lo,
const net::MAC& _hostMAC,
- const net::IPNetwork& _hostIPNetwork,
+ const net::IP::Network& _hostIPNetwork,
const size_t _hostEth0MTU,
const net::IP& _hostDefaultGateway,
const routing::Handle& _hostTxFqCodelHandle,
@@ -315,7 +315,7 @@ private:
const std::string eth0;
const std::string lo;
const net::MAC hostMAC;
- const net::IPNetwork hostIPNetwork;
+ const net::IP::Network hostIPNetwork;
const size_t hostEth0MTU;
const net::IP hostDefaultGateway;
const routing::Handle hostTxFqCodelHandle;
http://git-wip-us.apache.org/repos/asf/mesos/blob/ee7e7c79/src/tests/containerizer/port_mapping_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/port_mapping_tests.cpp b/src/tests/containerizer/port_mapping_tests.cpp
index 16e015a..84b39b1 100644
--- a/src/tests/containerizer/port_mapping_tests.cpp
+++ b/src/tests/containerizer/port_mapping_tests.cpp
@@ -243,8 +243,8 @@ protected:
cleanup(eth0, lo);
// Get host IP address.
- Result<net::IPNetwork> hostIPNetwork =
- net::IPNetwork::fromLinkDevice(eth0, AF_INET);
+ Result<net::IP::Network> hostIPNetwork =
+ net::IP::Network::fromLinkDevice(eth0, AF_INET);
ASSERT_SOME(hostIPNetwork)
<< "Failed to retrieve the host public IP network from " << eth0 << ": "