basebuilder_pel7ppc64bebuilder0
7 years ago
5 changed files with 711 additions and 0 deletions
@ -0,0 +1,159 @@ |
|||||||
|
From efaa6ae709bb4b59efacb0bb7301be2242b058bc Mon Sep 17 00:00:00 2001 |
||||||
|
Message-Id: <efaa6ae709bb4b59efacb0bb7301be2242b058bc.1518205291.git.mleitner@redhat.com> |
||||||
|
From: Xin Long <lucien.xin@gmail.com> |
||||||
|
Date: Fri, 20 Oct 2017 12:35:07 +0800 |
||||||
|
Subject: [PATCH 1/3] teamd: add port_hwaddr_changed for ab runner |
||||||
|
|
||||||
|
This patch to fix an events processing race issue when adding two ports |
||||||
|
into one team dev with ab mode with same_all hwaddr policy: |
||||||
|
|
||||||
|
team0 original hwaddr: 00:00:00:00:00:0a |
||||||
|
port1 original hwaddr: 00:00:00:00:00:01 |
||||||
|
port2 original hwaddr: 00:00:00:00:00:02 |
||||||
|
|
||||||
|
There are two sockets in teamd: nl_cli.sock_event for ifinfo updates |
||||||
|
and nl_sock_event for ports/options changes. During adding two ports, |
||||||
|
the events on these two sockets could be: |
||||||
|
|
||||||
|
nl_sock_event: |
||||||
|
[1] -- [2] -- |
||||||
|
|
||||||
|
[1]: port1 added event (added by enslaving port1) |
||||||
|
[2]: port2 added event (added by enslaving port2) |
||||||
|
|
||||||
|
nl_cli.sock_event: |
||||||
|
[a1] -- [b0] -- [c1] -- [d2] -- [e2] -- [f1] -- |
||||||
|
|
||||||
|
[a1]: port1 ifinfo event (added by setting port1's master) |
||||||
|
[b0]: team0 ifinfo event (added by setting team0's hwaddr) |
||||||
|
[c1]: port1 ifinfo event (added by set port1's hwaddr) |
||||||
|
[d2]: port2 ifinfo event (added by set port2's master) |
||||||
|
[e2]: port2 ifinfo event (added by set port2's hwaddr) |
||||||
|
[f1]: port1 ifinfo event (added by set port1's hwaddr) |
||||||
|
|
||||||
|
teamd can make sure the order for their processing is as above on the |
||||||
|
same socket, but not between two sockets. So if these events processing |
||||||
|
order is (monitoring team/ports' ifinfo, hwaddr, master): |
||||||
|
|
||||||
|
[ 1]: team0->ifinfo = 00:00:00:00:00:0a |
||||||
|
team0->hwaddr = 00:00:00:00:00:01 |
||||||
|
port1->hwaddr = 00:00:00:00:00:0a |
||||||
|
[a1]: port1->ifinfo = 00:00:00:00:00:01 |
||||||
|
port1->master = team0 |
||||||
|
[ 2]: port2->ifinfo = 00:00:00:00:00:02 |
||||||
|
port2->hwaddr = 00:00:00:00:00:0a |
||||||
|
(team0->ifinfo is not updated, it's still 00:00:00:00:00:0a) |
||||||
|
[b0]: team0->ifinfo = 00:00:00:00:00:01 |
||||||
|
port1->hwaddr = 00:00:00:00:00:01 |
||||||
|
(port2->master is not yet set, port2->hwaddr couldn't be updated) |
||||||
|
[c1]: no changes |
||||||
|
[d2]: port2->ifinfo = 00:00:00:00:00:0a |
||||||
|
port2->master = team0 |
||||||
|
(too late !!!) |
||||||
|
[e2]: no changes |
||||||
|
[f1]: no changes |
||||||
|
|
||||||
|
Then: |
||||||
|
team0 final hwaddr: 00:00:00:00:00:01 |
||||||
|
port1 final hwaddr: 00:00:00:00:00:01 |
||||||
|
port2 final hwaddr: 00:00:00:00:00:0a <----- issue |
||||||
|
|
||||||
|
This patch is to add port_hwaddr_changed for ab runner, in [e2] where |
||||||
|
we set it's hwaddr with team0 (port2->hwaddr = 00:00:00:00:00:01) IF |
||||||
|
port2->hwaddr != team0->ifinfo. |
||||||
|
|
||||||
|
I think the same issue also exists in lacp and lb mode for which I will |
||||||
|
fix them in another patches. |
||||||
|
|
||||||
|
v1 -> v2: |
||||||
|
fix some typos in changelog and couple of style problems in codes |
||||||
|
|
||||||
|
Reported-by: Jon Nikolakakis <jnikolak@redhat.com> |
||||||
|
Signed-off-by: Xin Long <lucien.xin@gmail.com> |
||||||
|
Signed-off-by: Jiri Pirko <jiri@mellanox.com> |
||||||
|
Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com> |
||||||
|
--- |
||||||
|
teamd/teamd_runner_activebackup.c | 39 +++++++++++++++++++++++++++++++++++++++ |
||||||
|
1 file changed, 39 insertions(+) |
||||||
|
|
||||||
|
diff --git a/teamd/teamd_runner_activebackup.c b/teamd/teamd_runner_activebackup.c |
||||||
|
index aec3a73d5ff61534c377b935fe0e5bc1f51af79d..8a3447f1a63d71055eb7a8784cbe96381ee2b451 100644 |
||||||
|
--- a/teamd/teamd_runner_activebackup.c |
||||||
|
+++ b/teamd/teamd_runner_activebackup.c |
||||||
|
@@ -39,6 +39,8 @@ struct ab_hwaddr_policy { |
||||||
|
const char *name; |
||||||
|
int (*hwaddr_changed)(struct teamd_context *ctx, |
||||||
|
struct ab *ab); |
||||||
|
+ int (*port_hwaddr_changed)(struct teamd_context *ctx, struct ab *ab, |
||||||
|
+ struct teamd_port *tdport); |
||||||
|
int (*port_added)(struct teamd_context *ctx, struct ab *ab, |
||||||
|
struct teamd_port *tdport); |
||||||
|
int (*active_set)(struct teamd_context *ctx, struct ab *ab, |
||||||
|
@@ -95,6 +97,26 @@ static int ab_hwaddr_policy_same_all_hwaddr_changed(struct teamd_context *ctx, |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
||||||
|
+static int |
||||||
|
+ab_hwaddr_policy_same_all_port_hwaddr_changed(struct teamd_context *ctx, |
||||||
|
+ struct ab *ab, |
||||||
|
+ struct teamd_port *tdport) |
||||||
|
+{ |
||||||
|
+ int err; |
||||||
|
+ |
||||||
|
+ if (!memcmp(team_get_ifinfo_hwaddr(tdport->team_ifinfo), |
||||||
|
+ ctx->hwaddr, ctx->hwaddr_len)) |
||||||
|
+ return 0; |
||||||
|
+ |
||||||
|
+ err = team_hwaddr_set(ctx->th, tdport->ifindex, ctx->hwaddr, |
||||||
|
+ ctx->hwaddr_len); |
||||||
|
+ if (err) |
||||||
|
+ teamd_log_err("%s: Failed to set port hardware address.", |
||||||
|
+ tdport->ifname); |
||||||
|
+ |
||||||
|
+ return err; |
||||||
|
+} |
||||||
|
+ |
||||||
|
static int ab_hwaddr_policy_same_all_port_added(struct teamd_context *ctx, |
||||||
|
struct ab *ab, |
||||||
|
struct teamd_port *tdport) |
||||||
|
@@ -114,6 +136,7 @@ static int ab_hwaddr_policy_same_all_port_added(struct teamd_context *ctx, |
||||||
|
static const struct ab_hwaddr_policy ab_hwaddr_policy_same_all = { |
||||||
|
.name = "same_all", |
||||||
|
.hwaddr_changed = ab_hwaddr_policy_same_all_hwaddr_changed, |
||||||
|
+ .port_hwaddr_changed = ab_hwaddr_policy_same_all_port_hwaddr_changed, |
||||||
|
.port_added = ab_hwaddr_policy_same_all_port_added, |
||||||
|
}; |
||||||
|
|
||||||
|
@@ -411,6 +434,21 @@ static int ab_event_watch_hwaddr_changed(struct teamd_context *ctx, void *priv) |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
||||||
|
+static int ab_event_watch_port_hwaddr_changed(struct teamd_context *ctx, |
||||||
|
+ struct teamd_port *tdport, |
||||||
|
+ void *priv) |
||||||
|
+{ |
||||||
|
+ struct ab *ab = priv; |
||||||
|
+ |
||||||
|
+ if (!teamd_port_present(ctx, tdport)) |
||||||
|
+ return 0; |
||||||
|
+ |
||||||
|
+ if (ab->hwaddr_policy->port_hwaddr_changed) |
||||||
|
+ return ab->hwaddr_policy->port_hwaddr_changed(ctx, ab, tdport); |
||||||
|
+ |
||||||
|
+ return 0; |
||||||
|
+} |
||||||
|
+ |
||||||
|
static int ab_port_load_config(struct teamd_context *ctx, |
||||||
|
struct ab_port *ab_port) |
||||||
|
{ |
||||||
|
@@ -491,6 +529,7 @@ static int ab_event_watch_prio_option_changed(struct teamd_context *ctx, |
||||||
|
|
||||||
|
static const struct teamd_event_watch_ops ab_event_watch_ops = { |
||||||
|
.hwaddr_changed = ab_event_watch_hwaddr_changed, |
||||||
|
+ .port_hwaddr_changed = ab_event_watch_port_hwaddr_changed, |
||||||
|
.port_added = ab_event_watch_port_added, |
||||||
|
.port_link_changed = ab_event_watch_port_link_changed, |
||||||
|
.option_changed = ab_event_watch_prio_option_changed, |
||||||
|
-- |
||||||
|
2.14.3 |
||||||
|
|
@ -0,0 +1,66 @@ |
|||||||
|
From c42cc9955a93bc4bed65adf9a506f92b8df290d7 Mon Sep 17 00:00:00 2001 |
||||||
|
Message-Id: <c42cc9955a93bc4bed65adf9a506f92b8df290d7.1518205291.git.mleitner@redhat.com> |
||||||
|
In-Reply-To: <efaa6ae709bb4b59efacb0bb7301be2242b058bc.1518205291.git.mleitner@redhat.com> |
||||||
|
References: <efaa6ae709bb4b59efacb0bb7301be2242b058bc.1518205291.git.mleitner@redhat.com> |
||||||
|
From: Xin Long <lucien.xin@gmail.com> |
||||||
|
Date: Tue, 7 Nov 2017 12:33:36 +0800 |
||||||
|
Subject: [PATCH 3/3] teamd: add port_hwaddr_changed for lacp runner |
||||||
|
|
||||||
|
To fix the same issue fixed in commit efaa6ae709bb ("teamd: add |
||||||
|
port_hwaddr_changed for ab runner") for lacp runner, this patch |
||||||
|
is to add .port_hwaddr_changed for lacp runner as well. |
||||||
|
|
||||||
|
Signed-off-by: Xin Long <lucien.xin@gmail.com> |
||||||
|
Signed-off-by: Jiri Pirko <jiri@mellanox.com> |
||||||
|
Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com> |
||||||
|
--- |
||||||
|
teamd/teamd_runner_lacp.c | 26 ++++++++++++++++++++++++++ |
||||||
|
1 file changed, 26 insertions(+) |
||||||
|
|
||||||
|
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c |
||||||
|
index 1310f6737f6cf37b7d6fef0befb8c803178212bd..7b8f0a783cfd71aa3f8a89276f5b95bce2fc517a 100644 |
||||||
|
--- a/teamd/teamd_runner_lacp.c |
||||||
|
+++ b/teamd/teamd_runner_lacp.c |
||||||
|
@@ -1336,6 +1336,31 @@ static int lacp_event_watch_hwaddr_changed(struct teamd_context *ctx, |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
||||||
|
+static int lacp_event_watch_port_hwaddr_changed(struct teamd_context *ctx, |
||||||
|
+ struct teamd_port *tdport, |
||||||
|
+ void *priv) |
||||||
|
+{ |
||||||
|
+ struct lacp_port *lacp_port; |
||||||
|
+ struct lacp *lacp = priv; |
||||||
|
+ int err; |
||||||
|
+ |
||||||
|
+ if (!teamd_port_present(ctx, tdport)) |
||||||
|
+ return 0; |
||||||
|
+ |
||||||
|
+ if (!memcmp(team_get_ifinfo_hwaddr(tdport->team_ifinfo), |
||||||
|
+ ctx->hwaddr, ctx->hwaddr_len)) |
||||||
|
+ return 0; |
||||||
|
+ |
||||||
|
+ err = lacp_port_set_mac(ctx, tdport); |
||||||
|
+ if (err) |
||||||
|
+ return err; |
||||||
|
+ |
||||||
|
+ lacp_port = lacp_port_get(lacp, tdport); |
||||||
|
+ lacp_port_actor_system_update(lacp_port); |
||||||
|
+ |
||||||
|
+ return 0; |
||||||
|
+} |
||||||
|
+ |
||||||
|
static int lacp_event_watch_admin_state_changed(struct teamd_context *ctx, |
||||||
|
void *priv) |
||||||
|
{ |
||||||
|
@@ -1389,6 +1414,7 @@ static int lacp_event_watch_port_changed(struct teamd_context *ctx, |
||||||
|
|
||||||
|
static const struct teamd_event_watch_ops lacp_event_watch_ops = { |
||||||
|
.hwaddr_changed = lacp_event_watch_hwaddr_changed, |
||||||
|
+ .port_hwaddr_changed = lacp_event_watch_port_hwaddr_changed, |
||||||
|
.port_added = lacp_event_watch_port_added, |
||||||
|
.port_removed = lacp_event_watch_port_removed, |
||||||
|
.port_changed = lacp_event_watch_port_changed, |
||||||
|
-- |
||||||
|
2.14.3 |
||||||
|
|
@ -0,0 +1,58 @@ |
|||||||
|
From 0164b6a460728b3a1fd3feee9e2901f1b810cf24 Mon Sep 17 00:00:00 2001 |
||||||
|
Message-Id: <0164b6a460728b3a1fd3feee9e2901f1b810cf24.1518205291.git.mleitner@redhat.com> |
||||||
|
In-Reply-To: <efaa6ae709bb4b59efacb0bb7301be2242b058bc.1518205291.git.mleitner@redhat.com> |
||||||
|
References: <efaa6ae709bb4b59efacb0bb7301be2242b058bc.1518205291.git.mleitner@redhat.com> |
||||||
|
From: Xin Long <lucien.xin@gmail.com> |
||||||
|
Date: Tue, 7 Nov 2017 12:33:11 +0800 |
||||||
|
Subject: [PATCH 2/3] teamd: add port_hwaddr_changed for lb runner |
||||||
|
|
||||||
|
To fix the same issue fixed in commit efaa6ae709bb ("teamd: add |
||||||
|
port_hwaddr_changed for ab runner") for lb runner, this patch is |
||||||
|
to add .port_hwaddr_changed for lb runner as well. |
||||||
|
|
||||||
|
Signed-off-by: Xin Long <lucien.xin@gmail.com> |
||||||
|
Signed-off-by: Jiri Pirko <jiri@mellanox.com> |
||||||
|
Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com> |
||||||
|
--- |
||||||
|
teamd/teamd_runner_loadbalance.c | 23 +++++++++++++++++++++++ |
||||||
|
1 file changed, 23 insertions(+) |
||||||
|
|
||||||
|
diff --git a/teamd/teamd_runner_loadbalance.c b/teamd/teamd_runner_loadbalance.c |
||||||
|
index a1e21303455fde55763b57b898ac5aaeb21c4b61..b9bfc13895b1a47d3e5cf552e6c720601c475d97 100644 |
||||||
|
--- a/teamd/teamd_runner_loadbalance.c |
||||||
|
+++ b/teamd/teamd_runner_loadbalance.c |
||||||
|
@@ -87,8 +87,31 @@ static int lb_event_watch_hwaddr_changed(struct teamd_context *ctx, void *priv) |
||||||
|
return 0; |
||||||
|
} |
||||||
|
|
||||||
|
+static int lb_event_watch_port_hwaddr_changed(struct teamd_context *ctx, |
||||||
|
+ struct teamd_port *tdport, |
||||||
|
+ void *priv) |
||||||
|
+{ |
||||||
|
+ int err; |
||||||
|
+ |
||||||
|
+ if (!teamd_port_present(ctx, tdport)) |
||||||
|
+ return 0; |
||||||
|
+ |
||||||
|
+ if (!memcmp(team_get_ifinfo_hwaddr(tdport->team_ifinfo), |
||||||
|
+ ctx->hwaddr, ctx->hwaddr_len)) |
||||||
|
+ return 0; |
||||||
|
+ |
||||||
|
+ err = team_hwaddr_set(ctx->th, tdport->ifindex, ctx->hwaddr, |
||||||
|
+ ctx->hwaddr_len); |
||||||
|
+ if (err) |
||||||
|
+ teamd_log_err("%s: Failed to set port hardware address.", |
||||||
|
+ tdport->ifname); |
||||||
|
+ |
||||||
|
+ return err; |
||||||
|
+} |
||||||
|
+ |
||||||
|
static const struct teamd_event_watch_ops lb_port_watch_ops = { |
||||||
|
.hwaddr_changed = lb_event_watch_hwaddr_changed, |
||||||
|
+ .port_hwaddr_changed = lb_event_watch_port_hwaddr_changed, |
||||||
|
.port_added = lb_event_watch_port_added, |
||||||
|
.port_removed = lb_event_watch_port_removed, |
||||||
|
.port_link_changed = lb_event_watch_port_link_changed, |
||||||
|
-- |
||||||
|
2.14.3 |
||||||
|
|
@ -0,0 +1,48 @@ |
|||||||
|
From 45912ded9cb5166d8286a6a4fb53bfe9fffcd8a9 Mon Sep 17 00:00:00 2001 |
||||||
|
Message-Id: <45912ded9cb5166d8286a6a4fb53bfe9fffcd8a9.1518009078.git.mleitner@redhat.com> |
||||||
|
From: Xin Long <lucien.xin@gmail.com> |
||||||
|
Date: Wed, 11 Oct 2017 14:17:38 +0800 |
||||||
|
Subject: [PATCH] teamd: do not process lacpdu before the port ifinfo is set |
||||||
|
|
||||||
|
Now the port ifinfo will be set in obj_input_newlink when a RTM_NEWLINK |
||||||
|
event is received. |
||||||
|
|
||||||
|
But when a port is being added, if a lacpdu gets received on this port |
||||||
|
before the RTM_NEWLINK event, lacpdu_recv will process the packet with |
||||||
|
incorrect port ifinfo. |
||||||
|
|
||||||
|
In Patrick's case, as ifinfo->master_ifindex was 0, it would skip this |
||||||
|
port in teamd_for_each_tdport, which caused lacp_port->agg_lead not to |
||||||
|
be updated in lacp_switch_agg_lead. Later the lacp_port actor would go |
||||||
|
to a unexpected state. |
||||||
|
|
||||||
|
This patch is to avoid it by checking teamd_port_present in lacpdu_recv |
||||||
|
so that it would not process lacpdu before the port ifinfo is set. |
||||||
|
|
||||||
|
Reported-by: Patrick Talbert <ptalbert@redhat.com> |
||||||
|
Tested-by: Patrick Talbert <ptalbert@redhat.com> |
||||||
|
Signed-off-by: Xin Long <lucien.xin@gmail.com> |
||||||
|
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> |
||||||
|
Signed-off-by: Jiri Pirko <jiri@mellanox.com> |
||||||
|
Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com> |
||||||
|
--- |
||||||
|
teamd/teamd_runner_lacp.c | 3 +++ |
||||||
|
1 file changed, 3 insertions(+) |
||||||
|
|
||||||
|
diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c |
||||||
|
index 5601278696a9f263f6bfe71642b2db971c9314b9..1310f6737f6cf37b7d6fef0befb8c803178212bd 100644 |
||||||
|
--- a/teamd/teamd_runner_lacp.c |
||||||
|
+++ b/teamd/teamd_runner_lacp.c |
||||||
|
@@ -1075,6 +1075,9 @@ static int lacpdu_recv(struct lacp_port *lacp_port) |
||||||
|
if (err <= 0) |
||||||
|
return err; |
||||||
|
|
||||||
|
+ if (!teamd_port_present(lacp_port->ctx, lacp_port->tdport)) |
||||||
|
+ return 0; |
||||||
|
+ |
||||||
|
if (!lacpdu_check(&lacpdu)) { |
||||||
|
teamd_log_warn("malformed LACP PDU came."); |
||||||
|
return 0; |
||||||
|
-- |
||||||
|
2.14.3 |
||||||
|
|
@ -0,0 +1,380 @@ |
|||||||
|
Name: libteam |
||||||
|
Version: 1.27 |
||||||
|
Release: 4%{?dist} |
||||||
|
Summary: Library for controlling team network device |
||||||
|
Group: System Environment/Libraries |
||||||
|
License: LGPLv2+ |
||||||
|
URL: http://www.libteam.org |
||||||
|
Source: http://www.libteam.org/files/libteam-%{version}.tar.gz |
||||||
|
Patch1: libteam-teamd-do-not-process-lacpdu-before-the-port-ifinfo-i.patch |
||||||
|
Patch2: libteam-teamd-add-port_hwaddr_changed-for-ab-runner.patch |
||||||
|
Patch3: libteam-teamd-add-port_hwaddr_changed-for-lb-runner.patch |
||||||
|
Patch4: libteam-teamd-add-port_hwaddr_changed-for-lacp-runner.patch |
||||||
|
BuildRequires: jansson-devel |
||||||
|
BuildRequires: libdaemon-devel |
||||||
|
BuildRequires: libnl3-devel |
||||||
|
BuildRequires: python-devel |
||||||
|
BuildRequires: dbus-devel |
||||||
|
BuildRequires: swig |
||||||
|
BuildRequires: doxygen |
||||||
|
|
||||||
|
%description |
||||||
|
This package contains a library which is a user-space |
||||||
|
counterpart for team network driver. It provides an API |
||||||
|
to control team network devices. |
||||||
|
|
||||||
|
%package devel |
||||||
|
Group: Development/Libraries |
||||||
|
Summary: Libraries and header files for libteam development |
||||||
|
Requires: libteam = %{version}-%{release} |
||||||
|
|
||||||
|
%package doc |
||||||
|
Group: Documentation |
||||||
|
Summary: API documentation for libteam and libteamd |
||||||
|
Requires: libteam = %{version}-%{release} |
||||||
|
|
||||||
|
%package -n teamd |
||||||
|
Group: System Environment/Daemons |
||||||
|
Summary: Team network device control daemon |
||||||
|
Requires: libteam = %{version}-%{release} |
||||||
|
|
||||||
|
%package -n teamd-devel |
||||||
|
Group: Development/Libraries |
||||||
|
Summary: Libraries and header files for teamd development |
||||||
|
Requires: teamd = %{version}-%{release} |
||||||
|
|
||||||
|
%package -n python-libteam |
||||||
|
Group: Development/Libraries |
||||||
|
Summary: Team network device library bindings |
||||||
|
Requires: libteam = %{version}-%{release} |
||||||
|
|
||||||
|
%description devel |
||||||
|
The libteam-devel package contains the header files and libraries |
||||||
|
necessary for developing programs using libteam. |
||||||
|
|
||||||
|
%description doc |
||||||
|
This package contains libteam and libteamd API documentation |
||||||
|
|
||||||
|
%description -n teamd |
||||||
|
The teamd package contains team network device control daemon. |
||||||
|
|
||||||
|
%description -n teamd-devel |
||||||
|
The teamd-devel package contains the header files and libraries |
||||||
|
necessary for developing programs using libteamdctl. |
||||||
|
|
||||||
|
%description -n python-libteam |
||||||
|
The team-python package contains a module that permits applications |
||||||
|
written in the Python programming language to use the interface |
||||||
|
supplied by team network device library. |
||||||
|
|
||||||
|
This package should be installed if you want to develop Python |
||||||
|
programs that will manipulate team network devices. |
||||||
|
|
||||||
|
%define _hardened_build 1 |
||||||
|
|
||||||
|
%prep |
||||||
|
%autosetup -p1 |
||||||
|
|
||||||
|
# prepare example dir for -devel |
||||||
|
mkdir -p _tmpdoc1/examples |
||||||
|
cp -p examples/*.c _tmpdoc1/examples |
||||||
|
# prepare example dir for team-python |
||||||
|
mkdir -p _tmpdoc2/examples |
||||||
|
cp -p examples/python/*.py _tmpdoc2/examples |
||||||
|
chmod -x _tmpdoc2/examples/*.py |
||||||
|
|
||||||
|
%build |
||||||
|
%configure --disable-static |
||||||
|
make %{?_smp_mflags} |
||||||
|
make html |
||||||
|
cd binding/python |
||||||
|
python ./setup.py build |
||||||
|
|
||||||
|
%install |
||||||
|
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" |
||||||
|
find $RPM_BUILD_ROOT -name \*.la -delete |
||||||
|
rm -rf $RPM_BUILD_ROOT/%{_bindir}/team_* |
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d |
||||||
|
install -p teamd/dbus/teamd.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/ |
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_unitdir} |
||||||
|
install -p teamd/redhat/systemd/teamd@.service $RPM_BUILD_ROOT%{_unitdir} |
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts |
||||||
|
install -p -m 755 teamd/redhat/initscripts_systemd/network-scripts/ifup-Team $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts |
||||||
|
install -p -m 755 teamd/redhat/initscripts_systemd/network-scripts/ifdown-Team $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts |
||||||
|
install -p -m 755 teamd/redhat/initscripts_systemd/network-scripts/ifup-TeamPort $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts |
||||||
|
install -p -m 755 teamd/redhat/initscripts_systemd/network-scripts/ifdown-TeamPort $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts |
||||||
|
install -p -m 755 utils/bond2team $RPM_BUILD_ROOT%{_bindir}/bond2team |
||||||
|
cd binding/python |
||||||
|
python ./setup.py install --root $RPM_BUILD_ROOT -O1 |
||||||
|
|
||||||
|
%post -p /sbin/ldconfig |
||||||
|
|
||||||
|
%postun -p /sbin/ldconfig |
||||||
|
|
||||||
|
%files |
||||||
|
%doc COPYING |
||||||
|
%{_libdir}/libteam.so.* |
||||||
|
%{_bindir}/teamnl |
||||||
|
%{_mandir}/man8/teamnl.8* |
||||||
|
|
||||||
|
%files devel |
||||||
|
%doc COPYING _tmpdoc1/examples |
||||||
|
%{_includedir}/team.h |
||||||
|
%{_libdir}/libteam.so |
||||||
|
%{_libdir}/pkgconfig/libteam.pc |
||||||
|
|
||||||
|
%files doc |
||||||
|
%doc COPYING doc/api |
||||||
|
|
||||||
|
%files -n teamd |
||||||
|
%doc COPYING teamd/example_configs teamd/redhat/example_ifcfgs/ |
||||||
|
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/dbus-1/system.d/teamd.conf |
||||||
|
%config(noreplace) %attr(644,root,root) %{_unitdir}/teamd@.service |
||||||
|
%{_sysconfdir}/sysconfig/network-scripts/ifup-Team |
||||||
|
%{_sysconfdir}/sysconfig/network-scripts/ifdown-Team |
||||||
|
%{_sysconfdir}/sysconfig/network-scripts/ifup-TeamPort |
||||||
|
%{_sysconfdir}/sysconfig/network-scripts/ifdown-TeamPort |
||||||
|
%{_libdir}/libteamdctl.so.* |
||||||
|
%{_bindir}/teamd |
||||||
|
%{_bindir}/teamdctl |
||||||
|
%{_bindir}/bond2team |
||||||
|
%{_mandir}/man8/teamd.8* |
||||||
|
%{_mandir}/man8/teamdctl.8* |
||||||
|
%{_mandir}/man5/teamd.conf.5* |
||||||
|
%{_mandir}/man1/bond2team.1* |
||||||
|
|
||||||
|
%files -n teamd-devel |
||||||
|
%doc COPYING |
||||||
|
%{_includedir}/teamdctl.h |
||||||
|
%{_libdir}/libteamdctl.so |
||||||
|
%{_libdir}/pkgconfig/libteamdctl.pc |
||||||
|
|
||||||
|
%files -n python-libteam |
||||||
|
%doc COPYING _tmpdoc2/examples |
||||||
|
%{python_sitearch}/* |
||||||
|
|
||||||
|
%changelog |
||||||
|
* Fri Feb 9 2018 Marcelo Ricardo Leitner <mleitner@redhat.com> - 1.27-4 |
||||||
|
- Add port_hwaddr_changed for ab, lb and lacp runners [1499063] |
||||||
|
|
||||||
|
* Wed Feb 7 2018 Marcelo Ricardo Leitner <mleitner@redhat.com> - 1.27-3 |
||||||
|
- Added fix to only process LACPDU after port ifinfo is set [1493600] |
||||||
|
|
||||||
|
* Mon Aug 21 2017 Xin Long <lxin@redhat.com> - 1.27-2 |
||||||
|
- Updated to 1.27 [1445499 1440866 1486935] |
||||||
|
|
||||||
|
* Fri Mar 24 2017 Xin Long <lxin@redhat.com> - 1.25-5 |
||||||
|
- Added patch to escape some sensitive characters [1383997] |
||||||
|
- Added patch to check port link_up when a port is added for lb runner |
||||||
|
[1393430] |
||||||
|
|
||||||
|
* Wed Aug 17 2016 Marcelo Ricardo Leitner <mleitner@redhat.com> - 1.25-4 |
||||||
|
- Added patches to avoid hung on shutdown [1330550] |
||||||
|
- Added patch to fix an out-of-bound write with zero-length hardware |
||||||
|
address [1286840] |
||||||
|
|
||||||
|
* Thu Jun 23 2016 Marcelo Ricardo Leitner <mleitner@redhat.com> - 1.25-2 |
||||||
|
- Updated to 1.25 [1286840 1286063] |
||||||
|
- Added patch teamd-LACP-runner-does-not-set-Agg-bit-on-first-slav.patch [1347818] |
||||||
|
|
||||||
|
* Wed Jan 20 2016 Marcelo Ricardo Leitner <mleitner@redhat.com> - 1.23-1 |
||||||
|
- Updated to 1.23 [1286840 1273052] |
||||||
|
|
||||||
|
* Fri Dec 11 2015 Marcelo Ricardo Leitner <mleitner@redhat.com> - 1.22-1 |
||||||
|
- Updated to 1.22 [1286840] |
||||||
|
|
||||||
|
* Wed Dec 02 2015 Marcelo Ricardo Leitner <mleitner@redhat.com> - 1.17-6 |
||||||
|
- Added patch Fix sending duplicate LACP frames at the start [1267494] |
||||||
|
|
||||||
|
* Fri Sep 11 2015 Marcelo Ricardo Leitner <mleitner@redhat.com> - 1.17-5 |
||||||
|
- Added patch fixing typo on delay_up [1242628] |
||||||
|
|
||||||
|
* Tue Sep 01 2015 Xin Long <lxin@redhat.com> - 1.17-4 |
||||||
|
- Added patch change actor system value on team mac change in lacp [1253769] |
||||||
|
|
||||||
|
* Tue Sep 01 2015 Xin Long <lxin@redhat.com> - 1.17-3 |
||||||
|
- Added patch fixing the lack of hwaddr_changed for loadbalance mode [1255458] |
||||||
|
|
||||||
|
* Fri Aug 28 2015 Marcelo Ricardo Leitner <mleitner@redhat.com> - 1.17-2 |
||||||
|
- Added patch fixing select parameter [1257195] |
||||||
|
|
||||||
|
* Fri Apr 03 2015 Jiri Pirko <jpirko@redhat.com> - 1.17-1 |
||||||
|
- rebase to version 1.17 [1208418 1208414 1190102 1166863 1166864 1203611 1206483] |
||||||
|
|
||||||
|
* Wed Dec 17 2014 Jiri Pirko <jpirko@redhat.com> - 1.15-1 |
||||||
|
- rebase to version 1.15 [1116970 1173632] |
||||||
|
|
||||||
|
* Wed Nov 05 2014 Jiri Pirko <jpirko@redhat.com> - 1.14-1 |
||||||
|
- rebase to version 1.14 [1116970] |
||||||
|
|
||||||
|
* Wed Nov 05 2014 Jiri Pirko <jpirko@redhat.com> - 1.13-1 |
||||||
|
- rebase to version 1.13 [1116970 1160615] |
||||||
|
|
||||||
|
* Wed Aug 20 2014 Jiri Pirko <jpirko@redhat.com> - 1.12-1 |
||||||
|
- rebase to version 1.12 [1116970 1125296] |
||||||
|
|
||||||
|
* Thu Jul 31 2014 Jiri Pirko <jpirko@redhat.com> - 1.11-1 |
||||||
|
- rebase to version 1.11 [1116970 1072855 1082522 1082551 1085938 1086383 1089256 1090578 1092549] |
||||||
|
|
||||||
|
* Mon Mar 31 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-15 |
||||||
|
- teamdctl: unmess check_teamd_team_devname and fix double free there [1078099] |
||||||
|
|
||||||
|
* Fri Mar 28 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-14 |
||||||
|
- teamd_link_watch: allow to send ARP probes if no source_host is specified [1078993] |
||||||
|
- bond2team: do not guess source_host option [1079059] |
||||||
|
- teamd_link_watch: specify "missed_max" option default value [1079059] |
||||||
|
- man: correct type of "*_host" options [1078993] |
||||||
|
|
||||||
|
* Thu Mar 27 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-13 |
||||||
|
- teamdctl: add command for easy port presention checking [1081214] |
||||||
|
- initscripts: do not try to re-add port if it is already there [1081214] |
||||||
|
|
||||||
|
* Fri Mar 07 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-12 |
||||||
|
- libteamdctl: add notice for caller to do not modify [1072620] |
||||||
|
|
||||||
|
* Fri Mar 07 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-11 |
||||||
|
- usock: accept multiline message string parameters [1051517] |
||||||
|
|
||||||
|
* Wed Feb 26 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-10 |
||||||
|
- fix port handling when "take over" option is on [1070065] |
||||||
|
|
||||||
|
* Fri Feb 21 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-9 |
||||||
|
- spec: remove patch backup files |
||||||
|
|
||||||
|
* Fri Feb 21 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-8 |
||||||
|
- teamd: fixed couple comments [1067851] |
||||||
|
- teamd: update hwaddr when changing team's macaddr [1067851] |
||||||
|
- redhat: fix boolean types in example 2 [1067851] |
||||||
|
|
||||||
|
* Wed Feb 12 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-7 |
||||||
|
- initscripts: fix port up before master and port down after master [1062675] |
||||||
|
|
||||||
|
* Mon Feb 03 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-6 |
||||||
|
- lb: enable/disable port according to linkwatch state [1057223] |
||||||
|
|
||||||
|
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.9-5 |
||||||
|
- Mass rebuild 2014-01-24 |
||||||
|
|
||||||
|
* Thu Jan 23 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-4 |
||||||
|
- fix multilib [983267] |
||||||
|
|
||||||
|
* Tue Jan 21 2014 Jiri Pirko <jpirko@redhat.com> - 1.9-3 |
||||||
|
- man teamdctl: Minor improvements to style and language [1055940] |
||||||
|
- man teamd.conf: Minor improvements to style and language [1055940] |
||||||
|
- fix comment typo in ifdown-Team scripts [1035173] |
||||||
|
|
||||||
|
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.9-2 |
||||||
|
- Mass rebuild 2013-12-27 |
||||||
|
|
||||||
|
* Wed Nov 13 2013 Jiri Pirko <jpirko@redhat.com> - 1.9-1 |
||||||
|
- Rebase to 1.9 |
||||||
|
- libteamdctl: remove false lib dependencies |
||||||
|
- teamdctl: use new port config get function |
||||||
|
- libteamdctl: introduce support for port config get |
||||||
|
- libteamdctl: cache reply strings into list |
||||||
|
- teamd: introduce PortConfigDump control method |
||||||
|
- teamd: make teamd_get_port_by_ifname ifname argument const |
||||||
|
- Minor improvements to style and language. |
||||||
|
- do not install example binaries |
||||||
|
- minor man page(s) correction(s) and lintianisation |
||||||
|
- teamdctl: print error message if ifindex cannot be obtained |
||||||
|
- fix cflags path in pc files |
||||||
|
Resolves: rhbz#1028138 |
||||||
|
Resolves: rhbz#1013640 |
||||||
|
Resolves: rhbz#1029186 |
||||||
|
|
||||||
|
* Tue Aug 13 2013 Jiri Pirko <jpirko@redhat.com> - 1.8-1 |
||||||
|
- Rebase to 1.8 |
||||||
|
|
||||||
|
* Tue Jun 11 2013 Jiri Pirko <jpirko@redhat.com> - 1.3-1 |
||||||
|
- Update to 1.3 |
||||||
|
|
||||||
|
* Wed May 29 2013 Jiri Pirko <jpirko@redhat.com> - 1.2-1 |
||||||
|
- Update to 1.2 |
||||||
|
|
||||||
|
* Thu May 16 2013 Jiri Pirko <jpirko@redhat.com> - 1.1-1 |
||||||
|
- Update to 1.1 |
||||||
|
|
||||||
|
* Thu Jan 31 2013 Jiri Pirko <jpirko@redhat.com> - 1.0-1 |
||||||
|
- Update to 1.0 |
||||||
|
|
||||||
|
* Sun Jan 20 2013 Jiri Pirko <jpirko@redhat.com> - 0.1-27.20130110gitf16805c |
||||||
|
- Rebuilt for libnl3 |
||||||
|
|
||||||
|
* Sun Jan 20 2013 Kalev Lember <kalevlember@gmail.com> - 0.1-26.20130110gitf16805c |
||||||
|
- Rebuilt for libnl3 |
||||||
|
|
||||||
|
* Thu Jan 10 2013 Jiri Pirko <jpirko@redhat.com> - 0.1-25.20130110gitf16805c |
||||||
|
- Rebase to git commit f16805c |
||||||
|
|
||||||
|
* Wed Dec 12 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-24.20121212git01fe4bd |
||||||
|
- Rebase to git commit 01fe4bd |
||||||
|
|
||||||
|
* Thu Dec 06 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-23.20121206git659a848 |
||||||
|
- Rebase to git commit 659a848 |
||||||
|
|
||||||
|
* Thu Nov 22 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-22.20121122git18b6701 |
||||||
|
- Rebase to git commit 18b6701 |
||||||
|
|
||||||
|
* Thu Nov 15 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-21.20121115gitffb5267 |
||||||
|
- Rebase to git commit ffb5267 |
||||||
|
|
||||||
|
* Mon Nov 05 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-20.20121105git3b95b34 |
||||||
|
- Rebase to git commit 3b95b34 |
||||||
|
|
||||||
|
* Thu Oct 25 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-19.20121025git7fe7c72 |
||||||
|
- Rebase to git commit 7fe7c72 |
||||||
|
|
||||||
|
* Fri Oct 19 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-18.20121019git1a91059 |
||||||
|
- Rebase to git commit 1a91059 |
||||||
|
|
||||||
|
* Sun Oct 07 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-17.20121007git6f48751 |
||||||
|
- Rebase to git commit 6f48751 |
||||||
|
|
||||||
|
* Tue Sep 25 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-16.20120925gitcc5cddc |
||||||
|
- Rebase to git commit cc5cddc |
||||||
|
|
||||||
|
* Sun Sep 23 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-15.20120923git8448186 |
||||||
|
- Rebase to git commit 8448186 |
||||||
|
|
||||||
|
* Tue Sep 04 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-14.20120904gitbdcf72c |
||||||
|
- Rebase to git commit bdcf72c |
||||||
|
|
||||||
|
* Wed Aug 22 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-13.20120822gitc0d943d |
||||||
|
- Rebase to git commit c0d943d |
||||||
|
|
||||||
|
* Tue Aug 07 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-12.20120807git9fa4a96 |
||||||
|
- Rebase to git commit 9fa4a96 |
||||||
|
|
||||||
|
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-11.20120628gitca7b526 |
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild |
||||||
|
|
||||||
|
* Thu Jun 28 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-10.20120628gitca7b526 |
||||||
|
- Rebase to git commit ca7b526 |
||||||
|
|
||||||
|
* Wed Jun 27 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-9.20120627git96569f8 |
||||||
|
- Rebase to git commit 96569f8 |
||||||
|
|
||||||
|
* Wed Jun 27 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-8.20120627gitcd6b557 |
||||||
|
- Rebase to git commit cd6b557 |
||||||
|
|
||||||
|
* Wed Jun 20 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-7.20120620gita88fabf |
||||||
|
- Rebase to git commit a88fabf |
||||||
|
|
||||||
|
* Fri May 04 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-6.20120504git11e234a |
||||||
|
- Rebase to git commit 11e234a |
||||||
|
|
||||||
|
* Thu Apr 05 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-5.20120405gita82f8ac |
||||||
|
- Rebase to git commit a82f8ac |
||||||
|
|
||||||
|
* Tue Feb 21 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-4.20120221gitfe97f63 |
||||||
|
- Rebase to git commit fe97f63 |
||||||
|
|
||||||
|
* Mon Jan 30 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-3.20120130gitb5cf2a8 |
||||||
|
- Rebase to git commit b5cf2a8 |
||||||
|
|
||||||
|
* Wed Jan 25 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-2.20120125gita1718f8 |
||||||
|
- Rebase to git commit a1718f8 |
||||||
|
|
||||||
|
* Wed Jan 18 2012 Jiri Pirko <jpirko@redhat.com> - 0.1-1.20120113git302672e |
||||||
|
- Initial build. |
Loading…
Reference in new issue