Geoffroy's picture

Hello, i am trying to use tkldev for creating new products.

First, i used the tkldev Docker's image (from: spam filter) but i got the following error:

root@9ec4e2bbb35f products/core# make
deck /turnkey/fab/bootstraps/wheezy build/bootstrap
Traceback (most recent call last):
  File "/usr/lib/deck/wrapper.py", line 18, in <module>
    CliWrapper.main()
  File "/usr/lib/python2.7/dist-packages/pyproject.py", line 388, in main
    commands.run(name, args)
  File "/usr/lib/python2.7/dist-packages/pyproject.py", line 261, in run
    command.module.main()
  File "/usr/lib/deck/pylib/cmd_deck.py", line 128, in main
    func(source_path, new_deck)
  File "/usr/lib/deck/pylib/deck.py", line 299, in create
    Deck.init_create(source_path, deck_path)
  File "/usr/lib/deck/pylib/deck.py", line 215, in init_create
    deck.mount()
  File "/usr/lib/deck/pylib/deck.py", line 246, in mount
    aufs.mount(levels, self.path)
  File "/usr/lib/deck/pylib/aufs.py", line 35, in mount
    command("useraufs-mount", "--udba=reval", path, *branches)
  File "/usr/lib/python2.7/dist-packages/executil.py", line 66, in getoutput
    raise ExecError(command, exitcode, output)
executil.ExecError: non-zero exitcode (1) for command: useraufs-mount '--udba=reval'  'build/bootstrap'  '/turnkey/fab/products/core/build/.deck/levels/42317b09edf6be0a129bf75c9085c6b3'  '/turnkey/fab/bootstraps/wheezy'
mount: permission denied
fatal: non-zero exitcode (32) for command: mount -t aufs -o 'dirs=/turnkey/fab/products/core/build/.deck/levels/42317b09edf6be0a129bf75c9085c6b3:/turnkey/fab/bootstraps/wheezy,udba=reval'  'none'  'build/bootstrap'
make: *** [build/stamps/bootstrap] Error 1

 

To obtain this error, i followed this steps: pastebin.com/eYeAtE8M from the tkldev guide (redacted for the spam filter).

Forum: 
Tags: 
Geoffroy's picture

To bypass this error i tried to use the OpenStack image (from: spam filter) and came accross 2 problems:

  1. When you instanciate for the first time the image, the '/' partition's size is only ~800M with no free space left. I had to resize the disk manually to use all of the host's disk space.
     
  2. After replicating the previous steps, i came accros a new error:
  3. root@tkldev products/core# make
    deck -D build/bootstrap
    deck /turnkey/fab/bootstraps/wheezy build/bootstrap
    fab-apply-overlay /turnkey/fab/common/overlays/turnkey.d/apt build/bootstrap;
    fab-chroot build/bootstrap --script /turnkey/fab/common/conf/turnkey.d/apt;
    chroot: failed to run command `sh': No such file or directory
    Traceback (most recent call last):
      File "/usr/lib/fab/wrapper.py", line 34, in <module>
        CliWrapper.main()
      File "/usr/lib/python2.7/dist-packages/pyproject.py", line 388, in main
        commands.run(name, args)
      File "/usr/lib/python2.7/dist-packages/pyproject.py", line 261, in run
        command.module.main()
      File "/usr/lib/fab/pylib/cmd_chroot.py", line 111, in main
        fake_initctl = RevertibleInitctl(chroot)
      File "/usr/lib/fab/pylib/installer.py", line 79, in __init__
        RevertibleScript.__init__(self, path, content.splitlines())
      File "/usr/lib/fab/pylib/installer.py", line 58, in __init__
        RevertibleFile.__init__(self, path)
      File "/usr/lib/fab/pylib/installer.py", line 42, in __init__
        file.__init__(self, path, "w")
    IOError: [Errno 2] No such file or directory: '/turnkey/fab/products/core/build/bootstrap/sbin/initctl'
    Exception OSError: (2, 'No such file or directory', '/turnkey/fab/products/core/build/bootstrap/sbin/initctl') in <bound method RevertibleInitctl.__del__ of <closed file '/turnkey/fab/products/core/build/bootstrap/sbin/initctl', mode 'w' at 0x2acb288f3558>> ignored
    make: *** [build/stamps/bootstrap] Error 1
    

 

I think i am doing something wrong but i didn't find any clues or info on the actual errors. So if anyone managed to use tkldev on OpenStack or Docker can you give me the correct steps.

Thanks - Geoffroy

Jeremy Davis's picture

Firstly sorry about the problems you've had with the spam filter. Thanks for persisting. FWIW I have tweaked your account settings a little and hopefully you shouldn't have further issues posting. Please do not hesitate to email if you get stuck again (jeremy AT turnekylinux.org).

With regards to your issues with the Docker image, my suspicion is that we should probably pull the Docker build of TKLDev (and the LXC and OpenVZ builds too). I have just done a little research and it seems that currently all Linux containerised Debian Wheezy based builds (including TurnKey Docker, LXC and OpenVZ builds) have issues doing many sorts of mounts inside the container. It appears that there are workarounds and recent versions of Docker have patched this but it's outside the scope of TKL to provide those sort of fixes (or even documentation IMO - although if you'd like to pursue that then please feel free to do so and preferably share! :).

TBH I'm not sure what this will mean for future TKL builds, but I guess that's pretty much irrelevant to your current situation... Long story short, it appears that TKLDev does not work properly containerised...! Actually off on a tangenet, my research suggests that AuFS support does not exist in mainline kernel anymore and is being added by Debian and Ubuntu (and no other distros that I could find). As all containers rely on the host kernel this will probably never work (without serious tweaking of the host kernel). We may need to reconsider the use of AuFS in TKLDev and switch to something else... Anyway I digress...

With regards to point 1 of your second post, there is general acknowledgement that the OpenStack build needs some tweaking (see Issue #254). As an OpenStack user, if you have anything to add to that then it would be greatly appreciated. Also if you are interested in using OpenStack images then this thread is probably of value to you and especially the commit linked to in this post.

As to the error though, TBH I'm not quite sure...!? Can you please confirm that you have done the initial setup completely - i.e.:

cd /usr/local/sbin
wget https://raw.githubusercontent.com/turnkeylinux-apps/tkldev/master/overlay/usr/local/sbin/tkldev-setup
chmod +x tkldev-setup

./tkldev-setup

Add new comment