Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 929067

Summary: Katello Nightly : Removing a published content view from an definition failed via cli
Product: Red Hat Satellite Reporter: Tazim Kolhar <tkolhar>
Component: Content ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: Hayk Hovsepyan <hhovsepy>
Severity: low Docs Contact:
Priority: low    
Version: NightlyCC: bbuckingham, cwelton, hhovsepy, jsherril, mmccune, omaciel
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-18 21:19:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/var/log/katello/client.log file attached none

Description Tazim Kolhar 2013-03-29 07:59:28 UTC
Description of problem:
Removing a published content view from an activation key

Version-Release number of selected component (if applicable):

# rpm -qa | grep katello
katello-glue-candlepin-1.3.14-1.git.1046.7351894.el6.noarch
katello-glue-pulp-1.3.14-1.git.1046.7351894.el6.noarch
katello-common-1.3.14-1.git.1046.7351894.el6.noarch
katello-selinux-1.3.1-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-repos-1.3.2-1.el6.noarch
katello-certs-tools-1.1.9-1.el6.noarch
katello-cli-common-1.3.5-1.git.51.6e92fb1.el6.noarch
katello-glue-foreman-1.3.14-1.git.1046.7351894.el6.noarch
katello-configure-1.3.6-1.git.838.2dc1245.el6.noarch
katello-all-1.3.14-1.git.1046.7351894.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-cli-1.3.5-1.git.51.6e92fb1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-glue-elasticsearch-1.3.14-1.git.1046.7351894.el6.noarch
katello-1.3.14-1.git.1046.7351894.el6.noarch


How reproducible:
# yum install -y katello-all
# katello-configure --user-pass=$PASSWORD

Steps to Reproduce:
    Create an organization with environments
    Create a custom provider
    Create a product
    Add a repository to the product
    Synch and promote the repository to the first environment
    Add a few more products with respective repositories to the same provider
    Create a new Content View Definition
    Add the product created in he setup to it
    Promote the content view definition
    Create a new activation key
    Add the published content view definition to the activation key and save it
    Remove the existing content view definition added to the activation key

Actual results:
# katello -u admin -p **** content definition remove_view --org orgcon-1364541323 --name condef-1364541323 --content_view pubview-1364541323
error: list.remove(x): x not in list (more in the log file /var/log/katello/client.log)


Expected results:
Removing the content view definition from the activation key should then not display it as being associated to the activation key anymore

Additional info:

Comment 1 Tazim Kolhar 2013-03-29 08:08:52 UTC
Created attachment 717962 [details]
/var/log/katello/client.log file attached

Comment 2 Mike McCune 2013-04-03 15:30:13 UTC
This sounds like a bug in removing a view by itself and not related to activation keys specifically.

Comment 3 Justin Sherrill 2013-05-07 15:38:14 UTC
I think this has been resolved.  Note that the syntax has changed  'update --remove_content_view'  is now the required syntax.


katello -u admin -p admin activation_key update   --org=ACME_Corporation --name=akey  --remove_content_view
Successfully updated activation key [ akey ]

Comment 5 Sam Kottler 2013-05-23 23:40:08 UTC
Moving to ON_QA for drop 2.

Comment 6 Hayk Hovsepyan 2013-05-27 10:51:25 UTC
Tested on revision:
katello-certs-tools-1.4.2-2.el6sat.noarch
signo-katello-0.0.12-1.el6sat.noarch
katello-glue-pulp-1.4.2-7.el6sat.noarch
katello-configure-foreman-1.4.3-10.el6sat.noarch
katello-foreman-all-1.4.2-7.el6sat.noarch
ruby193-rubygem-katello_api-0.0.3-2.el6_4.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-1.4.2-6.el6sat.noarch
ruby193-rubygem-foreman-katello-engine-0.0.7-1.el6sat.noarch
katello-configure-1.4.3-10.el6sat.noarch
katello-common-1.4.2-7.el6sat.noarch
katello-selinux-1.4.3-3.el6sat.noarch
katello-glue-candlepin-1.4.2-7.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.1-1.el6_4.noarch
katello-all-1.4.2-7.el6sat.noarch
katello-agent-1.4.2-4.el6sat.noarch
katello-cli-common-1.4.2-6.el6sat.noarch
katello-glue-elasticsearch-1.4.2-7.el6sat.noarch
katello-1.4.2-7.el6sat.noarch
katello-qpid-broker-key-pair-1.0-1.noarch

The command "activation_key update remove_content_view" works fine.

