Uploaded image for project: 'DC/OS'
  1. DC/OS
  2. DCOS_OSS-5246

Test Utils - _wait_for_srouter_slaves_endpoints - 502 can be seen before 200

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: testing
    • Labels:
      None
    • Story Points:
      2
    • Include in Release Notes:
      No

      Description

      In DC/OS Test Utils we have:

      for slave_id in slaves_ids:
          # AdminRouter's slave endpoint internally uses cached Mesos
          # state data. That is, slave IDs of just recently joined
          # slaves can be unknown here. For those, this endpoint
          # returns a 404. Retry in this case, until this endpoint
          # is confirmed to work for all known agents.
          uri = '/slave/{}/slave%281%29/state'.format(slave_id)
          r = self.get(uri)
          if r.status_code == 404:
              return False
          assert r.status_code == 200, (
              'Expecting status code 200 for Mesos slave state but got '
              '{status_code} with body {content}'
          ).format(status_code=r.status_code, content=r.conte
      

      However, Tim Weidner and I have observed that this endpoint can return a 200 response after a 502 response has been returned.

      We expect that this happens when we do an upgrade where agents are restarted.
      In that case the route to the agent has worked before but suddenly doesn't
      until the agent comes back up. This routine should retry in that scenario.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                adamdangoor Adam Dangoor (Inactive)
                Reporter:
                adamdangoor Adam Dangoor (Inactive)
                Team:
                ( DO NOT USE ) Security Team
                Watchers:
                Adam Dangoor (Inactive)
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: