Skip to content

Conversation

gianlucaborello
Copy link

Since the container image always does the bootstrap when it starts, we can end up in a situation where the container is restarted while it preserves its previous hostname (e.g. container restarted in a Kubernetes pod). This causes the bootstrap process to fail, because Router will already find an
entry matching the existing hostname inside the mysql_innodb_cluster_metadata.hosts table, so it will fail with:

Error: It appears that a router instance named '' has been previously
configured in this host. If that instance no longer exists, use the --force
option to overwrite it.

It seems the only sensible option to be resilient to this sort of failure is to bootstrap with --force, so that the registration can be properly reclaimed.

Since the container image always does the bootstrap when it starts, we can
end up in a situation where the container is restarted while it preserves
its previous hostname (e.g. container restarted in a Kubernetes pod). This
causes the bootstrap process to fail, because Router will already find an
entry matching the existing hostname inside the
mysql_innodb_cluster_metadata.hosts table, so it will fail with:

Error: It appears that a router instance named '' has been previously
configured in this host. If that instance no longer exists, use the --force
option to overwrite it.

It seems the only sensible option to be resilient to this sort of failure
is to bootstrap with --force, so that the registration can be properly
reclaimed.

Signed-off-by: Gianluca Borello <g.borello@gmail.com>
@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment:
"I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Thanks

@neumayer
Copy link

I agree.
I think you still must copy paste the disclaimer.
Other than that I've pulled your change and will add it to the release version.

Thanks for looking at this.

@gianlucaborello
Copy link
Author

I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Thanks

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow
bug http://bugs.mysql.com/bug.php?id=92867 for updates.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants