blktap module needed for kernel 4.16. kernel 4.16 needed for latest Ceph with bluestore backend.

  • XCP-ng Team

    That's beyond my knowledge. I suppose you should take a look on XenServer source ISO and see what kind of patches are applied to the dom0 kernel and see if you can build blktap from there.

  • XCP-ng Team

    Using DDK I'm able to build blktap from sources for kernel 3.10 but not for 4.16. Reason being Xen handers in 4.16 are improved in ./drivers/xen/ and creates slight incompatibility.

    After raising the issue, I found an old patch which upgrades blktap2 to blktap3. Im trying to see if that works.

    However I feel upgrading to blktap3 will need me to rebuild a compatible Xen which is another challenge.

    All this to have dom0 support latest ceph šŸ˜ž

    I'm feeling I should evaluate other ways. e.g. Having a local VM on host to export ceph or evaluate driver domain concept.

  • XCP-ng Team

    Yes, that's why having Ceph kernel support in Dom0 is a pain (maybe smapiv3 will be better on this). That's also why we decided to have only Gluster cliennt in dom0, not the server side.

  • XCP-ng Team

    Guys - I could build upstream dom0 kernel (4.16.8) with required blktap2 driver as well as blktap to userspace component with some help from Citrix.

    With this I can have ceph Luminous client running in dom0. Did some fio randrw benchmarks and all went well. Created a VM using an rbd image as LVM SR.

    I'll figure out a way to publish and maintain this if there is enough interest around.

    Cheers. Time to sleep 2.40AM šŸ˜„

  • XCP-ng Team

    Hey thanks a lot!

    As we all can see, if we ask Citrix devs to get more of their patch upstread, they did it! This is excellent news for everyone, and helps to make everything more Open Source in the end šŸ™‚

    Thanks again for your work @r1 !

  • XCP-ng Team

    Yes - it helped to get userspace blktap to work. šŸ™‚

    However, upstream kernel is completely missing the driver for blktap2. It needed to be fetch from older XS kernel and port on newer one with required modifications. Its location was drivers/block/blktap2

    To make this new port usable for everyone I have following options

    1. Publish kernel-4.16.8-1.src.rpm (unmaintainable)
    2. Carve out blktap2 driver from kernel code and create a separate rpm for it (most likely)
    3. Try to get blktap2 in mainline kernel as additional driver (least likely)

    Any ideas?

    It also needs the patched blktap userspace components which can be built directly from blktap GitHub repo. (procedure)

    @olivierlambert may be you can add a "Development" category on main page where this info might be useful.

  • XCP-ng Team

    Good point. On it.

    Regarding the port itself, IMHO the best solutions in order of preference (not in feasibility šŸ˜‰ šŸ˜ž

    1. Get blktap2 in the kernel as a driver (then "nothing to do" for next kernels)
    2. Create a dedicated repo able to generate a RPM from its sources
    3. Publish a big RPM blob (fine for quick benchmarks, but not maintainable as you said

    edit: what are the obstacles, in your opinion, to get to the solution nĀ°1?

  • XCP-ng Team

    As of my understanding from a previous project - a driver can be added to mainline if it has enough use cases in kernel world. Compared to the audience of kernel, blktap2 seems drop in the ocean. Upstream already has Xen while blktap2 is XenServer/XCP-ng specific, thus I think its a hard route.

    I was reading on DKMS and if this can be given out as DKMS.

    Generally, XenServer/XCP-ng doesn't refuse to boot on upstream kernel. It boots well but xapi does not start due to dependency on tapdev. Tapdev is the blktap2 driver which is expected to be present. So if we could ship this as DKMS it can be installed once dom0 is up on any upstream kernel.

    This would mean installing 2 packages - DKMS itself from epel and blktap2 driver.

    From roadmap perspective, do you have plans to take a vanilla CentOS7 and do yum install xcp-ng? or you envision that xcp-ng ISO won't go away at least for next year or so?

  • XCP-ng Team

    We don't have the resources (nor enough community dev) to be able to get CentOS 7 "transformed" into a XCP-ng in short term. There is a lot of patches to apply on top of CentOS various packages.

    So we'll focus first on a transparent/automated/testable build of XCP-ng from XS, then with this experience/know-how, we'll explore the "from pure CentOS" option.

    We need to prioritize due to our size!

  • XCP-ng Team

    Sure. Its not a need as well. I know Citrix tried it years ago but probably left for same reason.

    I'll continue to work on DKMS.

    Cheers. Enjoy the Sunday!

  • XCP-ng Team

    You too!

  • XCP-ng Team

    Update -

    1. Success in running kernel-4.16+ in dom0 with blktap2 driver + Ceph luminous version with bluestore backend.
    2. Could isolate blktap2 driver from kernel to a loadable kernel module in form of blktap2-4.16.8-modules-1.0-1.x86_64.rpm
    3. Can install any upstream kernel in dom0 but blktap2 needs to be built against same kernel else xapi won't start.

    [root@client ~]# uname -a Linux client.enlight 4.16.13 #1 SMP Wed May 30 09:22:58 GMT 2018 x86_64 x86_64 x86_64 GNU/Linux

    [root@client ~]# rpm -ivh blktap2-4.16.8-modules-1.0-1.x86_64.rpm
    error: Failed dependencies: kernel-uname-r = 4.16.8 is needed by blktap2-4.16.8-modules-1.0-1.x86_64

    So essentially to make it worth - the only option is to setup a continous build system that will build latest stable kernels and host either full upstream dom0 compatible kernel or just the blktap2 module... may be both šŸ™‚

    Time to rest blktap2 and move to the actual Ceph productivity integrations.

  • XCP-ng Team

    We want to make this CI stuff, that we will be the goal of Sam, our new recruit coming in 20 days!

    edit: @r1 you are obviously more than welcome aboard to help us on that!

  • XCP-ng Team

    @olivierlambert Would you want to include this in that CI? May be on an experimental branch.

  • XCP-ng Team

    I don't know yet, it's likely we'll have multiple CI, one for "stable", one for "experimental" with a lot of fun stuff inside šŸ™‚

  • XCP-ng Team

    Cool šŸ˜„

    I'll get the patch added to GitHub for open access till then.

  • XCP-ng Team

    I added the patch on Github - I'm testing it in various systems.

    If you are using RBDSR then use the extra flag device-config:rbd-mode=kernel while creating the PBD.


  • XCP-ng Team


    Is there a way to get this upstream?

  • XCP-ng Team

    I don't know yet.
    I will try for centos-release-xen as its a SIG and maintains Xen specific dom0 kernel.

  • XCP-ng Team

    The CentOS packaging of Xen is very different from XenServer/XCP-ng. "Upstream" for me meant XenServer, no CentOS (at least for a bit)

Log in to reply

XCP-ng Pro Support

XCP-ng Pro Support