Bug 1454883
| Summary: | [RFE] extend D-Bus API to better export active connection state | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Thomas Haller <thaller> |
| Component: | NetworkManager | Assignee: | Thomas Haller <thaller> |
| Status: | CLOSED ERRATA | QA Contact: | Desktop QE <desktop-qa-list> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.5 | CC: | aloughla, atragler, bgalvani, fgiudici, lrintel, rkhan, sukulkar, thaller, vbenes |
| Target Milestone: | rc | Keywords: | FutureFeature |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-04-10 13:24:24 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1470965 | ||
|
Description
Thomas Haller
2017-05-23 16:54:34 UTC
pleas review th/activation-state-flags-rh1454883 (In reply to Thomas Haller from comment #2) > pleas review th/activation-state-flags-rh1454883 Looks good to me. @@ -1219,17 +1241,25 @@ constructed (GObject *object)
G_OBJECT_CLASS (nm_active_connection_parent_class)->constructed (object);
- if (!priv->applied_connection && priv->settings_connection)
+ if ( !priv->applied_connection
+ && priv->settings_connection)
priv->applied_connection = nm_simple_connection_new_clone (NM_CONNECTION (priv->settings_connection));
- if (priv->applied_connection)
- nm_connection_clear_secrets (priv->applied_connection);
-
_LOGD ("constructed (%s, version-id %llu, type %s)",
G_OBJECT_TYPE_NAME (self),
(unsigned long long) priv->version_id,
nm_activation_type_to_string (priv->activation_type));
+ if (priv->applied_connection) {
+ /* priv->applied_connection was set during the construction of the object.
+ * It's not yet fully initialized, so do that now.
+ *
+ * We delayed that, because we may log in _set_applied_connection_take(), and the
+ * first logging line should be "constructed" above). */
+ _set_applied_connection_take (self,
+ g_steal_pointer (&priv->applied_connection));
If we call the constructed method and priv->applied_connection is already set, we will end failing _set_applied_connection_take as it does:
nm_assert (!priv->applied_connection);
rest looks good
(In reply to Francesco Giudici from comment #4) > @@ -1219,17 +1241,25 @@ constructed (GObject *object) > > [...] > + g_steal_pointer (&priv->applied_connection)); I was wrong: there is a g_steal_pointer there, so the assert in _set_applied_connection_take will be true. Sorry. Branch lgtm Merged to master: https://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=2a63bbfb789819562e352928aba8cd16e0c0d0ee Automated checks added for bond master/slave and ethernet devices. Will be executed on a daily bases. Automated for CI, working well in 7.5 for both bond master/slave and ethernet devices. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0778 |