Bug 974115 - Headpin Nightly : System Group copy command in cli failed
Summary: Headpin Nightly : System Group copy command in cli failed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: Nightly
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Tazim Kolhar
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-13 12:52 UTC by Tazim Kolhar
Modified: 2019-09-26 18:19 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-02 14:07:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 5600 0 None None None 2016-04-22 15:56:00 UTC

Description Tazim Kolhar 2013-06-13 12:52:13 UTC
Description of problem:
System Group copy command in cli failed

Version-Release number of selected component (if applicable):
# rpm -qa | grep katello
signo-katello-0.0.9-1.el6.noarch
katello-headpin-1.4.2-1.git.638.2148be1.el6.noarch
katello-certs-tools-1.4.2-1.el6.noarch
katello-cli-1.4.2-1.git.90.6c7a175.el6.noarch
katello-cli-common-1.4.2-1.git.90.6c7a175.el6.noarch
katello-glue-candlepin-1.4.2-1.git.638.2148be1.el6.noarch
katello-configure-1.4.3-1.git.62.f050662.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-glue-elasticsearch-1.4.2-1.git.638.2148be1.el6.noarch
katello-selinux-1.4.3-1.git.4.99dc194.el6.noarch
katello-common-1.4.2-1.git.638.2148be1.el6.noarch
katello-headpin-all-1.4.2-1.git.638.2148be1.el6.noarch
katello-repos-1.4.2-1.el6.noarch


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

Steps to Reproduce:
1.ssh root.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"
Stdout:
Stderr: Could not find system group [ system_group1371126808 ] within organization [ org-1371126131 ]
ExitCode: 65

Please refer the test report
http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/job/official-headpin-cli/137/ReportNG_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 14:01:58 UTC
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 Program Management 2013-06-19 14:03:45 UTC
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 14:51:04 UTC
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 21:01:01 UTC
Moving this to be tested during MDP3, not critical for MDP2 success story

Comment 7 Tazim Kolhar 2014-04-28 06:01:05 UTC
# hammer system-group copy --help
Usage:
    hammer system-group copy [OPTIONS]

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 12:44:14 UTC
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:
   https://github.com/Katello/hammer-cli-katello/pull/161

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 07:20:27 UTC
# hammer --help
Usage:
    hammer [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
    SUBCOMMAND                    subcommand
    [ARG] ...                     subcommand arguments

Subcommands:
    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.

Options:
    --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 14:07:08 UTC
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.