Re: Change in UUID format breaks connections on upgrades



On Thu, 2013-09-05 at 14:56 -0600, Daniel Drake wrote:
Hi,

I am working with a large OLPC deployment in Nicaragua performing a
software upgrade. The previous software release included
NetworkManager-0.9.4.0 and the new one includes
NetworkManager-0.9.8.1.

After performing the upgrade, NetworkManager does not connect to any
of the wireless networks that it used to. The files are still there in
/etc/NetworkManager/system-connections, but it is like they are
ignored.

Looking in the logs:

keyfile: parsing FZT_Cisco_AP
Connection failed to verify: (unknown)
keyfile: error: invalid or missing connection property
'NMSettingConnection/uuid'

It looks like at some point, NM has changed its UUID format, and has
stopped accepting the old one, which is like this:
uuid=f43bec2cdd60e5da381ebb1eb1fa39f3cc52660c

Would it be possible to relax this check so that compatibility is retained?

I would be happy to send in a patch that tweaks nm_utils_is_uuid() accordingly.

Looks like 74b6b9c768338ce3cd58d781fd837e6abbf3e209 is to blame;
previously the function didn't count the number of dashes, but now it
does.  I guess I'd be fine with changing the check at the end of
nm_utils_is_uuid() to:

if ((num_dashes == 4) && (p - str == 36))
        return TRUE;
/* Backwards compat for older configurations */
if ((num_dashes == 0) && (p - str == 32))
        return TRUE;
return FALSE;

It also wouldn't hurt to have a testcase in
libnm-util/tests/test-general.c that creates a new NMSettingConnection
and sets the UUID to the old format and ensures that nm_setting_verify()
still works.

Dan



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