Project

General

Profile

Actions

Bug #12647

closed

hammer returns return code 0(zero) for failed repo sync

Added by Bryan Kearney over 8 years ago. Updated almost 4 years ago.

Status:
Duplicate
Priority:
Normal
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1286722
Description of problem:
Hammer returns return code 0 for failed repository sync.
e.g:
  1. hammer -u admin -p changeme repository synchronize --name test_pro_repo --product test_pro --organization 'Default Organization'
    [....................................................................................................................................................................................................................................] [100%]
    Yum Metadata: Not Found
    PLP0000: Importer indicated a failed response

#echo $?
0

Version-Release number of selected component (if applicable):
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el6_6sat.noarch
rubygem-hammer_cli_katello-0.0.7.18-1.el6.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.10-1.el6.noarch
rubygem-hammer_cli-0.1.4.13-1.el6.noarch
rubygem-hammer_cli_foreman-0.1.4.14-1.el6_6sat.noarch
rubygem-hammer_cli_gutterball-0.0.1.3-1.el6_6sat.noarch
rubygem-hammer_cli_import-0.10.20-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el6_6sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create a custom product.
2. Add repository of type yum with URL which is down/not accessible/with no yum metadata in above product.
3. Sync the repository from hammer.
4. See the return code of last executed hammer command.

Actual results:
The return code is 0.

Expected results:
The return code should be 1 as the repository sync is failed.

Additional info:


Related issues 1 (0 open1 closed)

Is duplicate of foreman-tasks - Bug #10647: CLI indicates success when task result is errorClosedEric Helms05/28/2015Actions
Actions #1

Updated by Eric Helms about 8 years ago

  • translation missing: en.field_release set to 86
  • Triaged changed from No to Yes
Actions #2

Updated by Zach Huntington-Meath almost 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Zach Huntington-Meath
  • Pull request https://github.com/theforeman/hammer-cli-foreman-tasks/pull/20 added
Actions #3

Updated by Eric Helms almost 8 years ago

  • translation missing: en.field_release changed from 86 to 144
Actions #4

Updated by Eric Helms almost 8 years ago

  • Status changed from Assigned to Duplicate
  • translation missing: en.field_release changed from 144 to 114
  • Bugzilla link deleted (1286722)
  • Pull request deleted (https://github.com/theforeman/hammer-cli-foreman-tasks/pull/20)
Actions #5

Updated by Eric Helms almost 8 years ago

  • Is duplicate of Bug #10647: CLI indicates success when task result is error added
Actions #6

Updated by Zach Huntington-Meath almost 8 years ago

  • Pull request https://github.com/theforeman/hammer-cli-foreman-tasks/pull/20 added
Actions #7

Updated by Jonathon Turel almost 4 years ago

  • Target version changed from Katello Backlog to Katello Recycle Bin
Actions

Also available in: Atom PDF