Bug 1525078

Summary: [NMCI]add MASTER=dev when creating bond directly with slaves in nmtui
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir Benes <vbenes>
Component: NetworkManagerAssignee: Beniamino Galvani <bgalvani>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: atragler, bgalvani, desktop-qa-list, fgiudici, lmiksik, lrintel, mleitner, rkhan, sukulkar, thaller
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-1.10.2-4.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1425409 Environment:
Last Closed: 2018-04-10 13:35:58 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: 1425409    
Bug Blocks:    
Attachments:
Description Flags
[PATCH] settings: clear unsaved flag on new settings-connection
none
[PATCH v2] settings: clear unsaved flag on new settings-connection none

Comment 4 Beniamino Galvani 2017-12-15 20:44:43 UTC
Created attachment 1368684 [details]
[PATCH] settings: clear unsaved flag on new settings-connection

Comment 5 Thomas Haller 2017-12-19 15:29:18 UTC
(In reply to Beniamino Galvani from comment #4)
> Created attachment 1368684 [details]
> [PATCH] settings: clear unsaved flag on new settings-connection

> We could add a new persist-mode enum, but let's keep it simple and
> just clear the flag after the update.


<thaller> regarding "settings: clear unsaved flag on new settings-connection"...
<thaller> maybe we should instead add a new persist-mode enum
<thaller> because, I added logging whenever the flags change (I think that is useful). but this results in two log messages that are noise.
<bengal> I was in doubt whether to add an enum and opted to clear the flag because it seemed simpler. But it's true that this results in two update messages...
<bengal> okay, i'll try to add an enum
<thaller> yes, the number of flags are already complicated enough... but I dislike the logging messages, and I also dislike a bit that temporarily the flags are in a wrong state (probably nobody cares, but update() is such a complex function, emitting a changed signals, it's not clear to me that nobody cares)

Comment 6 Beniamino Galvani 2017-12-20 09:00:36 UTC
Created attachment 1370350 [details]
[PATCH v2] settings: clear unsaved flag on new settings-connection

Comment 7 Thomas Haller 2017-12-20 12:20:30 UTC
(In reply to Beniamino Galvani from comment #6)
> Created attachment 1370350 [details]
> [PATCH v2] settings: clear unsaved flag on new settings-connection

Seem NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP_SAVED is not used anywhere. that is, it behaves exactly identical to NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP. 

Otherwise, the approach lgtm.

Comment 8 Beniamino Galvani 2017-12-20 12:32:21 UTC
(In reply to Thomas Haller from comment #7)
> (In reply to Beniamino Galvani from comment #6)
> > Created attachment 1370350 [details]
> > [PATCH v2] settings: clear unsaved flag on new settings-connection
> 
> Seem NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP_SAVED is not used anywhere.
> that is, it behaves exactly identical to
> NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP. 

They behave differently:

nm_settings_connection_update():
...
 if (   replaced
     && persist_mode == NM_SETTINGS_CONNECTION_PERSIST_MODE_KEEP)
 	set_persist_mode (self, NM_SETTINGS_CONNECTION_PERSIST_MODE_UNSAVED);
 else
  	set_persist_mode (self, persist_mode);


which means that KEEP can set the unsaved flag if the connection changed while KEEP_SAVED cannot.

Comment 9 Thomas Haller 2017-12-20 14:05:42 UTC
Right! LGTM then.

Comment 14 errata-xmlrpc 2018-04-10 13:35:58 UTC
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