Skip to content

Not clear error message for hash-based misconfigured route #4971

@b1tamara

Description

@b1tamara

Issue

Tried to deploy an application manifest with different routes using per-route option loadbalancing = hash. If the hash-related options are misconfigured for some route, the returned error doesn't tell which route is misconfigured.

Context

The issue is related to the implementation of Implement Hash-Based Routing Support in Cloud Controller

cf push
Pushing app proxy-app to org o / space s as admin...
Applying manifest file [...]/proxy/manifest.yml...

Updating with these attributes...
  ---
  applications:
+ - name: proxy-app
    disk-quota: 64M
    memory: 32M
+   default-route: true
+   buildpacks:
+   - go_buildpack
+   env:
+     GOPACKAGENAME: proxy
+     GOVERSION: go1.25
+   routes:
+   - options:
+       hash_balance: 1.25
+       hash_header: meow
+       loadbalancing: hash
+     route: hash.apps.pcf.tasonvsphere.com
+   - options:
+       loadbalancing: hash
+     route: hash-invalid.apps.pcf.tasonvsphere.com
+   - options:
+       hash_balance: 1.25
+       loadbalancing: hash
+     route: hash-no-header.apps.pcf.tasonvsphere.com
+   - options:
+       hash_header: meow
+       loadbalancing: hash
+     route: hash-no-balance.apps.pcf.tasonvsphere.com
+   - options:
+       hash_balance: 0
+       hash_header: meow
+       loadbalancing: hash
+     route: hash-balance-zero.apps.pcf.tasonvsphere.com
+   - options:
+       loadbalancing: least-connection
+     route: lc.apps.pcf.tasonvsphere.com

It rendered the app manifest and started doing some work before returning the error.

Steps to Reproduce

No response

Expected Result

The expected result would be something like:

  • For application 'proxy-app': Route 'hash-invalid.apps.pcf.tasonvsphere.com': Hash header must be present when loadbalancing is set to hash.
  • For application 'proxy-app': Route 'hash-no-header.apps.pcf.tasonvsphere.com': Hash header must be present when loadbalancing is set to hash.

Current Result

The returned error doesn't tell which route is misconfigured.

For application 'proxy-app': Hash header must be present when loadbalancing is set to hash.
FAILED

Possible Fix

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions