You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2016/07/08 20:53:52 UTC
mesos git commit: Moved veth related functions to a separate file.
Repository: mesos
Updated Branches:
refs/heads/master 877e5d7b8 -> 1cbfdc3c1
Moved veth related functions to a separate file.
This is part of the effort to allow linking with a lower version of
libnl. veth related functions were introduced in libnl 3.2.24.
However, most of the popular Linux distributions use 3.2.21.
Review: https://reviews.apache.org/r/49773
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/1cbfdc3c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/1cbfdc3c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/1cbfdc3c
Branch: refs/heads/master
Commit: 1cbfdc3c1e4b8498a67f8531ab264003c8c19fb1
Parents: 877e5d7
Author: Jie Yu <yu...@gmail.com>
Authored: Thu Jul 7 14:11:37 2016 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Fri Jul 8 13:53:39 2016 -0700
----------------------------------------------------------------------
src/Makefile.am | 2 +
src/linux/routing/link/link.cpp | 29 ---------
src/linux/routing/link/link.hpp | 13 ----
src/linux/routing/link/veth.cpp | 63 ++++++++++++++++++++
src/linux/routing/link/veth.hpp | 45 ++++++++++++++
.../mesos/isolators/network/port_mapping.cpp | 3 +-
src/tests/containerizer/routing_tests.cpp | 55 ++++++++---------
7 files changed, 140 insertions(+), 70 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/1cbfdc3c/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 28dd151..599ebbe 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1111,6 +1111,7 @@ MESOS_NETWORK_ISOLATOR_FILES = \
linux/routing/filter/icmp.cpp \
linux/routing/filter/ip.cpp \
linux/routing/link/link.cpp \
+ linux/routing/link/veth.cpp \
linux/routing/queueing/fq_codel.cpp \
linux/routing/queueing/htb.cpp \
linux/routing/queueing/ingress.cpp \
@@ -1132,6 +1133,7 @@ MESOS_NETWORK_ISOLATOR_FILES += \
linux/routing/filter/priority.hpp \
linux/routing/link/internal.hpp \
linux/routing/link/link.hpp \
+ linux/routing/link/veth.hpp \
linux/routing/queueing/discipline.hpp \
linux/routing/queueing/fq_codel.hpp \
linux/routing/queueing/htb.hpp \
http://git-wip-us.apache.org/repos/asf/mesos/blob/1cbfdc3c/src/linux/routing/link/link.cpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/link/link.cpp b/src/linux/routing/link/link.cpp
index 3803d6f..96bd50e 100644
--- a/src/linux/routing/link/link.cpp
+++ b/src/linux/routing/link/link.cpp
@@ -28,8 +28,6 @@
#include <netlink/route/link.h>
-#include <netlink/route/link/veth.h>
-
#include <set>
#include <string>
#include <vector>
@@ -119,33 +117,6 @@ Try<bool> exists(const string& _link)
}
-Try<bool> create(
- const string& veth,
- const string& peer,
- const Option<pid_t>& pid)
-{
- Try<Netlink<struct nl_sock>> socket = routing::socket();
- if (socket.isError()) {
- return Error(socket.error());
- }
-
- int error = rtnl_link_veth_add(
- socket.get().get(),
- veth.c_str(),
- peer.c_str(),
- (pid.isNone() ? getpid() : pid.get()));
-
- if (error != 0) {
- if (error == -NLE_EXIST) {
- return false;
- }
- return Error(nl_geterror(error));
- }
-
- return true;
-}
-
-
Try<bool> remove(const string& _link)
{
Result<Netlink<struct rtnl_link>> link = internal::get(_link);
http://git-wip-us.apache.org/repos/asf/mesos/blob/1cbfdc3c/src/linux/routing/link/link.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/link/link.hpp b/src/linux/routing/link/link.hpp
index a4c92dc..35639af 100644
--- a/src/linux/routing/link/link.hpp
+++ b/src/linux/routing/link/link.hpp
@@ -19,8 +19,6 @@
#include <stdint.h>
-#include <sys/types.h>
-
#include <string>
#include <process/future.hpp>
@@ -53,17 +51,6 @@ Result<std::string> lo();
Try<bool> exists(const std::string& link);
-// Creates a pair of virtual network links. The peer link is put in
-// the network namespace represented by 'pid' upon creation if
-// specified. If 'pid' is None, the peer link will be put into
-// caller's network namespace. Returns false if the virtual network
-// links (with the same name) already exist.
-Try<bool> create(
- const std::string& veth,
- const std::string& peer,
- const Option<pid_t>& pid);
-
-
// Removes a link. Returns false if the link is not found.
Try<bool> remove(const std::string& link);
http://git-wip-us.apache.org/repos/asf/mesos/blob/1cbfdc3c/src/linux/routing/link/veth.cpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/link/veth.cpp b/src/linux/routing/link/veth.cpp
new file mode 100644
index 0000000..e12af9f
--- /dev/null
+++ b/src/linux/routing/link/veth.cpp
@@ -0,0 +1,63 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <unistd.h>
+
+#include <netlink/errno.h>
+
+#include <netlink/route/link/veth.h>
+
+#include <stout/error.hpp>
+
+#include "linux/routing/internal.hpp"
+
+#include "linux/routing/link/veth.hpp"
+
+using std::string;
+
+namespace routing {
+namespace link {
+namespace veth {
+
+Try<bool> create(
+ const string& veth,
+ const string& peer,
+ const Option<pid_t>& pid)
+{
+ Try<Netlink<struct nl_sock>> socket = routing::socket();
+ if (socket.isError()) {
+ return Error(socket.error());
+ }
+
+ int error = rtnl_link_veth_add(
+ socket.get().get(),
+ veth.c_str(),
+ peer.c_str(),
+ (pid.isNone() ? getpid() : pid.get()));
+
+ if (error != 0) {
+ if (error == -NLE_EXIST) {
+ return false;
+ }
+ return Error(nl_geterror(error));
+ }
+
+ return true;
+}
+
+} // namespace veth {
+} // namespace link {
+} // namespace routing {
http://git-wip-us.apache.org/repos/asf/mesos/blob/1cbfdc3c/src/linux/routing/link/veth.hpp
----------------------------------------------------------------------
diff --git a/src/linux/routing/link/veth.hpp b/src/linux/routing/link/veth.hpp
new file mode 100644
index 0000000..a4acbe9
--- /dev/null
+++ b/src/linux/routing/link/veth.hpp
@@ -0,0 +1,45 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef __LINUX_ROUTING_LINK_VETH_HPP__
+#define __LINUX_ROUTING_LINK_VETH_HPP__
+
+#include <sys/types.h>
+
+#include <string>
+
+#include <stout/option.hpp>
+#include <stout/try.hpp>
+
+namespace routing {
+namespace link {
+namespace veth {
+
+// Creates a pair of virtual network links. The peer link is put in
+// the network namespace represented by 'pid' upon creation if
+// specified. If 'pid' is None, the peer link will be put into
+// caller's network namespace. Returns false if the virtual network
+// links (with the same name) already exist.
+Try<bool> create(
+ const std::string& veth,
+ const std::string& peer,
+ const Option<pid_t>& pid);
+
+} // namespace veth {
+} // namespace link {
+} // namespace routing {
+
+#endif // __LINUX_ROUTING_LINK_VETH_HPP__
http://git-wip-us.apache.org/repos/asf/mesos/blob/1cbfdc3c/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 79ee960..92f3c07 100644
--- a/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
+++ b/src/slave/containerizer/mesos/isolators/network/port_mapping.cpp
@@ -70,6 +70,7 @@
#include "linux/routing/handle.hpp"
#include "linux/routing/link/link.hpp"
+#include "linux/routing/link/veth.hpp"
#include "linux/routing/queueing/fq_codel.hpp"
#include "linux/routing/queueing/htb.hpp"
@@ -2592,7 +2593,7 @@ Future<Nothing> PortMappingIsolatorProcess::isolate(
<< linker << "' -> '" << target << "'";
// Create a virtual ethernet pair for this container.
- Try<bool> createVethPair = link::create(veth(pid), eth0, pid);
+ Try<bool> createVethPair = link::veth::create(veth(pid), eth0, pid);
if (createVethPair.isError()) {
return Failure(
"Failed to create virtual ethernet pair: " +
http://git-wip-us.apache.org/repos/asf/mesos/blob/1cbfdc3c/src/tests/containerizer/routing_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/routing_tests.cpp b/src/tests/containerizer/routing_tests.cpp
index f329874..452a56d 100644
--- a/src/tests/containerizer/routing_tests.cpp
+++ b/src/tests/containerizer/routing_tests.cpp
@@ -47,6 +47,7 @@
#include "linux/routing/filter/ip.hpp"
#include "linux/routing/link/link.hpp"
+#include "linux/routing/link/veth.hpp"
#include "linux/routing/queueing/fq_codel.hpp"
#include "linux/routing/queueing/htb.hpp"
@@ -256,7 +257,7 @@ TEST_F(RoutingTest, INETSockets)
TEST_F(RoutingVethTest, ROOT_LinkCreate)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -265,13 +266,13 @@ TEST_F(RoutingVethTest, ROOT_LinkCreate)
EXPECT_SOME_NE(0, link::index(TEST_PEER_LINK));
// Test the case where the veth (with the same name) already exists.
- EXPECT_SOME_FALSE(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ EXPECT_SOME_FALSE(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
}
TEST_F(RoutingVethTest, ROOT_LinkRemove)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::remove(TEST_VETH_LINK));
EXPECT_SOME_FALSE(link::remove(TEST_VETH_LINK));
@@ -307,7 +308,7 @@ TEST_F(RoutingVethTest, ROOT_LinkCreatePid)
ASSERT_NE(-1, pid);
// In parent process.
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, pid));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, pid));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
// The peer should not exist in parent network namespace.
@@ -333,7 +334,7 @@ TEST_F(RoutingVethTest, ROOT_LinkWait)
{
AWAIT_READY(link::removed(TEST_VETH_LINK));
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -348,7 +349,7 @@ TEST_F(RoutingVethTest, ROOT_LinkWait)
TEST_F(RoutingVethTest, ROOT_LinkSetUp)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -368,7 +369,7 @@ TEST_F(RoutingVethTest, ROOT_LinkSetUp)
TEST_F(RoutingVethTest, ROOT_LinkSetMAC)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -399,7 +400,7 @@ TEST_F(RoutingVethTest, ROOT_LinkSetMAC)
TEST_F(RoutingVethTest, ROOT_LinkMTU)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -420,7 +421,7 @@ TEST_F(RoutingVethTest, ROOT_IngressQdisc)
// Test for a qdisc on a nonexistent interface should fail.
EXPECT_SOME_FALSE(ingress::exists("noSuchInterface"));
- EXPECT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ EXPECT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -484,7 +485,7 @@ TEST_F(RoutingVethTest, ROOT_HTBQdisc)
// Test for a qdisc on a nonexistent interface should fail.
EXPECT_SOME_FALSE(htb::exists("noSuchInterface", EGRESS_ROOT));
- EXPECT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ EXPECT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -568,7 +569,7 @@ TEST_F(RoutingVethTest, ROOT_FqCodeQdisc)
// Test for a qdisc on a nonexistent interface should fail.
EXPECT_SOME_FALSE(fq_codel::exists("noSuchInterface", EGRESS_ROOT));
- EXPECT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ EXPECT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -649,7 +650,7 @@ TEST_F(RoutingVethTest, ROOT_FqCodeQdisc)
TEST_F(RoutingVethTest, ROOT_FqCodelClassifier)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -725,7 +726,7 @@ TEST_F(RoutingVethTest, ROOT_FqCodelClassifier)
TEST_F(RoutingVethTest, ROOT_ARPFilterCreate)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -745,7 +746,7 @@ TEST_F(RoutingVethTest, ROOT_ARPFilterCreate)
TEST_F(RoutingVethTest, ROOT_ARPFilterCreateDuplicated)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -775,7 +776,7 @@ TEST_F(RoutingVethTest, ROOT_ARPFilterCreateDuplicated)
TEST_F(RoutingVethTest, ROOT_ARPFilterRemove)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -800,7 +801,7 @@ TEST_F(RoutingVethTest, ROOT_ARPFilterRemove)
TEST_F(RoutingVethTest, ROOT_ARPFilterUpdate)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -837,7 +838,7 @@ TEST_F(RoutingVethTest, ROOT_ARPFilterUpdate)
TEST_F(RoutingVethTest, ROOT_ICMPFilterCreate)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -869,7 +870,7 @@ TEST_F(RoutingVethTest, ROOT_ICMPFilterCreate)
TEST_F(RoutingVethTest, ROOT_ICMPFilterCreateDuplicated)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -902,7 +903,7 @@ TEST_F(RoutingVethTest, ROOT_ICMPFilterCreateDuplicated)
TEST_F(RoutingVethTest, ROOT_ICMPFilterCreateMultiple)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -938,7 +939,7 @@ TEST_F(RoutingVethTest, ROOT_ICMPFilterCreateMultiple)
TEST_F(RoutingVethTest, ROOT_ICMPFilterRemove)
{
- ASSERT_SOME(link::create(
+ ASSERT_SOME(link::veth::create(
TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
@@ -972,7 +973,7 @@ TEST_F(RoutingVethTest, ROOT_ICMPFilterRemove)
TEST_F(RoutingVethTest, ROOT_ICMPFilterUpdate)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -1028,7 +1029,7 @@ TEST_F(RoutingVethTest, ROOT_ICMPFilterUpdate)
TEST_F(RoutingVethTest, ROOT_IPFilterCreate)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -1086,7 +1087,7 @@ TEST_F(RoutingVethTest, ROOT_IPFilterCreate)
TEST_F(RoutingVethTest, ROOT_IPFilterCreate2)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -1121,7 +1122,7 @@ TEST_F(RoutingVethTest, ROOT_IPFilterCreate2)
TEST_F(RoutingVethTest, ROOT_IPFilterCreateDuplicated)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -1170,7 +1171,7 @@ TEST_F(RoutingVethTest, ROOT_IPFilterCreateDuplicated)
TEST_F(RoutingVethTest, ROOT_IPFilterCreateMultiple)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -1262,7 +1263,7 @@ TEST_F(RoutingVethTest, ROOT_IPFilterCreateMultiple)
TEST_F(RoutingVethTest, ROOT_IPFilterRemove)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));
@@ -1339,7 +1340,7 @@ TEST_F(RoutingVethTest, ROOT_IPFilterRemove)
// Test the workaround introduced for MESOS-1617.
TEST_F(RoutingVethTest, ROOT_HandleGeneration)
{
- ASSERT_SOME(link::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
+ ASSERT_SOME(link::veth::create(TEST_VETH_LINK, TEST_PEER_LINK, None()));
EXPECT_SOME_TRUE(link::exists(TEST_VETH_LINK));
EXPECT_SOME_TRUE(link::exists(TEST_PEER_LINK));