ubuntuone-syncdaemon fails to connect when policy prevents it from contacting network-manager

Bug #1062051 reported by Vincent Ladeuil
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Single Sign On Client
Status tracked in Trunk
Stable-4-2
Fix Released
Undecided
Unassigned
Trunk
Fix Released
High
Alejandro J. Cura
ubuntu-sso-client (Ubuntu)
Fix Released
Undecided
Unassigned
Raring
Fix Released
Undecided
Unassigned

Bug Description

When doing tests via ssh on a virtual machine (i.e. not connecting via the GUI), using a dedicated dbus sessions (aka via 'dbus-launch'), nm-tool reports 'State: unknown'.
'u1sdtool --connect' then fails to connect.

Stopping the network-manager allows 'u1sdtool --connect' to succeed but is a bit of a big hammer.

This was debugged on IRC with rye who asked me to file this bug.

More details from me or rye on demand ;)

Related branches

Roman Yepishev (rye)
summary: - u1sdtool fails to connect when network-manager report unknown state
+ ubuntuone-syncdaemon fails to connect when policy prevents it from
+ contacting network-manager
Revision history for this message
Roman Yepishev (rye) wrote :

    def got_error(self, error):
        """Called by DBus when the state is retrieved from NM."""
        if isinstance(error, self.dbus.exceptions.DBusException) and \
                error.get_dbus_name() == DBUS_UNKNOWN_SERVICE:
            logger.debug("Network Manager not present")
            # Assuming since Network Manager is not installed,
            # the user has connected in some other way
            self.call_result_cb(ONLINE)
        else:
            logger.error("Error contacting NetworkManager: %s" %
                             str(error))
            self.call_result_cb(UNKNOWN)

This code assumes that the only case we get error from network manager is when it is not running.
However, if we don't satisfy "at_console" policy condition (e.g. logging in from SSH) then SD will receive an error which is not DBUS_UNKNOWN_SERVICE. How about setting ONLINE state on any error?

Revision history for this message
Alejandro J. Cura (alecu) wrote : Re: [Bug 1062051] Re: ubuntuone-syncdaemon fails to connect when policy prevents it from contacting network-manager

On Fri, Oct 5, 2012 at 7:31 AM, Roman Yepishev
<email address hidden> wrote:
> How about setting ONLINE state on any error?

+1 Sounds reasonable.

Changed in ubuntuone-client:
assignee: nobody → Alejandro J. Cura (alecu)
importance: Undecided → High
Leo Arias (elopio)
tags: added: desktop+ syncdaemon
Revision history for this message
Jonn Wallfält (jonn-wallfalt) wrote :

Ahh I've been having this issue, thx Roman.

dobey (dobey)
affects: ubuntuone-client → ubuntu-sso-client
Changed in ubuntu-sso-client (Ubuntu Raring):
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-sso-client - 4.1.0-0ubuntu1

---------------
ubuntu-sso-client (4.1.0-0ubuntu1) raring; urgency=low

  * New upstream release.
    - Default to ONLINE when NM state check results in error. (LP: #1062051)
    - Switch static code checks to pyflakes.
  * debian/control:
    - Require pyflakes instead of pylint.
 -- Rodney Dawes <email address hidden> Mon, 10 Dec 2012 15:52:30 -0500

Changed in ubuntu-sso-client (Ubuntu Raring):
status: Triaged → Fix Released
Revision history for this message
Jonn Wallfält (jonn-wallfalt) wrote :

Is this fix applicable for 12.04 LTS?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.