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

az network front-door backend-pool backend add doesn't allow to specify empty value for backend host header value #17269

Closed
wasker opened this issue Mar 10, 2021 · 3 comments · Fixed by Azure/azure-cli-extensions#3394
Assignees
Labels
Milestone

Comments

@wasker
Copy link

wasker commented Mar 10, 2021

Describe the bug

Empty value of a backend host header parameter has a special meaning in AFD: if value is empty, the Host header will be populated with what came as part of the request. This is important when same backend pool is used by multiple frontends and needs to be able to know which domain had made the request.

It is possible to make the value blank in Azure Portal, but impossible to do so with az CLI.

To Reproduce

Explicitly specified empty value:

az network front-door backend-pool backend add --resource-group myrg --front-door-name myfd --pool-name DefaultBackendPool --address www.bing.com --backend-host-header "" --disabled true --http-port 80 --https-port 443 --priority 2 --weight 1

results in

{
  "address": "www.bing.com",
  "backendHostHeader": "www.bing.com",
  "enabledState": "Disabled",
  "httpPort": 80,
  "httpsPort": 443,
  "priority": 2,
  "privateEndpointStatus": null,
  "privateLinkAlias": null,
  "privateLinkApprovalMessage": null,
  "privateLinkLocation": null,
  "privateLinkResourceId": null,
  "weight": 1
}

No backend-host-header arg specified:

az network front-door backend-pool backend add --resource-group myrg --front-door-name myfd --pool-name DefaultBackendPool --address www.bing.com --disabled true --http-port 80 --https-port 443 --priority 2 --weight 1

results in

{
  "address": "www.bing.com",
  "backendHostHeader": "www.bing.com",
  "enabledState": "Disabled",
  "httpPort": 80,
  "httpsPort": 443,
  "priority": 2,
  "privateEndpointStatus": null,
  "privateLinkAlias": null,
  "privateLinkApprovalMessage": null,
  "privateLinkLocation": null,
  "privateLinkResourceId": null,
  "weight": 1
}

Expected behavior

If empty value is explicitly specified for the backend-host-header arg, it should be used instead of defaulting to the backend address.

Environment summary

{
  "azure-cli": "2.20.0",
  "azure-cli-core": "2.20.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "aks-preview": "0.5.5",
    "front-door": "1.0.11",
    "log-analytics": "0.2.1",
    "resource-graph": "1.1.0"
  }
}
@ghost ghost added needs-triage This is a new issue that needs to be triaged to the appropriate team. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 10, 2021
@yonzhan yonzhan added the Network az network vnet/lb/nic/dns/etc... label Mar 10, 2021
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Mar 10, 2021
@yonzhan yonzhan removed the question The issue doesn't require a change to the product in order to be resolved. Most issues start as that label Mar 10, 2021
@yonzhan yonzhan added this to the S184 milestone Mar 10, 2021
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 10, 2021

network

@msyyc
Copy link
Member

msyyc commented Mar 15, 2021

@yonzhan yonzhan modified the milestones: S184, S185 Mar 15, 2021
@msyyc
Copy link
Member

msyyc commented Mar 24, 2021

the issue could be fixed together with #17270

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

Successfully merging a pull request may close this issue.

4 participants