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

ALS GET /health returns a 200 OK when status is DOWN #2014

Closed
1 task done
lewisdaly opened this issue Feb 9, 2021 · 1 comment
Closed
1 task done

ALS GET /health returns a 200 OK when status is DOWN #2014

lewisdaly opened this issue Feb 9, 2021 · 1 comment
Assignees
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it
Milestone

Comments

@lewisdaly
Copy link
Contributor

lewisdaly commented Feb 9, 2021

Summary:
On the ALS, GET /health returns a 200 OK when status is DOWN.

This is an issue because K8s won't try and recreate the pod since it uses the status code to determine the health of pods

Severity:
(Low, Medium, High)

Priority:
(Critical, Medium, Low)

Expected Behavior

Steps to Reproduce

  1. Start the ALS with a database
  2. stop the database
  3. call the health check:
$ curl -v -X GET $ELB_URL/account-lookup-service-admin/health                                                                             558ms  Tue 09 Feb 2021 14:48:02
Note: Unnecessary use of -X or --request, GET is already inferred.
*   Trying 3.10.62.177:80...
* Connected to affbc062e827c49c0a47dc1cf8f1ed70-2138950192.eu-west-2.elb.amazonaws.com (3.10.62.177) port 80 (#0)
> GET /account-lookup-service-admin/health HTTP/1.1
> Host: affbc062e827c49c0a47dc1cf8f1ed70-2138950192.eu-west-2.elb.amazonaws.com
> User-Agent: curl/7.74.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx/1.19.2
< Date: Tue, 09 Feb 2021 04:19:01 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 155
< Connection: keep-alive
< cache-control: no-cache
< accept-ranges: bytes
< 
* Connection #0 to host affbc062e827c49c0a47dc1cf8f1ed70-2138950192.eu-west-2.elb.amazonaws.com left intact
{"status":"DOWN","uptime":1301.536941157,"startTime":"2021-02-09T04:19:00.356Z","versionNumber":"11.1.2","services":[{"name":"datastore","status":"DOWN"}]}⏎  

Observe that the response is 200 OK, even though there is no database connected.

Specifications

  • Component (if known): core services
  • Version: 11.1.2
  • Platform: AWS
  • Subsystem: ALS, Health
  • Type of testing: Manual
  • Bug found/raised by: @lewisdaly

PR:

Notes:

  • Severity when opened:
  • Priority when opened:
@lewisdaly lewisdaly added the bug label Feb 9, 2021
@elnyry-sam-k elnyry-sam-k added the oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it label Feb 9, 2021
@shashi165 shashi165 self-assigned this Feb 9, 2021
@elnyry-sam-k
Copy link
Member

Thanks for quickly fixing this @shashi165 ; I think its worth ensuring this behavior on other core services as well (quoting service, central ledger, settlement services, as well)

@elnyry-sam-k elnyry-sam-k added this to the Sprint 13.1 milestone Feb 10, 2021
@elnyry-sam-k elnyry-sam-k added the bug Something isn't working or it has wrong behavior on a Mojaloop Core service label Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or it has wrong behavior on a Mojaloop Core service oss-core This is an issue - story or epic related to a feature on a Mojaloop core service or related to it
Projects
None yet
Development

No branches or pull requests

3 participants