Bug 976366 - [cli] `system info` works wrong : system moved to new environment
[cli] `system info` works wrong : system moved to new environment
Status: CLOSED WONTFIX
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.0.1
Unspecified Unspecified
medium Severity unspecified (vote)
: Unspecified
: --
Assigned To: Walden Raines
Garik Khachikyan
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-20 08:55 EDT by Garik Khachikyan
Modified: 2015-01-04 17:00 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-03-12 19:01:57 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Garik Khachikyan 2013-06-20 08:55:11 EDT
Description of problem:
Having a system moved to a new environment I experienced a bug related with CLI `system info --environment <the_old_env>` - it shows the system info (but output shows the new environment)

Version-Release number of selected component (if applicable):
candlepin-0.8.9-1.el6_4.noarch
candlepin-scl-1-5.el6_4.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-selinux-0.8.9-1.el6_4.noarch
candlepin-tomcat6-0.8.9-1.el6_4.noarch
elasticsearch-0.19.9-8.el6sat.noarch
katello-1.4.2-14.el6sat.noarch
katello-agent-1.4.3-1.git.1.24fe511.el6.noarch
katello-all-1.4.2-14.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-cli-1.4.2-7.el6sat.noarch
katello-cli-common-1.4.2-7.el6sat.noarch
katello-common-1.4.2-14.el6sat.noarch
katello-configure-1.4.3-16.el6sat.noarch
katello-configure-foreman-1.4.3-16.el6sat.noarch
katello-foreman-all-1.4.2-14.el6sat.noarch
katello-glue-candlepin-1.4.2-14.el6sat.noarch
katello-glue-elasticsearch-1.4.2-14.el6sat.noarch
katello-glue-pulp-1.4.2-14.el6sat.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-selinux-1.4.3-3.el6sat.noarch
m2crypto-0.21.1.pulp-8.el6sat.x86_64
mod_wsgi-3.4-1.pulp.el6sat.x86_64
pulp-rpm-handlers-2.1.2-0.3.beta.el6sat.noarch
pulp-rpm-plugins-2.1.2-0.3.beta.el6sat.noarch
pulp-selinux-2.1.2-0.3.beta.el6sat.noarch
pulp-server-2.1.2-0.3.beta.el6sat.noarch
python-isodate-0.5.0-1.pulp.el6sat.noarch
python-oauth2-1.5.170-3.pulp.el6sat.noarch
python-pulp-agent-lib-2.1.2-0.3.beta.el6sat.noarch
python-pulp-common-2.1.2-0.3.beta.el6sat.noarch
python-pulp-rpm-common-2.1.2-0.3.beta.el6sat.noarch
python-qpid-0.18-5.el6_4.noarch
python-rhsm-1.8.0-1.pulp.el6sat.x86_64
qpid-cpp-client-0.14-22.el6_3.x86_64
qpid-cpp-client-ssl-0.14-22.el6_3.x86_64
qpid-cpp-server-0.14-22.el6_3.x86_64
qpid-cpp-server-ssl-0.14-22.el6_3.x86_64
ruby193-rubygem-foreman-katello-engine-0.0.8-6.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.3-5.el6sat.noarch
ruby193-rubygem-katello_api-0.0.3-2.el6_4.noarch
ruby193-rubygem-ldap_fluff-0.2.2-1.el6sat.noarch
signo-katello-0.0.18-1.el6sat.noarch

How reproducible:
from the first attempt

Steps to Reproduce:
1.prepare custom repo, sync and promote to the env: Testing
2.have another env: Prod (both created with "--prior Library")
3.promote the repo to Testing
4.register system via RHSM to Testing/<contViewName>
5.promote the content view to Prod
6.system update --new_environment Prod --name <system> --org <org>
7.system info --org <org> --name <system> --environment Testing

Actual results:
Name            : <system>
IPv4 Address    : 10.16.65.147
UUID            : 29e848e5-0a31-4e00-b81f-7ace88367810
Environment     : Prod
Location        : None
Registered      : 2013/06/20 12:07:55
Last Updated    : 2013/06/20 12:14:52
Description:
    Initial Registration Params
Activation Keys:
    [  ]
Service Level   : 
Guests          : [  ]
Custom Info:
    [  ]
Content View    : [ <contViewName> ]

Expected results:
display error telling: system does not exist with exit code != 0

