diff options
author | Thomas Haller <thaller@redhat.com> | 2013-09-30 19:50:50 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2013-10-01 11:18:13 +0200 |
commit | d11f41a8a09cf7f81c49d962ce2187b426c98a4b (patch) | |
tree | b91f0309894ac3ee8726f78ff1973b3f38a826e4 | |
parent | f767e05f4a6477fcc3b972362385990a6b9cd9c2 (diff) | |
download | NetworkManager-d11f41a8a09cf7f81c49d962ce2187b426c98a4b.tar.gz |
team: fix wrong assertion in device-team
The assertion that priv->teamd_pid is set does not hold.
For example, if no teamd binary can be found, "Stage 1 of 5 (Device
Prepare)" fails with "Activation (nm-team) to start teamd: not found".
This causes the device state to become "failed" and later
"disconnected", which in turn calls teamd_stop without a valid teamd_pid
set.
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r-- | src/devices/nm-device-team.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/devices/nm-device-team.c b/src/devices/nm-device-team.c index db16465254..e93dfcfa67 100644 --- a/src/devices/nm-device-team.c +++ b/src/devices/nm-device-team.c @@ -473,9 +473,13 @@ teamd_start (NMDevice *dev, NMSettingTeam *s_team, NMDeviceTeamPrivate *priv) static void teamd_stop (NMDevice *dev, NMDeviceTeamPrivate *priv) { - g_return_if_fail (priv->teamd_pid > 0); - nm_log_info (LOGD_TEAM, "Deactivation (%s) stopping teamd...", - nm_device_get_ip_iface (dev)); + if (priv->teamd_pid > 0) { + nm_log_info (LOGD_TEAM, "Deactivation (%s) stopping teamd...", + nm_device_get_ip_iface (dev)); + } else { + nm_log_dbg (LOGD_TEAM, "Deactivation (%s) stopping teamd (not started)...", + nm_device_get_ip_iface (dev)); + } teamd_cleanup (dev); } |