Bug 853445 - trace-back upon adding ERRATA to deletion changeset
trace-back upon adding ERRATA to deletion changeset
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: WebUI (Show other bugs)
6.0.1
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Ivan Necas
Og Maciel
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-31 10:36 EDT by Kedar Bidarkar
Modified: 2013-08-16 14:05 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Adding errata to a deletion changeset caused a traceback error. This was due to regenerating repositories in prior environment. This fix correctly determines affected repositories after deletion.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 14:52:22 EST
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 Kedar Bidarkar 2012-08-31 10:36:55 EDT
Description of problem:

Failed to delete changeset 'errata_deletion_changeset'. Check notices for more details
progresstask_owner_typecreated_atuuidc59a048c-f377-11e1-a530-5254001e073cresulterrorsMetadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server] is set to be preserved. Cannot re-generate metadataTraceback (most recent call last): File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 418, in run result = self.callable(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 2286, in _generate_metadata raise PulpException(msg) PulpException: Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server] is set to be preserved. Cannot re-generate metadata pending?falsetask_typeorganization_idfinish_time2012-08-31 14:26:00user_id0updated_atstateerrortask_owner_idparametersstart_time (RuntimeError)




2012-08-31 19:54:32,525 3723:140334969386752: pulp.server.api.repo:INFO: repo:2208 Translated 0 filename,checksums in 0.00399398803711 seconds
2012-08-31 19:55:17,540 3723:140335082624768: pulp.server.updateinfo:INFO: updateinfo:164 updateinfo.xml generated and written to file /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/x86_64/os//updateinfo.xml
2012-08-31 19:55:24,340 3723:140335082624768: pulp.server.util:INFO: util:614 modifyrepo with /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/x86_64/os//updateinfo.xml on /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/x86_64/os/repodata finished
2012-08-31 19:55:36,413 3723:140334969386752: pulp.server.updateinfo:INFO: updateinfo:164 updateinfo.xml generated and written to file /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/i386/os//updateinfo.xml
2012-08-31 19:55:40,004 3723:140334969386752: pulp.server.util:INFO: util:614 modifyrepo with /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/i386/os//updateinfo.xml on /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/i386/os/repodata finished
2012-08-31 19:56:00,600 3723:140334545753856: pulp.server.api.repo:INFO: repo:2285 Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server] is set to be preserved. Cannot re-generate metadata
2012-08-31 19:56:00,746 3723:140334545753856: pulp.server.tasking.task:ERROR: task:472 Task failed: Task c59a048c-f377-11e1-a530-5254001e073c: RepoApi._generate_metadata(redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server, )
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 418, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 2286, in _generate_metadata
    raise PulpException(msg)
PulpException: Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server] is set to be preserved. Cannot re-generate metadata



2012-08-31 19:56:02,318 3723:140334065501952: pulp.server.api.repo:INFO: repo:2285 Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server] is set to be preserved. Cannot re-generate metadata
2012-08-31 19:56:02,319 3723:140334065501952: pulp.server.tasking.task:ERROR: task:472 Task failed: Task c98779fa-f377-11e1-beee-5254001e073c: RepoApi._generate_metadata(redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server, )
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 418, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 2286, in _generate_metadata
    raise PulpException(msg)
PulpException: Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server] is set to be preserved. Cannot re-generate metadata





Version-Release number of selected component (if applicable):
Katello Version: 1.1.7-1.git.176.aad354c.el6

How reproducible:

Adding Errata to deletion changeset

Steps to Reproduce:
1.
2.
3.
  
Actual results:
Errata's cannot be added to deletion changeset

Expected results:

Adding Errata to deletion changeset should be successful
Additional info:
Comment 2 Jason Montleon 2012-10-12 09:36:46 EDT
I am seeing the same failure when trying to apply a deletion changeset either using errata or packages (as in the similar bug report 853441)
Comment 3 Kedar Bidarkar 2012-11-01 07:27:49 EDT
Output from the /var/log/pulp/pulp.log