Additional info:
Comment 2 Eric Helms 2013-10-08 15:17:37 EDT
Testing this in latest I am unable to reproduce the error. Moving to POST to be verified.
Comment 3 Garik Khachikyan 2013-10-21 06:53:34 EDT
# REOPEN

Doing exactly the same steps as in: comment#0 I was able to see:
===
katello> system list --org Garik
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                                         Systems List For Org [ Garik ]

Name                           UUID                                 Environment Service Level Content View 
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
cfseclient6.usersys.redhat.com e7abf9fe-4c7e-4abc-b579-d689fa1a957e Prod                      cvZoo        

** BUT **
katello> system info --org Garik --name cfseclient6.usersys.redhat.com --environment testing
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                        System Information For Environment [ testing ] in Org [ Garik ]
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Name            : cfseclient6.usersys.redhat.com
IPv4 Address    : 10.8.30.119
UUID            : e7abf9fe-4c7e-4abc-b579-d689fa1a957e
Environment     : Prod
Location        : None
Registered      : 2013/10/21 10:49:28
Last Updated    : 2013/10/21 10:50:50
Description:
    Initial Registration Params
Activation Keys:
    [  ]
Service Level   : 
Guests          : [  ]
Custom Info:
    [  ]
Content View    : [ cvZoo ]

katello> 

===

checked on:
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.8.25-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.25-1.el6sam.noarch
* candlepin-tomcat6-0.8.25-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* foreman-1.3.0-18.el6sat.noarch
* foreman-compute-1.3.0-18.el6sat.noarch
* foreman-libvirt-1.3.0-18.el6sat.noarch
* foreman-postgresql-1.3.0-18.el6sat.noarch
* foreman-proxy-1.3.0-3.el6sat.noarch
* katello-1.4.6-39.el6sat.noarch
* katello-all-1.4.6-39.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.4-1.el6sat.noarch
* katello-cli-1.4.3-24.el6sat.noarch
* katello-cli-common-1.4.3-24.el6sat.noarch
* katello-common-1.4.6-39.el6sat.noarch
* katello-configure-1.4.7-5.el6sat.noarch
* katello-configure-foreman-1.4.7-5.el6sat.noarch
* katello-configure-foreman-proxy-1.4.7-5.el6sat.noarch
* katello-foreman-all-1.4.6-39.el6sat.noarch
* katello-glue-candlepin-1.4.6-39.el6sat.noarch
* katello-glue-elasticsearch-1.4.6-39.el6sat.noarch
* katello-glue-pulp-1.4.6-39.el6sat.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.4.4-4.el6sat.noarch
* openldap-2.4.23-31.el6.x86_64
* pulp-katello-plugins-0.2-1.el6sat.noarch
* pulp-nodes-common-2.3.0-0.22.beta.el6sat.noarch
* pulp-nodes-parent-2.3.0-0.22.beta.el6sat.noarch
* pulp-puppet-plugins-2.3.0-0.22.beta.el6sat.noarch
* pulp-rpm-plugins-2.3.0-0.22.beta.el6sat.noarch
* pulp-selinux-2.3.0-0.22.beta.el6sat.noarch
* pulp-server-2.3.0-0.22.beta.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-ldap_fluff-0.2.2-2.el6sat.noarch
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.0.7-1.el6sat.noarch
* signo-0.0.22-2.el6sat.noarch
* signo-katello-0.0.22-2.el6sat.noarch
Comment 4 Garik Khachikyan 2013-10-21 06:56:10 EDT
heh... I think the --environment parameter not working in `system info`  at all.

Did prepared another environment called dev, and requesting:

katello> system info --org Garik --name cfseclient6.usersys.redhat.com --environment dev
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                                                                          System Information For Environment [ dev ] in Org [ Garik ]
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Name            : cfseclient6.usersys.redhat.com
IPv4 Address    : 10.8.30.119
UUID            : e7abf9fe-4c7e-4abc-b579-d689fa1a957e
Environment     : Prod
Location        : None
Registered      : 2013/10/21 10:49:28
Last Updated    : 2013/10/21 10:50:50
Description:
    Initial Registration Params
Activation Keys:
    [  ]
Service Level   : 
Guests          : [  ]
Custom Info:
    [  ]
Content View    : [ cvZoo ]

katello>
Comment 7 Bryan Kearney 2014-03-12 19:01:57 EDT
Closing old bugs which are not relevant based on new UI and CLI

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