Bug 785225

Summary: dealing with package/group NOT found errors
Product: [Retired] CloudForms Cloud Engine Reporter: Dave Johnson <dajohnso>
Component: imagefactoryAssignee: Ian McLeod <imcleod>
Status: CLOSED WONTFIX QA Contact: Martin Kočí <mkoci>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0.0CC: akarol, brad, dajohnso, deltacloud-maint, dgao, hbrock, jturner, morazi, ssachdev, whayutin
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-26 13:59:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
0001-BZ-785225-Customize-packages-one-at-a-time-to-captur.patch none

Description Dave Johnson 2012-01-27 17:29:00 UTC
Description of problem:
=================================
When setting up a template to install either of the following, the build completes without error.  This is because yum permissively ignores these when they are not found.  

    <package name="@asdasdasd"/>
    <package name="asdasdasdads"/>

At a minimum, imagefactory should probably log these failures so there is at least some type of feedback.  In thinking of aeolus-conductor integration, logging would not help.  

Version-Release number of selected component (if applicable):
===================================================================
imagefactory.noarch 0:1.0.0rc2_17_g6a682b6-1.el6

Comment 1 wes hayutin 2012-01-27 17:54:09 UTC
huh.. I thought anaconda would fail on that.. interesting

Comment 2 Ian McLeod 2012-02-01 18:51:34 UTC
Anaconda may fail but yum does not.  I've verified this behaviour on the command line.

Annoyingly, a reference to a package group _will_ fail if there are not groups at all in any of the associated repos.  However, once defined groups are present, adding a non-existent group name does not produce an error.

I will see if we can get yum to be more strict about this.  If not, this is going to be a bit more effort to fix, since we'll need to check all groups and packages in the TDL in some step that is distinct from the yum install command.

Comment 3 jrd 2012-02-03 19:17:43 UTC
Ian, what's the expectation on this?  If you think it will be done prior to the puddle build on 2/8, plz annotate here.

Comment 4 wes hayutin 2012-02-03 20:03:58 UTC
wondering if jlaska could assist here w/ yum foo

Comment 5 James Laska 2012-02-03 20:32:29 UTC
(In reply to comment #1)
> huh.. I thought anaconda would fail on that.. interesting

If you are using "%packages --ignoremissing" in the kickstart, anaconda will blissfully ignore any typos in the %package section.  I've never been clear how to find the kickstart used when building images.

https://fedoraproject.org/wiki/Anaconda/Kickstart#Chapter_3._Package_Selection

Comment 6 Ian McLeod 2012-02-03 21:35:53 UTC
After talking this over with James, and James in turn talking to Seth, it seems there's no way to induce yum to err out when packages or groups are missing, unless every package and/or group in a transaction is missing.

The solution they've proposed is to use a series of yum commands, one per package or group in the TDL.

This sounds fine to me but will require some non-trivial changes to Oz that I'm hesitant to make prior to 1.0.

Comment 7 James Laska 2012-02-06 14:14:12 UTC
Created attachment 559642 [details]
0001-BZ-785225-Customize-packages-one-at-a-time-to-captur.patch

(In reply to comment #6)
> After talking this over with James, and James in turn talking to Seth, it seems
> there's no way to induce yum to err out when packages or groups are missing,
> unless every package and/or group in a transaction is missing.
> 
> The solution they've proposed is to use a series of yum commands, one per
> package or group in the TDL.

Rather than looping over SSH calls, I wonder if it might be sensible in the short-term to iterate within a single SSH call?

I have attached a patch to demonstrate.  Would this be acceptable for 1.0?

Comment 8 Hugh Brock 2012-02-08 16:34:38 UTC
JRD, need you/Ian to make a call whether this is doable for 1.0 or not. Either dev-ack it or move it to cloudforms-1.1.0.

Comment 9 Ian McLeod 2012-02-09 15:53:13 UTC
I would prefer to push this to 1.1.0.  The proposed approach (looping through yum commands) is entirely reasonable but is a pretty fundamental change in our customization step, one that I don't want to make at this point.

The only downside is a failure to clearly notify users that they've included packages or groups that don't actually exist.

Given that we are encouraging people to use auto-generated templates, and these templates are being generated by a tool (Katello) that has absolute knowledge of what is present in individual repos, I think the risk associated with keeping this as-is is minimal.

Comment 10 James Laska 2012-02-09 16:12:00 UTC
(In reply to comment #9)
> I would prefer to push this to 1.1.0.  The proposed approach (looping through
> yum commands) is entirely reasonable but is a pretty fundamental change in our
> customization step, one that I don't want to make at this point.

No objections

> The only downside is a failure to clearly notify users that they've included
> packages or groups that don't actually exist.
> 
> Given that we are encouraging people to use auto-generated templates, and these
> templates are being generated by a tool (Katello) that has absolute knowledge
> of what is present in individual repos, I think the risk associated with
> keeping this as-is is minimal.

Agreed.  Additionally, I don't think we are inconsistently handling missing or incorrect package issues.  Perhaps the only difference between image build+push and the yum command-line is that with the command-line ... you get the following feedback:

> # yum install homey-dont-play-that
> Loaded plugins: langpacks, presto, refresh-packagekit
> Setting up Install Process
> No package homey-dont-play-that available.
> Error: Nothing to do

Perhaps our focus for 1.0 is ensuring that information is available in a log somehwere?

Comment 11 Mike Orazi 2012-08-15 16:51:54 UTC
This appears to have been auto-approved because flags weren't flipped prior to moving to 1.1.0?.  This is will be considered for a future release.

Comment 12 Ian McLeod 2014-03-26 13:59:24 UTC
Here again, the move seems to be away from using TDL and back toward using custom kickstart/preeseed/etc.  I'm going to close this as WONTFIX.