2012-11-01 16:51:50,604 32691:140360336537344: pulp.server.api.repo:INFO: repo:2208 Translated 0 filename,checksums in 0.00200295448303 seconds
2012-11-01 16:52:54,228 32691:140360418305792: pulp.server.updateinfo:INFO: updateinfo:164 updateinfo.xml generated and written to file /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/i386/os//updateinfo.xml
2012-11-01 16:53:03,045 32691:140360418305792: pulp.server.util:INFO: util:614 modifyrepo with /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/i386/os//updateinfo.xml on /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/i386/os/repodata finished
2012-11-01 16:53:35,547 32691:140360336537344: pulp.server.updateinfo:INFO: updateinfo:164 updateinfo.xml generated and written to file /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/x86_64/os//updateinfo.xml
2012-11-01 16:53:46,325 32691:140360336537344: pulp.server.util:INFO: util:614 modifyrepo with /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/x86_64/os//updateinfo.xml on /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/x86_64/os/repodata finished
2012-11-01 16:54:43,844 32691:140360057612032: pulp.server.api.repo:INFO: repo:2285 Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server] is set to be preserved. Cannot re-generate metadata
2012-11-01 16:54:43,876 32691:140360047122176: pulp.server.api.repo:INFO: repo:2285 Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server] is set to be preserved. Cannot re-generate metadata
2012-11-01 16:54:44,121 32691:140360047122176: pulp.server.tasking.task:ERROR: task:472 Task failed: Task b5329563-2416-11e2-a270-525400c7bf3a: RepoApi._generate_metadata(redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server, )
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 418, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 2286, in _generate_metadata
    raise PulpException(msg)
PulpException: Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server] is set to be preserved. Cannot re-generate metadata

2012-11-01 16:54:44,130 32691:140360057612032: pulp.server.tasking.task:ERROR: task:472 Task failed: Task b4d11640-2416-11e2-9ff1-525400c7bf3a: RepoApi._generate_metadata(redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server, )
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 418, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 2286, in _generate_metadata
    raise PulpException(msg)
PulpException: Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server] is set to be preserved. Cannot re-generate metadata
Comment 4 Kedar Bidarkar 2012-11-01 07:33:37 EDT
This issue is also seen for the build 2012-10-28.1/

[root@dhcp201-102 ~]# rpm -qav | grep -i katello 
katello-glue-pulp-1.1.12-18.el6cf.noarch
katello-configure-1.1.9-10.el6cf.noarch
katello-all-1.1.12-18.el6cf.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-1.1.8-10.el6cf.noarch
katello-certs-tools-1.1.8-1.el6cf.noarch
katello-common-1.1.12-18.el6cf.noarch
katello-selinux-1.1.1-2.el6cf.noarch
katello-cli-common-1.1.8-10.el6cf.noarch
katello-glue-candlepin-1.1.12-18.el6cf.noarch
katello-1.1.12-18.el6cf.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
Comment 5 Mike McCune 2012-11-07 11:13:12 EST
going to re-test this against 1.1 and master to see if it still fails
Comment 6 Mike McCune 2012-11-08 00:19:03 EST
I could not reproduce this with the latest build from:

katello-1.1.12-20.el6cf.noarch

you really didn't detail very well how to reproduce this.  I did the following:


WEBUI:

1) sync repository with errata 
2) promote product containing repo to next env
3) create changeset in that env that is a 'deletion' changeset
4) add a few of the errata that were promoted as part of the product
5) apply the changeset 

CLI:

# katello changeset create --name=d3 --env=dev --org=ACME_Corporation --deletion

# katello changeset update --name=d3 --env=dev --org=ACME_Corporation --from_product prod1 --add_erratum="RHEA-2012:0003"
Successfully updated changeset [ d3 ]

# katello changeset apply --name=d3 --env=dev --org=ACME_Corporation 
Changeset [ d3 ] applied    

what kind of content were you syncing?
Comment 7 Kedar Bidarkar 2012-11-08 03:15:36 EST
Strange, I face the same issue when trying from WEBUI.

1) [root@xxxx ~]# rpm -qav | grep -i "katello-1"
katello-1.1.12-20.el6cf.noarch
2) I am syncing the RHEL 6Server and tryin against this
3) Performed all the steps exactly as mentioned above in WEBUI section.
4) Also the below error message is not produced until 1 -2 min after the state changes from "Applying delet_dev_changeset1" to "Applied delet_dev_changeset1".
5) As the error message is not being produced immediately I am always trying to get to know the status from pulp.log


Below is the error message I get while trying from the WEBUI

Failed to delete changeset 'delet_dev_changeset1'. Check notices for more details
pending?falsetask_typetask_owner_typeparametersstateerrorfinish_time2012-11-08 07:56:59created_atprogressupdated_atorganization_idtask_owner_idstart_timeresulterrorsMetadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server] is set to be preserved. Cannot re-generate metadataTraceback (most recent call last): File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 418, in run result = self.callable(*self.args, **self.kwargs) File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 2286, in _generate_metadata raise PulpException(msg) PulpException: Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server] is set to be preserved. Cannot re-generate metadata uuiddea12ea1-2979-11e2-9c0e-525400856f10user_id0 (RuntimeError)



