Skip to content

Commit

Permalink
Refactoring for #1182
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin committed Jul 6, 2022
1 parent 0bcf87a commit ffaf38d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions otoroshi/app/cluster/cluster.scala
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ case class RegionalLocation(
datacenter: String,
rack: String
) {
def desc: String = s"provider: '${provider}', region: '${region}', zone: '${zone}', datacenter: '${datacenter}', rack: ${rack}"
def json: JsValue = Json.obj(
"provider" -> provider,
"zone" -> zone,
Expand Down Expand Up @@ -1761,6 +1762,7 @@ class ClusterAgent(config: ClusterConfig, env: Env) {
if (env.clusterConfig.regionalRouting.enabled) {
Cluster.logger.warn("regional routing is enabled !")
Cluster.logger.warn("be aware that this feature is EXPERIMENTAL and might not work as expected.")
Cluster.logger.info(s"this instance is located at: ${env.clusterConfig.regionalRouting.location.desc}")
}
}

Expand Down
2 changes: 1 addition & 1 deletion otoroshi/app/next/proxy/zones.scala
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ case class SelectedLeader(member: MemberView, route: NgRoute, counter: AtomicInt
}
val uriStr = s"$url/api/cluster/relay"
val uri = Uri(uriStr)
env.Ws.urlWithTarget(uriStr, Target(
env.Ws.akkaUrlWithTarget(uriStr, Target(
host = uri.authority.toString(),
scheme = uri.scheme,
protocol = HttpProtocols.`HTTP/1.1`,
Expand Down

0 comments on commit ffaf38d

Please sign in to comment.