Project

General

Profile

Actions

Bug #30498

closed

API PING request return "status": "ok" even if there is a service in state failed

Added by Oleh Fedorenko over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1835122

Description of problem:

When requesting information in the API PING to check the status of the satellite on resources:

- GET /api/ping Shows status of Satellite system and it's subcomponents
- GET /api/statuses Shows status and version information of Satellite system and it's subcomponents
- GET /katello/api/ping Shows status of Katello system and it's subcomponents

Return Status "OK", and it shouldn't.

Version-Release number of selected component (if applicable):
Satellite 6.6 and 6.7

How reproducible:
Check API ping with a curl o accessing in a browser.

Steps to Reproduce:

---Sat 6.7---
  1. curl --request GET --insecure --user sat_username:sat_password https://satellite.example.com/api/statuses | python -m json.tool
  2. curl --request GET --insecure --user sat_username:sat_password https://satellite.example.com/api/ping | python -m json.tool
---Sat 6.6---
  1. curl --request GET --insecure https://satellite.example.com/katello/api/ping | python -m json.tool
  2. curl --request GET --insecure https://satellite.example.com/katello/api/status | python -m json.tool

Actual results: {
"services": {
"candlepin": {
"duration_ms": "26",
"status": "ok"
},
"candlepin_auth": {
"duration_ms": "20",
"status": "ok"
},
"candlepin_events": {
"duration_ms": "0",
"message": "0 Processed, 0 Failed",
"status": "ok"
},
"foreman_tasks": {
"duration_ms": "6",
"status": "ok"
},
"katello_events": {
"duration_ms": "0",
"message": "5 Processed, 0 Failed",
"status": "ok"
},
"pulp": {
"message": "Not all necessary pulp workers running at https://satellite.example.com/pulp/api/v2.",
"status": "FAIL"
},
"pulp_auth": {
"message": "Skipped pulp_auth check after failed pulp check",
"status": "FAIL"
}
},
"status": "ok"
}

Expected results:

{
"services": {
"candlepin": {
"duration_ms": "26",
"status": "ok"
},
"candlepin_auth": {
"duration_ms": "20",
"status": "ok"
},
"candlepin_events": {
"duration_ms": "0",
"message": "0 Processed, 0 Failed",
"status": "ok"
},
"foreman_tasks": {
"duration_ms": "6",
"status": "ok"
},
"katello_events": {
"duration_ms": "0",
"message": "5 Processed, 0 Failed",
"status": "ok"
},
"pulp": {
"message": "Not all necessary pulp workers running at https://satellite.example.com/pulp/api/v2.",
"status": "FAIL"
},
"pulp_auth": {
"message": "Skipped pulp_auth check after failed pulp check",
"status": "FAIL"
}
},
"status": "Nok"
}

Additional info:

Actions #1

Updated by Oleh Fedorenko over 4 years ago

  • Subject changed from [Satellite 6] - API PING request return "status": "ok" even if there is a service in state failed to [Satellite 6] - API PING request return "status": "ok" even if there is a service in state failed
  • Category set to API
  • Assignee set to Oleh Fedorenko
Actions #2

Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8855 added
Actions #3

Updated by Jonathon Turel over 4 years ago

  • Subject changed from [Satellite 6] - API PING request return "status": "ok" even if there is a service in state failed to API PING request return "status": "ok" even if there is a service in state failed
Actions #4

Updated by The Foreman Bot over 4 years ago

  • Fixed in Releases Katello 3.18.0 added
Actions #5

Updated by Oleh Fedorenko over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by Samir Jha over 4 years ago

  • Target version set to Katello 3.16.1
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF