Use hostname for report-host instead of ip in ipv6 environments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Router Charm |
In Progress
|
Undecided
|
Unassigned |
Bug Description
Deploying the charm in an ipv6 only environment fails during bootstrap, saying that the report host option is invalid.
Juju logs:
unit-vault-
unit-vault-
The official docs state "Before 8.0.23, validation checked the hostname string for illegal characters where only alphanumeric, '-', '.', and '_' characters were allowed. For example, this meant that IPv6 addresses were not allowed."
Though I don't see this behavior:
ubuntu@
MySQL Router Ver 8.0.36-
ubuntu@
Error: Option --report-host has an invalid value.
ubuntu@
Error: Option --report-host has an invalid value.
ubuntu@
Error: Option --report-host has an invalid value.
ubuntu@
Error: Option --report-host has an invalid value.
I'll eventually submit a bug to mysql devs, meanwhile I fixed this by using charmhelpers get_hostname which in my MAAS environment successfully returns a valid hostname and the router is able to bootstrap.
I thought it could be a good idea to check the version and use the hostname if it's <8.0.23, but since it seems broken also on >8.0.23 maybe we can put a warning that deploying "will" fail in case we can't find a valid hostname?
Fix proposed to branch: master /review. opendev. org/c/openstack /charm- mysql-router/ +/916114
Review: https:/