Bug 790355

Summary: Error when promoting a repo with errata when another repo with that errata was removed
Product: Red Hat Satellite Reporter: Ivan Necas <inecas>
Component: Content ManagementAssignee: Katello Bug Bin <katello-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Garik Khachikyan <gkhachik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: bkearney, gkhachik, mkoci
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 18:26:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Ivan Necas 2012-02-14 10:28:31 UTC
Description of problem:
When trying to promote a changeset, getting:

You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.product
/home/inecas/Projects/RedHat/katello/src/app/models/glue/pulp/errata.rb:160:in `product_ids'
/home/inecas/Projects/RedHat/katello/src/app/models/glue/pulp/errata.rb:158:in `each'
/home/inecas/Projects/RedHat/katello/src/app/models/glue/pulp/errata.rb:158:in `product_ids'
/home/inecas/Projects/RedHat/katello/src/app/models/glue/pulp/errata.rb:107:in `index_options'
/home/inecas/Projects/RedHat/katello/src/app/models/repository.rb:108:in `index_errata'
/home/inecas/Projects/RedHat/katello/src/app/models/repository.rb:108:in `collect'
/home/inecas/Projects/RedHat/katello/src/app/models/repository.rb:108:in `index_errata'
/home/inecas/Projects/RedHat/katello/src/app/models/glue/pulp/repo.rb:152:in `promote'
/home/inecas/Projects/RedHat/katello/src/app/models/glue/pulp/repos.rb:522:in `promote_repos'



Steps to Reproduce:
1.create orv, env, provider, product
2.create and synchronize repo http://lzap.fedorapeople.org/fakerepos/zoo5/
3.delete the repo
4.create and synchronize repo with another name but the same url http://lzap.fedorapeople.org/fakerepos/zoo5/
5.promote product
  
Actual results:
Error

Expected results:
Successful promotion

Comment 1 Ivan Necas 2012-02-14 10:33:38 UTC
Partly this is a problem on Pulp side: see 

https://bugzilla.redhat.com/show_bug.cgi?id=790356

Comment 2 Ivan Necas 2012-02-14 10:43:31 UTC
Fixed in 06fee1b52af46fab23bef907bdcf07968d6819d2

Comment 3 Garik Khachikyan 2012-02-24 13:17:22 UTC
# VERIFIED

Checking the scenario at bug description: was able to apply yum install walrus for that promoted product.


verification made on:
---

atello-0.1.300-1.el6.noarch
candlepin-0.5.22-1.el6.noarch
pulp-0.0.267-2.el6.noarch