Skip to content

Commit

Permalink
fix orchestrator startup crash in DualStack cluster
Browse files Browse the repository at this point in the history
In a cluster where `.Env.HOSTNAME` resolves to an IPv6 address, the
orchestrator fails to start due to a syntax error in the raft bind
address. This was reported here:
bitpoke#929

This commit fixes this, at least for DualStack clusters, by using
`.Env.POD_IP` instead, which is defined as

```yaml
- name: POD_IP
  valueFrom:
    fieldRef:
      apiVersion: v1
      fieldPath: status.podIP
```

and thus typically points to an IPv4 address in DualStack clusters.
For a general fix, the orchestrator code itself probably needs to
be modified to correctly handle the bind hostname.
  • Loading branch information
haslersn committed Oct 9, 2024
1 parent 37c6410 commit 8e0ddc9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Removed
### Fixed
* Avoid set read_only conflict when graceful takeover
* Fix orchestrator startup crash in DualStack cluster

## [0.6.3] - 2023-05-22

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{{- $_ := set $conf "RaftEnabled" true }}
{{- $_ := set $conf "RaftDataDir" "/var/lib/orchestrator" }}
{{- $_ := set $conf "RaftAdvertise" "{{ .Env.HOSTNAME }}-orc-svc" }}
{{- $_ := set $conf "RaftBind" "{{ .Env.HOSTNAME }}"}}
{{- $_ := set $conf "RaftBind" "{{ .Env.POD_IP }}"}}
{{- $_ := set $conf "HTTPAdvertise" "http://{{ .Env.HOSTNAME }}-orc-svc:80" }}
{{- if eq 1 $replicas -}}
{{- $_ := set $conf "RaftNodes" (list) }}
Expand Down
2 changes: 1 addition & 1 deletion deploy/charts/mysql-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ orchestrator:
# - SQLite3DataFile /var/lib/orchestrator/orc.db
# - RaftEnabled true
# - RaftDataDir /var/lib/orchestrator
# - RaftBind $HOSTNAME
# - RaftBind $POD_IP
# - RaftNodes The statefullset members
config:
Debug: false
Expand Down

0 comments on commit 8e0ddc9

Please sign in to comment.