[Bug 430586] New: obs/kiwi: missing or unset variables in bs_worker
https://bugzilla.novell.com/show_bug.cgi?id=430586 Summary: obs/kiwi: missing or unset variables in bs_worker Product: openSUSE.org Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: BuildService AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dl9pf@gmx.de QAContact: adrian@novell.com Found By: Community User With svn 5191 i see this error on the worker side: got job, run build... Use of uninitialized value $projid in concatenation (.) or string at /bs_worker line 648. Use of uninitialized value $repoid in concatenation (.) or string at /bs_worker line 648. Building 'obs-imaging' for project '' repository '' arch 'i586' fetching sources...Use of uninitialized value $projid in concatenation (.) or string at ./bs_worker line 448. remote error: 404 projid is empty build failed, send back logfile... Use of uninitialized value in concatenation (.) or string at ./bs_worker line 1110. rpc failed: bad uri: /putjob?job=imaging::image::obs- imaging-7333eb8af291e08e7d0fc243bce3d723&arch=i586&jobid=4f63cf6ba69ff4ad2a75f20d4aa47730&code=failed -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=430586 User dl9pf@gmx.de added comment https://bugzilla.novell.com/show_bug.cgi?id=430586#c1 Jan-Simon Möller <dl9pf@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dl9pf@gmx.de --- Comment #1 from Jan-Simon Möller <dl9pf@gmx.de> 2008-09-29 07:38:35 MDT --- my $repo = $buildinfo->{'path'}->[0]; Looking at the code and printing some values i found that $buildinfo->{'path'}->[0] is empty ! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=430586 User dl9pf@gmx.de added comment https://bugzilla.novell.com/show_bug.cgi?id=430586#c2 Jan-Simon Möller <dl9pf@gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mls@novell.com --- Comment #2 from Jan-Simon Möller <dl9pf@gmx.de> 2008-09-29 08:52:57 MDT --- The generated $buildinfo in line 988 of bs_worker has no 'path' element. It looks like: infoxml: '<buildinfo project="imaging" repository="image" package="obs-imaging"> <job>imaging::image::obs-imaging-7333eb8af291e08e7d0fc243bce3d723</job> <arch>i586</arch> <srcmd5>7333eb8af291e08e7d0fc243bce3d723</srcmd5> <verifymd5>7333eb8af291e08e7d0fc243bce3d723</verifymd5> <rev>1</rev> <file>config.kiwi</file> </buildinfo> ' bsxml: 'ARRAY(0xd147c8)' buildinfo: 'HASH(0xe346d0)' buildinfo=: repository image verifymd5 7333eb8af291e08e7d0fc243bce3d723 arch i586 project imaging file config.kiwi job imaging::image::obs-imaging-7333eb8af291e08e7d0fc243bce3d723 package obs-imaging srcmd5 7333eb8af291e08e7d0fc243bce3d723 rev 1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=430586 User mls@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=430586#c3 Michael Schröder <mls@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.provo.novell.com |mls@novell.com Status|NEW |ASSIGNED --- Comment #3 from Michael Schröder <mls@novell.com> 2008-09-29 09:43:56 MDT --- Yes, sorry, building images with kiwi is currently broken (as we're implementing building installation repos with kiwi). Unfortunately both types are called "kiwi" at the moment. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=430586 User dl9pf@gmx.de added comment https://bugzilla.novell.com/show_bug.cgi?id=430586#c4 --- Comment #4 from Jan-Simon Möller <dl9pf@gmx.de> 2008-09-29 16:56:05 MDT --- Tnx, Michael for splitting the kiwi code in svn. Here's my report: With some edges it works here, but bails out with "build did not create packages". And: the kiwi jobs build in a loop! got job, run build... Building 'obs-imaging' for project 'imaging' repository 'image' arch 'i586' using helper linux32 fetching sources...into /tmp//root_2/.build-srcdir fetching packages... Saving Primary metadata Saving file lists metadata Saving other metadata 272/272 - busybox.rpm Saving Primary metadata Saving file lists metadata Saving other metadata Sep-30 00:51:09 <1> : [PROFILE]: kiwi_keytable="" Sep-30 00:51:09 <1> : [PROFILE]: kiwi_size="100M" Sep-30 00:51:09 <1> : Setting up linuxrc... Sep-30 00:51:09 <1> : EXEC [cp /tmp//root_1/kiwi-root/linuxrc /tmp//root_1/kiwi-root/init 2>&1] Sep-30 00:51:09 <1> : EXEC [chmod u+x /tmp//root_1/kiwi-root/linuxrc /tmp//root_1/kiwi-root/init 2>&1] done Sep-30 00:51:09 <1> : EXEC [mkdir -p /tmp//root_1/kiwi-root/image] Sep-30 00:51:09 <1> : EXEC [cp /tmp//root_1/.build-srcdir//config.kiwi /tmp//root_1/kiwi-root/image 2>&1] Sep-30 00:51:09 <1> : EXEC [cp /tmp//root_1/.build-srcdir//images.sh /tmp//root_1/kiwi-root/image 2>&1] Sep-30 00:51:09 <1> : EXEC [cp /tmp//root_1/.build-srcdir//config-cdroot.tgz /tmp//root_1/kiwi-root/image 2>&1] Sep-30 00:51:09 <1> : EXEC [cp /tmp//root_1/.build-srcdir//config-cdroot.sh /tmp//root_1/kiwi-root/image 2>&1] Sep-30 00:51:09 <1> : EXEC [cp /tmp//root_1/kiwi-root/.profile /tmp//root_1/kiwi-root/image 2>&1] Sep-30 00:51:09 <1> : EXEC [chroot /tmp//root_1/kiwi-root grep -q ^root: /etc/group 2>&1] Sep-30 00:51:09 <1> : EXEC [chroot /tmp//root_1/kiwi-root grep -q ^root: /etc/passwd 2>&1] Sep-30 00:51:09 <1> : Modifying user: root [root] Sep-30 00:51:09 <1> : EXEC [chroot /tmp//root_1/kiwi-root /usr/sbin/usermod -p '' root 2>&1] done Sep-30 00:51:09 <1> : Setting owner/group permissions root [root] Sep-30 00:51:09 <1> : EXEC [chroot /tmp//root_1/kiwi-root chown -R root:root /] done Sep-30 00:51:09 <1> : EXEC [diff -q /etc/resolv.conf /tmp//root_1/kiwi-root/etc/resolv.conf] Sep-30 00:51:09 <1> : Cleanup temporary copy of resolv.conf Sep-30 00:51:09 <1> : EXEC [rm -f /tmp//root_1/kiwi-root/etc/resolv.conf] done Sep-30 00:51:09 <1> : EXEC [rm -f /tmp//root_1/kiwi-root/.buildenv] Sep-30 00:51:10 <1> : KIWI exited successfully done build succeeded build did not create packages build failed, send back logfile... sent, all done... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=430586 User dl9pf@gmx.de added comment https://bugzilla.novell.com/show_bug.cgi?id=430586#c5 --- Comment #5 from Jan-Simon Möller <dl9pf@gmx.de> 2008-09-29 20:32:31 MDT --- Some more notes: ################ #1 : #### sorting 1 packages - obs-imaging (kiwi) start build Use of uninitialized value in substitution (s///) at BSFileDB.pm line 86. scheduled: 1 #2 : #### ==> /srv/obs/log/rep_server.log <== POST /putjob?job=imaging::image::obs-imaging-8d2731b6e7128e3694ffb623f20177a6&arch=i586&jobid=5b54b5ce156a4bd4c2913eb4159676be&code=succeeded 192.168.10.2: illegal file in cpio archive: limbo-auto-config.i686-0.0.1 Quick'n'dirty hacks: #################### #1 : kiwi output can end in different suffixes, in my case its no suffix, but "-0.0.1" (the version string from config.kiwi) ############################################################################################################################ linux-obs:/usr/lib/obs/server # svn diff bs_repserver Index: bs_repserver =================================================================== --- bs_repserver (Revision 5207) +++ bs_repserver (Arbeitskopie) @@ -720,7 +720,7 @@ # right job, fetch everything! my $dir = "$jobsdir/$arch/$job:dir"; mkdir_p($dir); - my $uploaded = BSServer::read_cpio($dir, 'accept' => '^(meta|.*\.rpm|.*\.deb|.*\.iso|logfile)$'); + my $uploaded = BSServer::read_cpio($dir, 'accept' => '^(meta|.*\.rpm|.*\.deb|.*\.iso|.*0.1|logfile)$'); die("upload error\n") unless $uploaded; if ($BSConfig::sign) { my @signargs; @@ -753,7 +753,7 @@ my $success = 0; for my $file (@$uploaded) { - next unless $file->{'name'} =~ /\.(?:rpm|deb|iso)$/; + next unless $file->{'name'} =~ /\.(?:rpm|deb|iso|0.1)$/; $success = 1; last; } #2 : again: file can end in several suffixes or none ! special handling needed # need to filter out <file>.md5 linux-obs:/usr/lib/obs/server # svn diff bs_worker Index: bs_worker =================================================================== --- bs_worker (Revision 5207) +++ bs_worker (Arbeitskopie) @@ -683,6 +683,7 @@ push @args, '--prepare', "$srcdir/"; push @args, '--logfile', "$buildroot/.build.log"; push @args, '--root', "$buildroot/kiwi-root"; + print "@args \n"; if (qsystem(@args)) { print "build failed\n"; return 1; @@ -1085,13 +1088,27 @@ push @d, 'SRPMS'; @d = ('DEBS') if $buildinfo->{'file'} =~ /\.dsc$/; @d = ('KIWI') if $buildinfo->{'file'} =~ /\.kiwi$/; for my $d (@d) { - if (opendir(D, "$buildroot/.build.packages/$d")) { - push @send, map {"$buildroot/.build.packages/$d/$_"} grep {/\.(?:deb|rpm|iso)$/} readdir(D); - close D; + if ($d =~ /KIWI/i) { + system("find $buildroot/.build.packages/"); + if (opendir(D, "$buildroot/.build.packages/$d")) { + my @x; + @x = readdir(D); + my @y; + # version = 0.0.1 -> file ends with "-0.0.1" - UGLY HACK ! + @y = map {"$buildroot/.build.packages/$d/$_"} grep {/-0.0.1$/} @x; + push @send, @y; + close D; + } } - } + else { + if (opendir(D, "$buildroot/.build.packages/$d")) { + push @send, map {"$buildroot/.build.packages/$d/$_"} grep {/\.(?:deb|rpm|iso)$/} readdir(D); + close D; + } + } + } @send = map {{name => (split('/', $_))[-1], filename => $_}} @send; if (!@send) { print "build did not create packages\n"; $ex = 1; Result: Worker succeeds, transfer succeeds, but build fails and loops. Nothing stored. :(( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=430586 User dl9pf@gmx.de added comment https://bugzilla.novell.com/show_bug.cgi?id=430586#c6 --- Comment #6 from Jan-Simon Möller <dl9pf@gmx.de> 2008-10-26 06:10:48 MDT --- Can we get the endless rebuild/store of the result fixed ? I really need this working. Where can I help to debug/tip where to look first? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com