T-shooting Tips for a Failing Mock-init (code: QWERTY)

Tweeks tweeks at rackspace.com
Thu Dec 6 14:18:01 UTC 2012


On Thursday 06 December 2012, Moray Henderson wrote:
> > From: Tweeks [mailto:tweeks at rackspace.com]
> > Sent: 29 November 2012 15:01
> >
> > I probably banged my head with some of your in the #koji channel a
> > couple of weeks ago on this.. but I never got it figured out.  My work
> > group was trying to set
> > up a CI/CD Jenkings test & build server using Jenkins + Koji (all on
> > one box) and ran into some probelms.  Besides the documentation not
> > exactly being well suited
> > for SSL auth configs, we found that we could get everything working
> > except the actual mock portion.  The mock chroot seems to get mostly
> > set up (packages installed
> > by kojibuilder/kojid), but when the system tried to do the mock-init,
> > it fails every time.
> >
> > We even tried following the #koji guys' suggestions of invoking mock
> > manually from the command line like this:
> > =============
> > # su - kojibuilder
> > -bash-3.2$ mock -r koji/dist-c5-build-6-10 --init
> > INFO: mock.py version 1.0.28 starting...
> > State Changed: init plugins
> > INFO: selinux enabled
> > WARNING: selinux: 'yum' does not support '--setopt' option
> > State Changed: start
> > State Changed: lock buildroot
> > State Changed: clean
> > INFO: chroot (/var/lib/mock/dist-c5-build-6-10) unlocked and deleted
> > State Changed: unlock buildroot
> > State Changed: init
> > State Changed: lock buildroot
> > Mock Version: 1.0.28
> > INFO: Mock Version: 1.0.28
> > INFO: calling preinit hooks
> > State Changed: running yum
> > State Changed: unlock buildroot
> > INFO: Installed packages:
> > fd =  None  <---------
> > fd =  8 <--------  I added these to puython for t-shooting...
> > fd =  10 <---------
> > Traceback (most recent call last):
> >   File "/usr/sbin/mock", line 866, in ?
> >     main(retParams)
> >   File "/usr/sbin/mock", line 738, in main
> >     chroot.init()
> >   File "<peak.util.decorators.rewrap wrapping mockbuild.backend.init at
> > 0x012C89B0>", line 3, in init
> >   File "/usr/lib/python2.4/site-packages/mockbuild/trace_decorator.py",
> > line 70, in trace
> >     result = func(*args, **kw)
> >   File "/usr/lib/python2.4/site-packages/mockbuild/backend.py", line
> > 258, in init
> >     self._show_installed_packages()
> >   File "/usr/lib/python2.4/site-packages/mockbuild/backend.py", line
> > 553, in _show_installed_packages
> >     gid=self.chrootgid,
> >   File "/usr/lib/python2.4/site-packages/mockbuild/backend.py", line
> > 489, in doChroot
> >     printOutput=printOutput, *args, **kargs)
> >   File "<peak.util.decorators.rewrap wrapping mockbuild.util.do at
> > 0x0128A758>", line 3, in do
> >   File "/usr/lib/python2.4/site-packages/mockbuild/trace_decorator.py",
> > line 70, in trace
> >     result = func(*args, **kw)
> >   File "/usr/lib/python2.4/site-packages/mockbuild/util.py", line 317,
> > in do
> >     preexec_fn = preexec,
> >   File "/usr/lib64/python2.4/subprocess.py", line 550, in __init__
> >     errread, errwrite)
> >   File "/usr/lib64/python2.4/subprocess.py", line 999, in
> > _execute_child
> >     raise child_exception
> > OSError: [Errno 2] No such file or directory
> > ^^^^^^^^^^^^^^^
> >
> > Anyone have some good t-shooting tips?
> > BTW.. I'm just trying to build a RHEL zsh src RPM here. nothing fancy.
> >
> > Our system is CentOS 5.8 (a requirement), koji-1.7.
>
> A combination of "INFO: selinux enabled" at the top and "OSError: [Errno
> 2]" at the bottom is suspicious.

No. Not at all. That just means it's in the kernel. Not enforcing:
# getenforce
Permissive


> I haven't played with the interaction 
> between Koji, Mock and SELinux, but does a "setenforce 0" before manually
> initializing the mock root make any difference?

No. It's not enforcing already.


Tweeks

>
>
> Moray.
> "To err is human; to purr, feline."




More information about the buildsys mailing list