Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 974115 - Headpin Nightly : System Group copy command in cli failed
Headpin Nightly : System Group copy command in cli failed
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
x86_64 Linux
unspecified Severity medium (vote)
: Unspecified
: Unused
Assigned To: Brad Buckingham
Tazim Kolhar
: Reopened, Triaged
Depends On:
  Show dependency treegraph
Reported: 2013-06-13 08:52 EDT by Tazim Kolhar
Modified: 2016-04-22 11:56 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-07-02 10:07:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 5600 None None None 2016-04-22 11:56 EDT

  None (edit)
Description Tazim Kolhar 2013-06-13 08:52:13 EDT
Description of problem:
System Group copy command in cli failed

Version-Release number of selected component (if applicable):
# rpm -qa | grep katello

How reproducible:
# yum install -y katello-headpin-all
# katello-configure --user-pass=****

Steps to Reproduce:
1.ssh root@kvm-guest-04.rhts.eng.bos.redhat.com export LANG=en_US && headpin --username "admin" --password "admin" system_group copy --new_name "system_group1371126808copy" --org "org-1371126131" --name "system_group1371126808" --description "new description" --max_systems "1"
Stderr: Could not find system group [ system_group1371126808 ] within organization [ org-1371126131 ]
ExitCode: 65

Please refer the test report

Actual results:
Stderr: Could not find system group [ system_group1371126808 ] within organization [ org-1371126131 ]

Expected results:
System Group copy command is successful

Additional info:
Comment 2 Tom McKay 2013-06-19 10:01:58 EDT
Changes to api/v1/system_groups_controller#index have introduced a race condition:

1) Creating a system group adds it to elasticsearch (an async operation)
2) Immediately calling index() w/ search by name will fail if elasticsearch not finished

Potential solutions:
1) Make elasticsearch indexing an orchestration event such that the call to create does not return until elasticsearch has finished.
2) When calling index() w/ name param, use ActiveRecord search instead of elasticsearch
Comment 3 RHEL Product and Program Management 2013-06-19 10:03:45 EDT
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.
Comment 5 Eric Helms 2013-09-20 10:51:04 EDT
Testing on latest upstream, I am no longer seeing this problem. This could be due to the fact that a general reindex after save was added. Moving to POST for official testing.
Comment 6 Mike McCune 2013-10-17 17:01:01 EDT
Moving this to be tested during MDP3, not critical for MDP2 success story
Comment 7 Tazim Kolhar 2014-04-28 02:01:05 EDT
# hammer system-group copy --help
    hammer system-group copy [OPTIONS]

    -h, --help                    print help
[root@qetello02 ~]# 

System-Group copy does not contain help page 
Cannot determine what exact comments to be passed
Comment 8 Brad Buckingham 2014-05-13 08:44:14 EDT
Unfortunately, when this command was ported to hammer, it was not functional.  That said, a change did go in this week that should address it.

The changes were merged with the following PR:

Also, be aware that system-group was renamed to host-collection as part of the Satellite6 integration work; therefore, the new command will be:

'host-collection copy'
Comment 10 Tazim Kolhar 2014-05-20 03:20:27 EDT
# hammer --help
    hammer [OPTIONS] SUBCOMMAND [ARG] ...

    SUBCOMMAND                    subcommand
    [ARG] ...                     subcommand arguments

    activation-key                Manipulate activation keys.
    architecture                  Manipulate architectures.
    compute-resource              Manipulate compute resources.
    content-host                  manipulate content hosts on the server
    content-view                  Manipulate content views.
    domain                        Manipulate domains.
    environment                   Manipulate environments.
    fact                          Search facts.
    global-parameter              Manipulate global parameters.
    gpg                           manipulate GPG Key actions on the server
    host                          Manipulate hosts.
    host-collection               Manipulate host collections
    hostgroup                     Manipulate hostgroups.
    lifecycle-environment         manipulate lifecycle_environments on the server
    location                      Manipulate locations.
    medium                        Manipulate installation media.
    model                         Manipulate hardware models.
    organization                  Manipulate organizations
    os                            Manipulate operating system.
    partition-table               Manipulate partition tables.
    ping                          get the status of the server
    product                       Manipulate products.
    proxy                         Manipulate smart proxies.
    puppet-class                  Search puppet modules.
    puppet-module                 View Puppet Module details.
    report                        Browse and read reports.
    repository                    Manipulate repositories
    repository-set                manipulate repository sets on the server
    sc-param                      Manipulate smart class parameters.
    shell                         Interactive shell
    subnet                        Manipulate subnets.
    subscription                  Manipulate subscriptions.
    sync-plan                     Manipulate sync plans
    task                          Tasks related actions.
    template                      Manipulate config templates.
    user                          Manipulate users.

    --autocomplete LINE           Get list of possible endings
    --csv                         Output as CSV (same as --output=csv)
    --csv-separator SEPARATOR     Character to separate the values
    --interactive INTERACTIVE     Explicitly turn interactive mode on/off
                                  One of true/false, yes/no, 1/0.
    --output ADAPTER              Set output format. One of [table, base, silent, csv]
    --show-ids                    Show ids of associated resources
    --version                     show version
    -c, --config CFG_FILE         path to custom config file
    -d, --debug                   show debugging output
    -h, --help                    print help
    -p, --password PASSWORD       password to access the remote system
    -u, --username USERNAME       username to access the remote system
    -v, --verbose                 be verbose

There is no sub command system-copy
Comment 11 Bryan Kearney 2014-07-02 10:07:08 EDT
This was delivered with 6.0.3, which is the Satellite 6 Beta.

Note You need to log in before you can comment on or make changes to this bug.