Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-5290

mender-connect does not reconnect on ServerURL changes

    XMLWordPrintable

    Details

    • Sprint:
      MEN Sprint 152, MEN Sprint 153
    • Backlog:
      yes
    • Days in progress:
      11

      Description

      mender-connect obtains Mender server JWT and URL via D-Bus API

      mender-connect logic to detect if a reconnect is needed relies only on the length of the JWT token being > 0, which means that:

      • It will not trigger a re-connect on changes to ServerURL
      • It will not trigger a re-connect on changes to the JWT token itself

      See:

      It can easily be triggered by manually restarting mender-client service few times after mender-connect has already established the websocket connection.

      We suspect that this is the cause for TestAccessEnterprise::test_upgrades to sometimes hang forever waiting for mender-connect to re-connect. See sample log here.

      Note that this bug was present already before MEN-5216 and affects currently released versions of mender-connect. However before MEN-5216 the scenarios when this would affect the user are very few.

      Acceptance criteria:

      • Bug is fixed
      • New integration test
        • checking that mender-connect reconnects when JWT returned over D-Bus changes
        • checking that mender-connect reconnects when ServerURL changes
        • checking that mender-connect reconnects when both ServerURL and JWT change

        Attachments

          Activity

            People

            Assignee:
            oleorhagen Ole Petter Orhagen
            Reporter:
            lluis LluĂ­s Campos
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: