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

Improve help for backend creation in case healthcheck is missing #1281

Closed
remyleone opened this issue Jul 21, 2020 · 0 comments · Fixed by #2689
Closed

Improve help for backend creation in case healthcheck is missing #1281

remyleone opened this issue Jul 21, 2020 · 0 comments · Fixed by #2689
Assignees
Labels
enhancement load-balancer Load-balancer issues, bugs and feature requests priority:high New features
Milestone

Comments

@remyleone
Copy link
Member

remyleone commented Jul 21, 2020

Description:

$ go run ./cmd/scw/main.go lb backend create lb-id=45a56fd8-841b-425a-a851-1be4ebf2352b forward-protocol=tcp forward-port=80 forward-port-algorithm=roundrobin sticky-sessions=none  -D
running: [/var/folders/sm/h3cw_xsj0279j12fnhv6bzd40000gn/T/go-build360822040/b001/exe/main lb backend create lb-id=45a56fd8-841b-425a-a851-1be4ebf2352b forward-protocol=tcp forward-port=80 forward-port-algorithm=roundrobin sticky-sessions=none -D]
client: using sdk version v1.0.0-beta.6+devclient: using sdk version v1.0.0-beta.6+devcould not validate arg value for 'health-check.mysql-config.user': invalid fieldName: HealthCheck.mysqlConfig.user: case is not handledcould not validate arg value for 'health-check.check-max-retries': invalid fieldName: HealthCheck.checkMaxRetries: case is not handledcould not validate arg value for 'health-check.pgsql-config.user': invalid fieldName: HealthCheck.pgsqlConfig.user: case is not handledcould not validate arg value for 'health-check.http-config.uri': invalid fieldName: HealthCheck.httpConfig.uri: case is not handledcould not validate arg value for 'health-check.http-config.method': invalid fieldName: HealthCheck.httpConfig.method: case is not handledcould not validate arg value for 'health-check.http-config.code': invalid fieldName: HealthCheck.httpConfig.code: case is not handledcould not validate arg value for 'health-check.https-config.uri': invalid fieldName: HealthCheck.httpsConfig.uri: case is not handledcould not validate arg value for 'health-check.https-config.method': invalid fieldName: HealthCheck.httpsConfig.method: case is not handledcould not validate arg value for 'health-check.https-config.code': invalid fieldName: HealthCheck.httpsConfig.code: case is not handledcould not validate arg value for 'health-check.port': invalid fieldName: HealthCheck.port: case is not handledcould not validate arg value for 'health-check.check-timeout': invalid fieldName: HealthCheck.checkTimeout: case is not handledcould not validate arg value for 'health-check.check-delay': invalid fieldName: HealthCheck.checkDelay: case is not handledcreating POST request on https://api.scaleway.com/lb/v1/regions/fr-par/lbs/45a56fd8-841b-425a-a851-1be4ebf2352b/backends
--------------- Scaleway SDK REQUEST 1 : ---------------
POST /lb/v1/regions/fr-par/lbs/45a56fd8-841b-425a-a851-1be4ebf2352b/backends HTTP/1.1
Host: api.scaleway.com
User-Agent: scaleway-sdk-go/v1.0.0-beta.6+dev (go1.15; darwin; amd64) scaleway-cli/2.0.0+dev
Content-Length: 392
Content-Type: application/json
X-Auth-Token: 7cc91c3f-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Accept-Encoding: gzip

{"name":"cli-lbb-sharp-ganguly","forward_protocol":"tcp","forward_port":80,"forward_port_algorithm":"roundrobin","sticky_sessions":"none","sticky_sessions_cookie_name":"","health_check":null,"server_ip":null,"send_proxy_v2":false,"on_marked_down_action":"on_marked_down_action_none","proxy_protocol":"proxy_protocol_unknown","timeout_server":null,"timeout_connect":null,"timeout_tunnel":null}
---------------------------------------------------------
--------------- Scaleway SDK RESPONSE 1 : ---------------
HTTP/2.0 400 Bad Request
Content-Length: 152
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
Content-Type: application/json
Date: Thu, 03 Sep 2020 16:20:01 GMT
Server: Scaleway API-Gateway
Strict-Transport-Security: max-age=63072000
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Request-Id: c39bf229-a7b2-43b9-9389-560adef02fd2

{"details":[{"field":"health_check","message":"health_check must not be nil","reason":"unknown"}],"message":"Invalid parameters","type":"invalid_field"}
----------------------------------------------------------Invalid parameters
skipping check version
telemetry successfully sent
exit status 1

How to reproduce:

Command attempted

Expected Behavior

Actual Behavior

More info

Version

Version 2.0.0+dev
BuildDate unknown
GoVersion go1.14.5
GitBranch unknown
GitCommit unknown
GoArch amd64
GoOS darwin

@remyleone remyleone added bug load-balancer Load-balancer issues, bugs and feature requests labels Jul 21, 2020
@jerome-quere jerome-quere added this to the v2.1.0 milestone Jul 22, 2020
@remyleone remyleone modified the milestones: v2.1.0, v2.3.0 Nov 5, 2020
@remyleone remyleone assigned yfodil and unassigned Codelax Oct 28, 2022
@yfodil yfodil linked a pull request Dec 22, 2022 that will close this issue
@remyleone remyleone added the priority:high New features label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement load-balancer Load-balancer issues, bugs and feature requests priority:high New features
Projects
None yet
4 participants