Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unnecesary domain validation #2996

Closed
8 of 18 tasks
wkalbar opened this issue Feb 28, 2022 · 3 comments
Closed
8 of 18 tasks

[BUG] Unnecesary domain validation #2996

wkalbar opened this issue Feb 28, 2022 · 3 comments
Assignees
Labels
source/jira This task origins from internal JIRA type/bug

Comments

@wkalbar
Copy link

wkalbar commented Feb 28, 2022

Describe the bug
There is hostname_domain_extension validation set to: ^[a-zA-Z0-9.-]{0,20}$
With our domain it let us space only for 5 chars for subdomain.

How to reproduce
Steps to reproduce the behavior:

  1. execute epicli init ... (with params)
  2. edit config file and set hostname_domain_extension to value longer than 20 chars
  3. execute epicli apply ...

Expected behavior
Change validation to at last ^[a-zA-Z0-9.-]{0,25}$. If this limitation is caused by whole VM name, please change kubernetes in VM name to k8s (kubernetes-master is the longest name in whole cluster).

Config files
n/a

Environment

  • Cloud provider: Azure

epicli version: 1.0.2

Additional context
n/a


DoD checklist

  • Changelog
    • updated
    • not needed
  • COMPONENTS.md
    • updated
    • not needed
  • Schema
    • updated
    • not needed
  • Backport tasks
    • created
    • not needed
  • Documentation
    • added
    • updated
    • not needed
  • Feature has automated tests
  • Automated tests passed (QA pipelines)
    • apply
    • upgrade
    • backup/restore
  • Idempotency tested
  • All conversations in PR resolved
@rafzei rafzei added the source/jira This task origins from internal JIRA label Feb 28, 2022
@rafzei
Copy link
Contributor

rafzei commented Mar 3, 2022

@seriva there is any requirement to have this 20chars limitation?

@przemyslavic
Copy link
Collaborator

@rafzei I guess it is more complex. Linux host name cannot exceed 64 characters in length.

ERROR cli.engine.terraform.TerraformCommand - Error: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidParameter" Message="Linux host name cannot exceed 64 characters in length or contain the following characters: ` ~ ! @ # $ % ^ & * ( ) = + _ [ ] { } \\ | ; : ' \" , < > / ?." Target="computerName"

We allow prefix to be 2-8 characters and cluster name 3-20.
Consider the opendistro component:
prefix - cluster name - component name - vm - x
12345678-12345678901234567890-opendistro-for-elasticsearch-vm-0
It is already 63 characters long without domain extension.
It strictly depends on the chosen cluster name, prefix and components used.

Maybe it would be better to turn off the validation and then Azure API will return an error if the limit is exceeded.

@wkalbar
Copy link
Author

wkalbar commented Mar 4, 2022

Please consider change kubernetes into k8s in kubernetes node/master VM names. It'll cut 7 chars from longest names in cluster (and you can then limit component name to 15 instead of 20, and then domain name can be 25 instead 20 (for example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source/jira This task origins from internal JIRA type/bug
Projects
None yet
Development

No branches or pull requests

5 participants