Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

append namespace to dns name in REPLICATION_GROUP_SEEDS #246

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adrianNEMO
Copy link

This could fix issue #244
Signed-off-by: Adrian Brennig [email protected]

Copy link

@prydie prydie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @db-adrian!

Unfortunately the change requires a little more work due to the limitation that InnoDB cluster member hostnames must be shorter than 61 characters (see: MySQL Bug #90601).

Currently we validate that the length of the MySQL Cluster resource name is no greater than 28 characters as we address members by {cluster name}-{ordinal}.{cluster name}. This will need to be changed to instead check that {cluster name}-{ordinal}.{cluster name}.{namespace} is no longer than 60 characters.

Finally we'll need a mechanism to ensure validation does not fail for clusters created with the existing version of the MySQL operator and to test that the changes don't impact existing clusters (e.g. what happens if {cluster name}-0.{cluster name}.{namespace} for an existing cluster is greater than 60 characters in length).

Related validation code:

func validateClusterMetadata(m metav1.ObjectMeta, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
allErrs = append(allErrs, validateName(m.Name, fldPath.Child("name"))...)
return allErrs
}
func validateName(name string, fldPath *field.Path) field.ErrorList {
allErrs := field.ErrorList{}
if len(name) > ClusterNameMaxLen {
msg := fmt.Sprintf("longer than maximum supported length %d (see: https://bugs.mysql.com/bug.php?id=90601)", ClusterNameMaxLen)
allErrs = append(allErrs, field.Invalid(fldPath, name, msg))
}
return allErrs
}

Additionally, you'll need to sign the Oracle Contributor Agreement so we can merge your changes once we've got the above ironed out. Do let me know if you've already done so and I'll chase internally to get it processed.

Thanks again!

@prydie prydie added bug oracle-cla: no Contributor has not yet signed the Oracle Contributor Licence Agreement labels Dec 15, 2018
- remove Println in getReplicationGroupSeeds
Signed-off-by: Adrian Brennig <[email protected]>
@adrianNEMO
Copy link
Author

I understand. Thank you for explaining the problem. I have signed the Oracle Contributor Agreement.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug oracle-cla: no Contributor has not yet signed the Oracle Contributor Licence Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants