Details

    • Type: Task
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: testing
    • Labels:
      None

      Description

      In a test for DC/OS E2E at https://api.travis-ci.org/v3/job/541209789/log.txt I see:

          @retrying.retry(wait_fixed=2000,
                          retry_on_result=lambda r: r is False,
                          retry_on_exception=lambda _: False)
          def _wait_for_srouter_slaves_endpoints(self):
              # Get currently known agents. This request is served straight from
              # Mesos (no AdminRouter-based caching is involved).
              r = self.get('/mesos/master/slaves')
              assert r.status_code == 200
          
              data = r.json()
              # only check against the slaves we expect to be in the cluster
              # so we can check that cluster has returned after a failure
              # in which case will will have new slaves and dead slaves
              slaves_ids = sorted(x['id'] for x in data['slaves'] if x['hostname'] in self.all_slaves)
          
              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
      E           AssertionError
      

      We cannot debug this - at least we should print the response code and text.

      We have something similar to what I want in _wait_for_metronome:

              assert r.status_code == 200, "Expecting status code 200 for Metronome but got {} with body {}"\
                  .format(r.status_code, r.content)
      

        Attachments

          Activity

            People

            • Assignee:
              adamdangoor Adam Dangoor (Inactive)
              Reporter:
              adamdangoor Adam Dangoor (Inactive)
              Team:
              Dev Prod Team
              Watchers:
              Adam Dangoor (Inactive)
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: