Bug 458965 - ltsp-build-client, multi client archs, /var/cache/chroot conflicts
ltsp-build-client, multi client archs, /var/cache/chroot conflicts
Status: CLOSED CANTFIX
Product: Fedora
Classification: Fedora
Component: ltsp (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Warren Togami
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-13 10:06 EDT by John Ellson
Modified: 2008-08-13 22:58 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-08-13 10:24:07 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to /etc/ltsp/kickstart/Fedora/*/ltsp-*.ks to avaoid /var/cache/chroot conflicts (4.29 KB, patch)
2008-08-13 11:41 EDT, John Ellson
no flags Details | Diff
patches to: /etc/ltsp/kickstart/Fedora/* for both issues (10.76 KB, patch)
2008-08-13 15:02 EDT, John Ellson
no flags Details | Diff
add support for --arch=i586 (967 bytes, patch)
2008-08-13 15:04 EDT, John Ellson
no flags Details | Diff
ltsp-trunk patch for the same, without i586 bits, with separate includes (4.32 KB, patch)
2008-08-13 16:31 EDT, John Ellson
no flags Details | Diff
new file: server/configs/kickstart/Fedora/common-i386.ks (65 bytes, text/plain)
2008-08-13 16:37 EDT, John Ellson
no flags Details
new file: server/configs/kickstart/Fedora/common-x86_64.ks (71 bytes, text/plain)
2008-08-13 16:38 EDT, John Ellson
no flags Details
new file: server/configs/kickstart/Fedora/common-i686.ks (65 bytes, text/plain)
2008-08-13 16:39 EDT, John Ellson
no flags Details
new file: server/configs/kickstart/Fedora/8/ltsp-x86_64.ks (702 bytes, text/plain)
2008-08-13 16:49 EDT, John Ellson
no flags Details
new file: server/configs/kickstart/Fedora/9/ltsp-x86_64.ks (591 bytes, text/plain)
2008-08-13 16:50 EDT, John Ellson
no flags Details
new file: server/configs/kickstart/Fedora/10/ltsp-x86_64.ks (827 bytes, text/plain)
2008-08-13 16:51 EDT, John Ellson
no flags Details

  None (edit)
Description John Ellson 2008-08-13 10:06:33 EDT
Description of problem:
/usr/sbin/ltsp-build-client needs to keep separate yum /var/cache/chroot caches for each client architecture.   The rpms themselves don't clash, but the mirrorlists.txt and repomd.xml files do.

Version-Release number of selected component (if applicable):
ltsp-server-5.1.15-1.fc9.x86_64

How reproducible:
I think this is what I did

Steps to Reproduce:
1.ltsp-build-client
2.ltsp-build-client --arch=x86_64
3.ltsp-build-client
  
Actual results:
fails to rebuild the i386 architecture in step 3

Expected results:


Additional info:
Comment 1 Warren Togami 2008-08-13 10:24:07 EDT
This is a well known annoying problem.

The only workaround is to rename the repositories in the kickstart file.

ltsp-i386.ks:
repo --name=released-9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-9&arch=i386
repo --name=updates-9 --mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f9&arch=i386
repo --name=temporary-9 --baseurl=http://togami.com/~k12linux-temporary/fedora/9/i386/

Perhaps 'released-9-i386'.

And we have to do it for all archs in a unique fashion.
Comment 2 John Ellson 2008-08-13 11:39:33 EDT
> Perhaps 'released-9-i386'.
> 
> And we have to do it for all archs in a unique fashion.


That works.   Tested with i386 and x86_64.   Patch to */ltsp-*.ks attached.
Comment 3 John Ellson 2008-08-13 11:41:38 EDT
Created attachment 314217 [details]
patch to /etc/ltsp/kickstart/Fedora/*/ltsp-*.ks  to avaoid /var/cache/chroot conflicts
Comment 4 Warren Togami 2008-08-13 13:08:46 EDT
Can't use that patch yet.  We need common.ks to be reorganized so the arch-specific stuff lives in the arch specific ks files.  You can have multiple %package sections between the kickstart files, this is one hint of how to split it up.
Comment 5 John Ellson 2008-08-13 13:42:54 EDT
OK, I was thinking about the other problem, but this seemed to be a separable issue. 


Since the arch-specific ks files are arch-specific, can't the custom packages be added in there, rather than another include file?  e.g.

   9/ltsp-i386.ks -------------------------
        # Kickstart Definition for Client Chroot for i686 and generic i386
        ...
        %include ../common.ks
        kernel.i686
        glibc.i686
        %end

   9/ltsp-i586.ks -------------------------
        # Kickstart Definition for Client Chroot for i586
        ...
        %include ../common.ks
        kernel.i586
        glibc.i386
        %end

   9/ltsp-x86_64.ks
        # Kickstart Definition for Client Chroot for x86_64
        ...
        %include ../common.ks
        kernel.x86_64
        glibc.x86_64
        %end

then remove kernel and glibc from common.ks (and whatever else... openssl???)

If this sounds ok in principle, I'll prepare another patch for you.
Comment 6 John Ellson 2008-08-13 15:02:42 EDT
Created attachment 314234 [details]
patches to: /etc/ltsp/kickstart/Fedora/*  for both issues

I've tested these, including --arch=i586 getting kernel.i586 in its chroot.
(see next patch also)
Comment 7 John Ellson 2008-08-13 15:04:42 EDT
Created attachment 314235 [details]
add support for --arch=i586

Adds support for --arch=i586 as a special case, instead of degrading the normal i686 case.
Comment 8 Warren Togami 2008-08-13 15:34:15 EDT
> Adds support for --arch=i586 as a special case, instead of degrading the normal
> i686 case.

This actually doesn't help at all.  Keeping the least common denominator i586 is the best we can do for this.  Also arch output is never i586.

Regarding the other patches, please try this.

Rather than %end after the include, have %package and %end in both files independently.  I subsequently learned that you can have multiple %package sections.

Also did you checkout ltsp-trunk?  Make sure you're starting out from the freshest version.
Comment 9 John Ellson 2008-08-13 16:31:34 EDT
Created attachment 314253 [details]
ltsp-trunk patch  for the same, without i586 bits, with separate includes
Comment 10 John Ellson 2008-08-13 16:37:06 EDT
Created attachment 314256 [details]
new file: server/configs/kickstart/Fedora/common-i386.ks
Comment 11 John Ellson 2008-08-13 16:38:58 EDT
Created attachment 314258 [details]
new file: server/configs/kickstart/Fedora/common-x86_64.ks
Comment 12 John Ellson 2008-08-13 16:39:39 EDT
Created attachment 314260 [details]
new file: server/configs/kickstart/Fedora/common-i686.ks
Comment 13 John Ellson 2008-08-13 16:49:38 EDT
Created attachment 314261 [details]
new file: server/configs/kickstart/Fedora/8/ltsp-x86_64.ks
Comment 14 John Ellson 2008-08-13 16:50:19 EDT
Created attachment 314262 [details]
new file: server/configs/kickstart/Fedora/9/ltsp-x86_64.ks
Comment 15 John Ellson 2008-08-13 16:51:01 EDT
Created attachment 314263 [details]
new file: server/configs/kickstart/Fedora/10/ltsp-x86_64.ks
Comment 16 Warren Togami 2008-08-13 18:42:46 EDT
It is a bit time consuming to manually apply multiple patches.  Could you please upload your own bzr tree at a URL somewhere?  I could easily grab it then, and your name would show up on the checkin history, which is a good thing.
Comment 17 John Ellson 2008-08-13 19:40:41 EDT
I hope I did this right.  Its my first use of bzr.   I've commited my changes
in my local tree.

    http://john.ellson.com/ltsp-trunk/
Comment 18 Warren Togami 2008-08-13 21:45:12 EDT
Very close to proper.  Please do the following.

1) Rename your local directory to ltsp-ellson or any other name to denote that it is your personal tree.
2) When you commit, begin the description with "Fedora: " before describing the commit.  This is because this commit is specific to Fedora.  Only checkins that are more general can commit without a prefix.

Please upload this new tree.  I can pull from it and push it with your name to the real ltsp-trunk.
Comment 19 John Ellson 2008-08-13 22:18:17 EDT
Done:
        http://john.ellson.com/ltsp-ellson/
Comment 20 Warren Togami 2008-08-13 22:33:59 EDT
Named correctly, but I don't see your checkin now.
bzr commit
bzr push
Comment 21 John Ellson 2008-08-13 22:38:17 EDT
Oops, I was hoping you weren't too quick.  I just uncommitted and recommitted to fix up my email address in the log.  Please try again.

Next, I was trying to extend this to a ppc chroot, but discovered that
this isn't going to work on a i386 server because ltsp-build-client
tries to do a "setarch ppc".  I suppose this is so that %post scripts work
in the ppc rpms?

Is there some other plan for getting chroots populated on incompatible architectures?
Comment 22 Warren Togami 2008-08-13 22:58:13 EDT
You pretty much need a ppc host in order to create a ppc chroot.  But once the chroot is created we could tarball it and offer it for people to download.  Then we find out if our magic in the default dhcpd.conf for ppc actually does anything.

BTW, have you been following our project homepage and k12linux-devel-list?  That is a lot more appropriate place to discuss this development than Bugzilla.

Welcome onboard. =)

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