Project

General

Profile

Bug #30498

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

Added by Oleh Fedorenko 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
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:

Associated revisions

Revision 2b8a2115 (diff)
Added by Oleh Fedorenko 4 months ago

Fixes #30498 - Fix general ping status

History

#1 Updated by Oleh Fedorenko 4 months ago

  • Assignee set to Oleh Fedorenko
  • Category set to API
  • 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

#2 Updated by The Foreman Bot 4 months ago

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

#3 Updated by Jonathon Turel 4 months 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

#4 Updated by The Foreman Bot 4 months ago

  • Fixed in Releases Katello 3.18.0 added

#5 Updated by Oleh Fedorenko 4 months ago

  • Status changed from Ready For Testing to Closed

#6 Updated by Samir Jha 4 months ago

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

Also available in: Atom PDF