And from pulp.log

2012-11-08 13:26:38,195 8654:140727461832448: pulp.server.updateinfo:INFO: updateinfo:164 updateinfo.xml generated and written to file /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/i386/os//updateinfo.xml
2012-11-08 13:26:39,074 8654:140727461832448: pulp.server.util:INFO: util:614 modifyrepo with /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/i386/os//updateinfo.xml on /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/i386/os/repodata finished
2012-11-08 13:26:47,094 8654:140727535261440: pulp.server.updateinfo:INFO: updateinfo:164 updateinfo.xml generated and written to file /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/x86_64/os//updateinfo.xml
2012-11-08 13:26:47,739 8654:140727535261440: pulp.server.util:INFO: util:614 modifyrepo with /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/x86_64/os//updateinfo.xml on /var/lib/pulp//repos/redhat/Dev/content/dist/rhel/server/6/6Server/x86_64/os/repodata finished
2012-11-08 13:26:58,985 8654:140727451342592: pulp.server.api.repo:INFO: repo:2285 Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server] is set to be preserved. Cannot re-generate metadata
2012-11-08 13:26:59,027 8654:140727451342592: pulp.server.tasking.task:ERROR: task:472 Task failed: Task dea12ea1-2979-11e2-9c0e-525400856f10: RepoApi._generate_metadata(redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server, )
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 418, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 2286, in _generate_metadata
    raise PulpException(msg)
PulpException: Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_i386_6Server] is set to be preserved. Cannot re-generate metadata

2012-11-08 13:26:59,316 8654:140727210206976: pulp.server.api.repo:INFO: repo:2285 Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server] is set to be preserved. Cannot re-generate metadata
2012-11-08 13:26:59,316 8654:140727210206976: pulp.server.tasking.task:ERROR: task:472 Task failed: Task df578e8f-2979-11e2-a0b9-525400856f10: RepoApi._generate_metadata(redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server, )
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 418, in run
    result = self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 2286, in _generate_metadata
    raise PulpException(msg)
PulpException: Metadata for repo [redhat-Red_Hat_Enterprise_Linux_Server-Red_Hat_Enterprise_Linux_6_Server_RPMs_x86_64_6Server] is set to be preserved. Cannot re-generate metadata
Comment 8 Ivan Necas 2012-11-08 04:06:34 EST
The difference between the Mike's and Kedar's use case is that Mike's using custom repo while Kedar has a repo from manifest import.

It seems Katello calls to recreate metadata somewhere it should not to.
Comment 9 Ivan Necas 2012-11-08 07:51:44 EST
Path sent in PR:

https://github.com/Katello/katello/pull/1019
Comment 12 Og Maciel 2012-11-08 16:54:56 EST
Clicking on +Add for an errata item fails and firebug shows:

TypeError: content_breadcrumb["details_" + R] is undefined
[Break On This Error] 	

...thenticity_token:AUTH_TOKEN},onsuccess:function(j){var i=$.parseJSON(j);h.setNam...
Comment 13 Og Maciel 2012-11-08 16:57:28 EST
Firefox 16.0.2 + Fedora 17
Comment 14 Og Maciel 2012-11-08 17:52:51 EST
Verified from web ui and cli! However, this only works if you select a product *first* and then select the errata. I will file a separate BZ for adding errata from the "root level".

* candlepin-0.7.8.1-1.el6cf.noarch
* candlepin-selinux-0.7.8.1-1.el6cf.noarch
* candlepin-tomcat6-0.7.8.1-1.el6cf.noarch
* katello-1.1.12-21.el6cf.noarch
* katello-all-1.1.12-21.el6cf.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.1.8-1.el6cf.noarch
* katello-cli-1.1.8-12.el6cf.noarch
* katello-cli-common-1.1.8-12.el6cf.noarch
* katello-common-1.1.12-21.el6cf.noarch
* katello-configure-1.1.9-12.el6cf.noarch
* katello-glue-candlepin-1.1.12-21.el6cf.noarch
* katello-glue-pulp-1.1.12-21.el6cf.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-qpid-client-key-pair-1.0-1.noarch
* katello-selinux-1.1.1-2.el6cf.noarch
* pulp-1.1.14-1.el6cf.noarch
* pulp-common-1.1.14-1.el6cf.noarch
* pulp-selinux-server-1.1.14-1.el6cf.noarch
Comment 16 errata-xmlrpc 2012-12-04 14:52:22 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-1543.html
Comment 17 Mike McCune 2013-08-16 14:05:08 EDT
getting rid of 6.0.0 version since that doesn't exist

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