But the issue described above is not related to activation key.
It is when you try to remove content view from content definition, in which that content view was published. 
In this case CLI command "content definition remove_view --name condef --org "org1" --content_view pubview" shows not user friendly message "error: list.remove(x): x not in list (more in the log file /var/log/katello/client.log)".

And the expected result here is just to show a user friendly message that you can not remove that content view.

Removing content view from definitions work correctly for composite content views.

Comment 7 Justin Sherrill 2013-05-31 01:19:49 UTC
oh i see, the text and title of this bz is all wrong then :) 

very confusing.  I will update the title.

Comment 8 Justin Sherrill 2013-06-05 19:09:56 UTC
https://github.com/Katello/katello-cli/pull/39

NOTE that this is only valid for composite views.  The command actually worked fine before but would error if:

a) the view definition was not a composite
b) the view you were trying to remove wasn't actually associated with the definition you wanted to remove

Comment 10 Brad Buckingham 2013-06-06 21:58:17 UTC
Mass move to ON_QA

Comment 11 Hayk Hovsepyan 2013-06-10 08:55:14 UTC
Verified on revision:
Katello-Katello-Installation-RegisterRHNClassic-1.1-3.noarch
katello-cli-1.4.2-7.el6sat.noarch
pulp-server-2.1.1-1.el6sat.noarch
katello-configure-1.4.3-14.el6sat.noarch
openldap-2.4.23-31.el6.x86_64
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
katello-glue-elasticsearch-1.4.2-11.el6sat.noarch
katello-1.4.2-11.el6sat.noarch
candlepin-tomcat6-0.8.9-1.el6_4.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
candlepin-cert-consumer-cfseserver2.usersys.redhat.com-1.0-1.noarch
signo-0.0.16-1.el6sat.noarch
apr-util-ldap-1.3.9-3.el6_0.1.x86_64
Katello-Katello-Installation-Satellite6Latest-1.0-8.noarch
foreman-installer-puppet-concat-0-2.d776701.git.0.21ef926.el6sat.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-qpid-client-key-pair-1.0-1.noarch
pulp-rpm-handlers-2.1.1-1.el6sat.noarch
foreman-installer-puppet-puppet-0-3.ab46748.el6sat.noarch
katello-cli-common-1.4.2-7.el6sat.noarch
foreman-installer-puppet-tftp-0-5.ea6c5e5.el6sat.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
foreman-1.1.10005-1.noarch
foreman-postgresql-1.1.10005-1.noarch
python-ldap-2.3.10-1.el6.x86_64
pulp-rpm-plugins-2.1.1-1.el6sat.noarch
pulp-selinux-2.1.1-1.el6sat.noarch
foreman-proxy-installer-1.0.1-8.f5ae2cd.el6sat.noarch
ruby193-rubygem-ldap_fluff-0.2.2-1.el6sat.noarch
foreman-proxy-1.1.10003-1.el6sat.noarch
candlepin-scl-1-5.el6_4.noarch
elasticsearch-0.19.9-8.el6sat.noarch
katello-common-1.4.2-11.el6sat.noarch
katello-selinux-1.4.3-3.el6sat.noarch
katello-glue-candlepin-1.4.2-11.el6sat.noarch
candlepin-selinux-0.8.9-1.el6_4.noarch
katello-all-1.4.2-11.el6sat.noarch
katello-agent-1.4.2-4.el6sat.noarch
foreman-installer-puppet-xinetd-0-50a267b8.git.0.44aca6a.el6sat.noarch
foreman-installer-puppet-dhcp-0-5.3a4a13c.el6sat.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
ruby193-rubygem-net-ldap-0.3.1-2.el6sat.noarch
foreman-installer-puppet-foreman-0-6.568c5c4.el6sat.noarch
signo-katello-0.0.16-1.el6sat.noarch
katello-glue-pulp-1.4.2-11.el6sat.noarch
katello-configure-foreman-1.4.3-14.el6sat.noarch
candlepin-0.8.9-1.el6_4.noarch
katello-foreman-all-1.4.2-11.el6sat.noarch
Katello-Katello-Configuration-KatelloClient-1.1-45.noarch
foreman-installer-puppet-foreman_proxy-0-8.bd1e35d.el6sat.noarch
foreman-installer-puppet-dns-0-7.fcae203.el6sat.noarch
Katello-Katello-Sanity-ImportKeys-1.2-1.noarch


Now it says that content definition is not composite.

Comment 12 Mike McCune 2013-07-18 21:19:15 UTC
mass move to CLOSED:CURRENTRELEASE since MDP1 has been released.