Bug 896622 - [BUG] fail to import job if <packages><package name="foo"/></packages> defined..
Summary: [BUG] fail to import job if <packages><package name="foo"/></packages> defined..
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: web UI
Version: 0.11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: HOTFIX
Assignee: Dan Callaghan
QA Contact:
URL:
Whiteboard:
: 896664 901784 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-17 16:11 UTC by Bill Peck
Modified: 2018-02-06 00:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-20 23:35:56 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 869455 0 medium CLOSED submitting job with <package/> results in database error: (OperationalError) (1048, "Column 'job_id' cannot be null") 2021-02-22 00:41:40 UTC

Internal Links: 869455

Description Bill Peck 2013-01-17 16:11:12 UTC
Description of problem:
I have a job that imported Yesterday but after the 0.11 upgrade it fails to import Today.  I was able to work around it by removing the <packages> node from the job.   The strange thing is I did a bunch of test jobs and I am able to submit them with <packages> nodes.  Something about my job beaker doesn't like.  I guess it's mad at me for leaving it. :-)

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

How reproducible:
Everytime

Steps to Reproduce:
1. Clone the job in comment number 2
  
Actual results:
Failed to import job because of: (OperationalError) (1048, "Column 'recipe_id' cannot be null") 'INSERT INTO recipe_ksappend (recipe_id, ks_append) VALUES (%s, %s)' (None, '\n\ncat <<EOF >/etc/sysconfig/network-scripts/ifcfg-eth1\nDEVICE=eth1\nONBOOT=yes\nTYPE="Ethernet"\nHOTPLUG=no\nIPADDR=192.168.2.1\nNETMASK=255.255.255.0\nEOF\n\t\t\t\t\t\t\t\t\t\t')

Comment 2 Dan Callaghan 2013-01-18 00:32:59 UTC
Seems like yet another variation of bug 869455. :-(

In this case the triggering factor seems to be having a job with more than one recipe (including guestrecipes), with ks_appends in one recipe and packages in the other. You can probably trigger it by having repos or ks_appends in the second recipe as well, but I haven't checked that yet.

Comment 3 Dan Callaghan 2013-01-18 00:49:17 UTC
*** Bug 896664 has been marked as a duplicate of this bug. ***

Comment 4 Dan Callaghan 2013-01-18 00:51:45 UTC
Bug 896664 is essentially the same problem with a slightly different trigger (repos instead of ks_appends).

Comment 5 Dan Callaghan 2013-01-18 01:03:38 UTC
Workaround: convert all <repo/> and <package/> into ks_appends:

<package name="kernel" />

becomes:

<ks_append>
%post
yum install -y kernel
{{ end }}
</ks_append>

And:

<repo name="reponame" url="http://example.com/" />

becomes:

<ks_append>
%post
cat >/etc/yum.repos.d/reponame.repo <<"EOF"
[reponame]
name=reponame
baseurl=http://example.com/
enabled=1
gpgcheck=0
EOF
{{ end }}
</ks_append>

On RHEL7 and Fedora you can also add

repo --name=reponame --baseurl="http://example.com/"

at the bottom of the ks_append to make the repo available during installation. This does not work on RHEL6 and below.

Comment 6 Dan Callaghan 2013-01-18 01:12:45 UTC
On Gerrit: http://gerrit.beaker-project.org/1657

Comment 7 Dan Callaghan 2013-01-20 20:48:14 UTC
*** Bug 901784 has been marked as a duplicate of this bug. ***

Comment 8 Dan Callaghan 2013-01-20 21:14:58 UTC
This will be released as hot fix 0.11.1, hopefully today.

Comment 9 Dan Callaghan 2013-01-20 23:35:56 UTC
Beaker 0.11.1 has been released.


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