Skip to content

Ping endpoint change from katello/api/v2/ping to api/v2/ping#1406

Merged
pondrejk merged 1 commit intoSatelliteQE:masterfrom
LadislavVasina1:PingEndpointChange
Mar 2, 2026
Merged

Ping endpoint change from katello/api/v2/ping to api/v2/ping#1406
pondrejk merged 1 commit intoSatelliteQE:masterfrom
LadislavVasina1:PingEndpointChange

Conversation

@LadislavVasina1
Copy link
Contributor

@LadislavVasina1 LadislavVasina1 commented Feb 27, 2026

Changing Ping API path from katello/api/v2/ping to api/v2/ping.

Reasoning behind this change:

In the current implementation, the CLI hammer ping command outputs this:

database:         
    Status:          ok
    Server Response: Duration: 0ms
cache:            
    servers: 
     1) Status:          ok
        Server Response: Duration: 0ms
advisor:          
    Status:          ok
    Server Response: Duration: 29ms
vulnerability:    
    Status:          ok
    Server Response: Duration: 26ms
candlepin:        
    Status:          ok
    Server Response: Duration: 15ms
candlepin_auth:   
    Status:          ok
    Server Response: Duration: 15ms
candlepin_events: 
    Status:          ok
    message:         6 Processed, 0 Failed
    Server Response: Duration: 0ms
katello_events:   
    Status:          ok
    message:         0 Processed, 0 Failed
    Server Response: Duration: 1ms
pulp3:            
    Status:          ok
    Server Response: Duration: 46ms
pulp3_content:    
    Status:          ok
    Server Response: Duration: 45ms
foreman_tasks:    
    Status:          ok
    Server Response: Duration: 2ms

You can see that it includes database, cache, advisor and vulnerability services.
But the nailgun API response with the Ping endpoint set to katello/api/v2/ping outputs only:

{'services': {'candlepin': {'duration_ms': '15', 'status': 'ok'},
              'candlepin_auth': {'duration_ms': '15', 'status': 'ok'},
              'candlepin_events': {'duration_ms': '0',
                                   'message': '6 Processed, 0 Failed',
                                   'status': 'ok'},
              'foreman_tasks': {'duration_ms': '2', 'status': 'ok'},
              'katello_events': {'duration_ms': '0',
                                 'message': '0 Processed, 0 Failed',
                                 'status': 'ok'},
              'pulp3': {'duration_ms': '46', 'status': 'ok'},
              'pulp3_content': {'duration_ms': '48', 'status': 'ok'}},
 'status': 'ok'}

Nailgun API response with the Ping endpoint set to api/v2/ping outputs:

{'results': {'foreman': {'cache': {'servers': [{'duration_ms': '0',
                                                'status': 'ok'}]},
                         'database': {'active': True, 'duration_ms': '0'}},
             'foreman_rh_cloud': {'services': {'advisor': {'duration_ms': '27',
                                                           'status': 'ok'},
                                               'vulnerability': {'duration_ms': '26',
                                                                 'status': 'ok'}},
                                  'status': 'ok'},
             'katello': {'services': {'candlepin': {'duration_ms': '16',
                                                    'status': 'ok'},
                                      'candlepin_auth': {'duration_ms': '15',
                                                         'status': 'ok'},
                                      'candlepin_events': {'duration_ms': '0',
                                                           'message': '9 '
                                                                      'Processed, '
                                                                      '0 '
                                                                      'Failed',
                                                           'status': 'ok'},
                                      'foreman_tasks': {'duration_ms': '2',
                                                        'status': 'ok'},
                                      'katello_events': {'duration_ms': '1',
                                                         'message': '3 '
                                                                    'Processed, '
                                                                    '0 Failed',
                                                         'status': 'ok'},
                                      'pulp3': {'duration_ms': '97',
                                                'status': 'ok'},
                                      'pulp3_content': {'duration_ms': '47',
                                                        'status': 'ok'}},
                         'status': 'ok'}}}

This change is intended to add missing services to the API response that nailgun returns and to make the Ping outputs have the same content across CLI and API usages in robottelo.

This PR is accompanied by robottelo PR(SatelliteQE/robottelo#20909), which slightly refactors tests using target_sat.api.Ping().search_json().

@LadislavVasina1 LadislavVasina1 self-assigned this Feb 27, 2026
@LadislavVasina1 LadislavVasina1 added No-CherryPick PR doesnt need CherryPick to previous branches Stream labels Feb 27, 2026
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@vsedmik vsedmik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me to test the broader endpoint, I can't see any cons. 👍

@LadislavVasina1
Copy link
Contributor Author

LadislavVasina1 commented Feb 27, 2026

PRT passed for 3 affected tests in the linked robottelo SatelliteQE/robottelo#20909 (comment)

@pondrejk pondrejk merged commit 3ec0922 into SatelliteQE:master Mar 2, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No-CherryPick PR doesnt need CherryPick to previous branches PRT-Passed Stream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants