Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-5298

Unset slave authenticator during tear-down of every test case that has authentication enabled.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • agent, test

    Description

      When Mesos agents are started with enabled authentication, the call process::http::authentication::setAuthenticator to enable the HTTP authenticator on libprocess level. This authenticator is never unset, which is fine for the general use case, because libprocess's lifetime is tied to the agent's lifetime.
      In a test fixture the situation is different, though. The lifetime of libprocess is tied to the lifetime of the fixture. As a consequence, a test case that wants to disable HTTP authentication of an agent needs to manually unset the authenticator as it already may have been set by a different test case of the fixture.
      The naive solution would be to add the unset call to cluster::Slave::~Slave but that could cause problems in test cases with multiple slaves. A better solution would be to unset the HTTP authenticator during the teardown of a test case that used agents with enabled HTTP authentication.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nfnt Jan Schlicht
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: