Actions
Bug #6665
closedHammer ping fail when run via ssh and no user and password is provided
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Description
When running hammer ping via ssh it is able to run and return a non-zero return code because pulp_auth and doesn't show pulp_auth status. But when the user and password is provided hammer ping return all information plus a zero return code.
If the user and password is required, hammer ping command should fail instead to return not complete information and don't warn the user about the user and pass requirement.
$ ssh root@myforeman.com hammer ping candlepin: Status: ok Server Response: Duration: 26ms candlepin_auth: Status: ok Server Response: Duration: 26ms pulp: Status: ok Server Response: Duration: 18ms pulp_auth: Status: Server Response: Message: elasticsearch: Status: ok Server Response: Duration: 18ms katello_jobs: Status: ok Server Response: Duration: 44ms $ echo $? 1 $ ssh root@myforeman.com hammer -u admin -p password ping candlepin: Status: ok Server Response: Duration: 24ms candlepin_auth: Status: ok Server Response: Duration: 25ms pulp: Status: ok Server Response: Duration: 17ms pulp_auth: Status: ok Server Response: Duration: 180ms elasticsearch: Status: ok Server Response: Duration: 12ms katello_jobs: Status: ok Server Response: Duration: 42ms $ echo $? 0
Updated by Tomáš Strachota over 7 years ago
- Status changed from New to Closed
I believe this issue has been fixed on katello side and the ping api no longer requires the user to be logged in:
> hammer auth status You are currently not logged in > hammer ping candlepin: Status: ok Server Response: Duration: 27ms candlepin_auth: Status: ok Server Response: Duration: 27ms pulp: Status: ok Server Response: Duration: 34ms pulp_auth: Status: ok Server Response: Duration: 17ms foreman_tasks: Status: ok Server Response: Duration: 598ms > hammer --version hammer (0.10.2) * hammer_cli_csv (unknown version) * hammer_cli_foreman (0.10.2) * hammer_cli_foreman_admin (0.0.6) * hammer_cli_foreman_bootdisk (0.1.3) * hammer_cli_foreman_discovery (1.0.0) * hammer_cli_foreman_docker (unknown version) * hammer_cli_foreman_openscap (unknown version) * hammer_cli_foreman_remote_execution (unknown version) * hammer_cli_foreman_tasks (unknown version) * hammer_cli_foreman_virt_who_configure (unknown version) * hammer_cli_import (0.11.3) * hammer_cli_katello (0.10.0)
Therefore I'm closing the issue. Please feel free to reopen if the problem persists for you.
Actions