Uploaded image for project: 'Marathon'
  1. Marathon
  2. MARATHON-7210

ipv6 compat: marathon incorrect assumes ipv4 when joining host and port strings

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Won't Do
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Networking
    • Labels:

      Description

      IPv6 addresses use a colon separator instead of a dot. Code that's compatible with both ipv4 and ipv6 stacks should exercise care when, for example, creating URL strings comprised of IP addresses that may or may not include colon characters.

      Preliminary list of suspect code in Marathon code: 

      src/main/scala/mesosphere/util/state/MesosLeaderInfo.scala:33:    leaderUrl = Some(s"http://${master.getHostname}:${master.getPort}/")
      src/main/scala/mesosphere/marathon/MarathonSchedulerDriver.scala:40:      frameworkInfoBuilder.setWebuiUrl(s"https://${config.hostname()}:${httpConfig.httpsPort()}")
      src/main/scala/mesosphere/marathon/MarathonSchedulerDriver.scala:43:      frameworkInfoBuilder.setWebuiUrl(s"http://${config.hostname()}:${httpConfig.httpPort()}")
      src/main/scala/mesosphere/marathon/DebugConf.scala:106:            appender.addDestination(s"${destination.getHost}:${destination.getPort}")
      src/main/scala/mesosphere/marathon/DebugConf.scala:112:            appender.addDestination(s"${destination.getHost}:${destination.getPort}")
      src/main/scala/mesosphere/marathon/ZookeeperConf.scala:90:  val ZKUrlPattern = s"""^zk://(?:($user):($pass)@)?($hostAndPort(?:,$hostAndPort)*)(/$zkNode(?:/$zkNode)*)$$""".r
      src/main/scala/mesosphere/marathon/io/storage/Storage.scala:100:  val HDFS = "^(hdfs://[^/]+)(.*)$".r // hdfs://host:port/path
      src/main/scala/mesosphere/marathon/io/storage/Storage.scala:115:          s"http://${config.hostname.get.get}:${http.httpPort.get.get}/v2/artifacts",
      src/main/scala/mesosphere/marathon/MarathonModule.scala:136:    "%s:%d".format(conf.hostname(), port)
      src/main/scala/mesosphere/marathon/api/EndpointsHelper.scala:46:                  s"${instance.agentInfo.host}:$taskPort"
      src/main/scala/mesosphere/marathon/core/readiness/ReadinessCheckExecutor.scala:70:              s"$schema://$host:$port${checkDef.path}"
      src/main/scala/mesosphere/marathon/core/health/impl/HealthCheckWorkerActor.scala:93:    val url = s"http://$host:$port$absolutePath"
      src/main/scala/mesosphere/marathon/core/health/impl/HealthCheckWorkerActor.scala:120:    val address = s"$host:$port"
      src/main/scala/mesosphere/marathon/core/health/impl/HealthCheckWorkerActor.scala:143:    val url = s"https://$host:$port$absolutePath"
      
      src/test/scala/mesosphere/marathon/integration/setup/ForwarderService.scala:184:        myHostPort = if (conf.disableHttp()) s"localhost:${conf.httpsPort()}" else s"localhost:${conf.httpPort()}", src/test/scala/mesosphere/marathon/integration/setup/AppMockFacade.scala:29:    val url = s"$scheme://$host:$port$uri"
      src/test/scala/mesosphere/marathon/integration/setup/ServiceMockFacade.scala:18:  private val baseUrl = s"http://${task.host}:${task.ports.map(_.head).get}"
      

        Attachments

          Activity

            People

            • Assignee:
              nikitamelkozerov Nikita Melkozerov
              Reporter:
              jdef James DeFelice
              Team:
              Orchestration Team
              Watchers:
              Avinash Sridharan (Inactive), James DeFelice, Johannes Unterstein, Matthias Eichstedt
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: