Re: No error is returned to user if system settings plugin fails connection update



On Wed, Nov 24, 2010 at 7:04 AM, Dan Williams <dcbw redhat com> wrote:
> On Sat, 2010-11-20 at 15:48 +0300, Andrey Borzenkov wrote:
>> 1) if plugin fails to write connection to stable store (for whatever
>> reasons) NM is left with old, cached, connection that was received fro
>> client. It makes impression that connection update worked (and it even
>> will work for as long as either NM is restarted or connection is
>> re-read again from disk). The reason is,
>> src/system-settings/nm-sysconfig-connection.c:pk_update_cb() first
>> updates in memory and then calls to save new definition. It is even
>> documented in comments :)
>>
>>         /* Update our settings internally so the update() call will save the new
>>          * ones.
>>
>> But if ->update fails, settings are not rolled back.
>>
>> It could be possible; we could add old_connection field to PolkitCall
>> and use it to rollback in con_update_cb. Any potential issues
>> associated with it?
>
> Yeah, we could do that, and hopefully return an error to the client that
> called update() in the first place.
>

Error is already returned; patch for review is sent in separate message.

>> 2) NM core does send proper error via D-Bus to nm-connection-editor,
>> but it simply does not have code to display them. On update it finally
>> calls connection_updated_cb() and it does not display anything (nor is
>> any error displayed on callback chain).
>
> Yeah, we should do better here.  I thought we had an error dialog that
> popped up for stuff like this?  The code there is somewhat convoluted,
> but ideally we'd notify the user that an error occurred.
>

Unfortunately this is beyond my knowledge :)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]