summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Klimeš <jklimes@redhat.com>2014-06-11 12:38:07 +0200
committerJiří Klimeš <jklimes@redhat.com>2014-06-23 15:20:27 +0200
commita78386b6d1a3d62063aa039d4ee9eba77c04a284 (patch)
tree09e6562540af727b28e7d87df5ccddf3103d2857
parent4ece719bebd84fbcc61f5adb88d112575601b1c1 (diff)
downloadNetworkManager-a78386b6d1a3d62063aa039d4ee9eba77c04a284.tar.gz
team: start teamd when ensuring team connection else teamdctl_connect() fails
Check if teamd is already running before trying to connect, else it would fail anyway with errors: libteamdctl: teamdctl_connect: Failed to connect using all CLIs. NetworkManager[5535]: <error> [1402495644.226625] [devices/nm-device-team.c:208] ensure_teamd_connection(): (TTT): failed to connect to teamd (err=-22) # ip link set name TTT type team
-rw-r--r--src/devices/nm-device-team.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/devices/nm-device-team.c b/src/devices/nm-device-team.c
index c04b14b40b..29fb881836 100644
--- a/src/devices/nm-device-team.c
+++ b/src/devices/nm-device-team.c
@@ -53,6 +53,8 @@ G_DEFINE_TYPE (NMDeviceTeam, nm_device_team, NM_TYPE_DEVICE)
#define NM_TEAM_ERROR (nm_team_error_quark ())
+static gboolean teamd_start (NMDevice *dev, NMSettingTeam *s_team);
+
typedef struct {
#if WITH_TEAMDCTL
struct teamdctl *tdc;
@@ -226,7 +228,8 @@ update_connection (NMDevice *device, NMConnection *connection)
g_object_set (G_OBJECT (s_team), NM_SETTING_TEAM_CONFIG, NULL, NULL);
#if WITH_TEAMDCTL
- if (ensure_teamd_connection (device)) {
+ teamd_start (device, s_team);
+ if (NM_DEVICE_TEAM_GET_PRIVATE (device)->teamd_pid > 0 && ensure_teamd_connection (device)) {
const char *config = NULL;
int err;
@@ -503,9 +506,8 @@ teamd_start (NMDevice *dev, NMSettingTeam *s_team)
#endif
priv->teamd_timeout)
{
- /* FIXME g_assert that this never hits. For now, be more reluctant, and try to recover. */
- g_warn_if_reached ();
- teamd_cleanup (dev, FALSE);
+ /* Just return if teamd_start() was already called */
+ return TRUE;
}
teamd_binary = teamd_paths;