Details

    • Technical task
    • Resolution: Fixed
    • Critical
    • Lustre 2.9.0
    • None
    • 9223372036854775807

    Description

      Right now when RPM packages are built, we insert into Lustre's release field the version string from the kernel against which Lustre was built. For instance:

      $ rpm -qpi lustre-2.7.0-2.6.32_504.8.1.el6_lustre.x86_64.x86_64.rpm 
      Name        : lustre
      Version     : 2.7.0
      Release     : 2.6.32_504.8.1.el6_lustre.x86_64
      

      Side note: A sysadmin is going to (and have in the past) think we messed up because of the ".x86_64.x86_64" in the file name, but the reason for it is that the first one is part of the Linux kernel version string, as we can see in the Release field above. The second .x86_64 is Lustre's.

      The reason for including the kernel's version string in Lustre's Release field because Lustre has traditionally been packaged to work with one, and only one, specific version of a kernel. If you have two very slightly different kernel versions "2.6.32_504.8.1.el6" and "2.6.32_504.8.2.el6", for instance, then you currently need to compile lustre against both kernels individually. While the "rpm -requires" should also list the specific required version number, because there are so many very closely compatible kernels for which we need to juggle lustre builds, it was simpler for sysadmins and developers alike to add the kernel's version string into Lustre's release field.

      But fortunately, this need to build lustre for every specific kernel is a self-imposed restriction, and work is under way to lift that restriction in LU-5614.

      For many years, it has been possible to compile kernel modules once and then use them with any kernel that is ABI compatible. The Linux distro mechanism that allows this is often called "weak modules". LU-5614 should bring Lustre into the year 2006 and get it working with weak modules.

      Once that is done, we can finally drop the kernel version string.

      This is especially fortuitous for anyone using koji as a build system, because koji makes this sort of abuse of standard packaging practice pretty close to impossible. koji is used by fedora and its cousins, and it has also been adopted by LLNL for its RHEL-based TOSS distribution.

      Attachments

        Issue Links

          Activity

            [LU-7643] Remove kernel version string from Lustre release field

            Bob, I think you may be thinking of another change. Change 19954 does not delete any Requires or Provides.

            morrone Christopher Morrone (Inactive) added a comment - Bob, I think you may be thinking of another change. Change 19954 does not delete any Requires or Provides.

            That's just it. These changes also delete Requires and Provides in packages too. Can't figure out dependencies using rpm queries either.

            bogl Bob Glossman (Inactive) added a comment - That's just it. These changes also delete Requires and Provides in packages too. Can't figure out dependencies using rpm queries either.
            simmonsja James A Simmons added a comment - - edited

            So the question related to the patch for this ticket is does having the kernel name string in the rpm provide any gain. I would say no. Not landing this patch will not change the kernel version dependency issues. Even when we resolve the dependency issues does having the kernel version string in the release field improve anything. Again I would say no. You can figure out kernel dependency using rpm queries instead.

            simmonsja James A Simmons added a comment - - edited So the question related to the patch for this ticket is does having the kernel name string in the rpm provide any gain. I would say no. Not landing this patch will not change the kernel version dependency issues. Even when we resolve the dependency issues does having the kernel version string in the release field improve anything. Again I would say no. You can figure out kernel dependency using rpm queries instead.

            Now you are definitely arguing that one should never use weak modules. I don't even see why it would be acceptable use them on clients if you can't trust the semantics to stay constant with the same symbol version. If you can't trust them, you can't trust them.

            As to APIs that are not part of the ABI...in the kernel I don't believe that there is any such distinction. A linux distro vendor may choose to advertise a subset of the kernel ABI that it considers stable and safe. Red Hat has a kernel symbol whitelist. Suse, in contrast, does not.

            Yes, the osd-ldiskfs package has a long list of RHEL whitelist violations. Otherwise, the usage is pretty small. In a recent random build for master on CentOS 7.2, I see only the following non-osd-ldiskfs related off-whitelist symbols (in other words, osd-ldiskfs uses many off-whitelist symbols that I am not listing here):

            PDE_DATA
            __fentry__
            __free_pages
            __stack_chk_fail
            kernel_stack
            kstrtoull
            seq_lseek
            seq_open
            seq_read
            remove_wait_queue
            

            Some of those Red Hat might be amenable to adding to the whitelist. Some maybe we can choose a different symbol. Some we might not care and decide the level of risk is completely acceptable.

            I don't see an issue with weak-modules use with zfs. Sure, maybe the way ldiskfs is currently produced makes it more vulnerable. If you want to add extra restrictions and high barriers to usage to ldiskfs then, speaking as an all-zfs house, I don't have too much of a concern about that. Some concern though...we do have some labs that might still be using ldiskfs from TOSS's lustre.

            Anyhow, I think James is right about this getting off topic for this ticket.

            morrone Christopher Morrone (Inactive) added a comment - - edited Now you are definitely arguing that one should never use weak modules. I don't even see why it would be acceptable use them on clients if you can't trust the semantics to stay constant with the same symbol version. If you can't trust them, you can't trust them. As to APIs that are not part of the ABI...in the kernel I don't believe that there is any such distinction. A linux distro vendor may choose to advertise a subset of the kernel ABI that it considers stable and safe. Red Hat has a kernel symbol whitelist. Suse, in contrast, does not. Yes, the osd-ldiskfs package has a long list of RHEL whitelist violations. Otherwise, the usage is pretty small. In a recent random build for master on CentOS 7.2, I see only the following non-osd-ldiskfs related off-whitelist symbols (in other words, osd-ldiskfs uses many off-whitelist symbols that I am not listing here): PDE_DATA __fentry__ __free_pages __stack_chk_fail kernel_stack kstrtoull seq_lseek seq_open seq_read remove_wait_queue Some of those Red Hat might be amenable to adding to the whitelist. Some maybe we can choose a different symbol. Some we might not care and decide the level of risk is completely acceptable. I don't see an issue with weak-modules use with zfs. Sure, maybe the way ldiskfs is currently produced makes it more vulnerable. If you want to add extra restrictions and high barriers to usage to ldiskfs then, speaking as an all-zfs house, I don't have too much of a concern about that. Some concern though...we do have some labs that might still be using ldiskfs from TOSS's lustre. Anyhow, I think James is right about this getting off topic for this ticket.

            James,
            I think what you are saying is correct, but it isn't just the VFS api that must stay stable. It is all the internal kernel APIs that aren't part of the well defined ABI that must stay stable. lustre kernel modules both ldiskfs and not use lots of calls to symbols that are EXPORTs, but may or may not be part of the ABI and can and do occasionally change from time to time within the same major linux version from an upstream vendor.

            bogl Bob Glossman (Inactive) added a comment - James, I think what you are saying is correct, but it isn't just the VFS api that must stay stable. It is all the internal kernel APIs that aren't part of the well defined ABI that must stay stable. lustre kernel modules both ldiskfs and not use lots of calls to symbols that are EXPORTs, but may or may not be part of the ABI and can and do occasionally change from time to time within the same major linux version from an upstream vendor.
            simmonsja James A Simmons added a comment - - edited

            I see the discuss is moving in the direction of ldiskfs <> osd_ldiskfs <> lustre having strong dependencies on each other which is needed. This is orthogonal to the dependency on the external linux kernel. What both lustre and ldiskfs depend on is that the kernel's VFS api staying stable. If that doesn't happen then weak module support is not possible. Am I missing something if this is not the discussion?

            This brings up interesting point. Do we need version hand shaking between ldiskfs and lustre? Anyways this is indeed a separate ticket.

            simmonsja James A Simmons added a comment - - edited I see the discuss is moving in the direction of ldiskfs < > osd_ldiskfs < > lustre having strong dependencies on each other which is needed. This is orthogonal to the dependency on the external linux kernel. What both lustre and ldiskfs depend on is that the kernel's VFS api staying stable. If that doesn't happen then weak module support is not possible. Am I missing something if this is not the discussion? This brings up interesting point. Do we need version hand shaking between ldiskfs and lustre? Anyways this is indeed a separate ticket.
            bogl Bob Glossman (Inactive) added a comment - - edited

            It isn't independent. Without the changes proposed here it couldn't happen. With the changes proposed here it can happen. That makes it dependent on exactly this topic.

            I may agree that it could be covered as a separate ticket from this one in spite of that. Let me think about it a bit.

            bogl Bob Glossman (Inactive) added a comment - - edited It isn't independent. Without the changes proposed here it couldn't happen. With the changes proposed here it can happen. That makes it dependent on exactly this topic. I may agree that it could be covered as a separate ticket from this one in spite of that. Let me think about it a bit.

            With osd-ldiskfs exporting only a generic "lustre-osd" Provides and other lustre packages having only that as Requires, there is now the possibility of taking an osd-ldiskfs from one build and installing it with lustre rpms from a different build.

            If that issue exists it is independent of the topic in this ticket. You can open a new ticket for that if you like.

            morrone Christopher Morrone (Inactive) added a comment - With osd-ldiskfs exporting only a generic "lustre-osd" Provides and other lustre packages having only that as Requires, there is now the possibility of taking an osd-ldiskfs from one build and installing it with lustre rpms from a different build. If that issue exists it is independent of the topic in this ticket. You can open a new ticket for that if you like.

            Your outline makes sense to me, but I'm a little worried about something unexpected creeping in if people start trying to mix and match pieces from different builds. Up until now with all lustre rpms tied to a specific kernel they all had to come from the same build. I'm not at all arguing that it was correct or even good that they were all tied that way, but it did have the beneficial side effect of blocking mix & match.

            With osd-ldiskfs exporting only a generic "lustre-osd" Provides and other lustre packages having only that as Requires, there is now the possibility of taking an osd-ldiskfs from one build and installing it with lustre rpms from a different build. While I don't know that this would cause problems I'm very much worried that it might.

            bogl Bob Glossman (Inactive) added a comment - Your outline makes sense to me, but I'm a little worried about something unexpected creeping in if people start trying to mix and match pieces from different builds. Up until now with all lustre rpms tied to a specific kernel they all had to come from the same build. I'm not at all arguing that it was correct or even good that they were all tied that way, but it did have the beneficial side effect of blocking mix & match. With osd-ldiskfs exporting only a generic "lustre-osd" Provides and other lustre packages having only that as Requires, there is now the possibility of taking an osd-ldiskfs from one build and installing it with lustre rpms from a different build. While I don't know that this would cause problems I'm very much worried that it might.

            Not sure how that is properly carried thru with the Provides exported by osd-ldiskfs or the Requires in other lustre rpms.

            I'm not entirely sure what you mean, but I'll take a stab at explaining. If the various other parts are working now, they will continue to work. The "lustre-osd" requirement is currently supplied by either the osd-zfs or osd-ldiskfs packages. One or both of them must be installed to install in order to install the main "lustre" package. With the proposed new specific kernel requirement in the osd-ldiskfs package, if the osd-zfs package is selected, everthing will install fine with any kernel that supplies the required versions of various symbols. If osd-ldiskfs is selected, it can only be installed if the correct kernel is installed.

            Of course, multiple kernels can be installed at the same time, so there is no reason that the admin needs to boot the required kernel. Only that it be installed. But that can already happen now with the packages that contain the kernel version string.

            If you think that too is too much of a problem, you are basically arguing that weak modules can't ever be used with lustre.

            morrone Christopher Morrone (Inactive) added a comment - - edited Not sure how that is properly carried thru with the Provides exported by osd-ldiskfs or the Requires in other lustre rpms. I'm not entirely sure what you mean, but I'll take a stab at explaining. If the various other parts are working now, they will continue to work. The "lustre-osd" requirement is currently supplied by either the osd-zfs or osd-ldiskfs packages. One or both of them must be installed to install in order to install the main "lustre" package. With the proposed new specific kernel requirement in the osd-ldiskfs package, if the osd-zfs package is selected, everthing will install fine with any kernel that supplies the required versions of various symbols. If osd-ldiskfs is selected, it can only be installed if the correct kernel is installed. Of course, multiple kernels can be installed at the same time, so there is no reason that the admin needs to boot the required kernel. Only that it be installed. But that can already happen now with the packages that contain the kernel version string. If you think that too is too much of a problem, you are basically arguing that weak modules can't ever be used with lustre.

            I think it would be an acceptable solution if only the osd-ldiskfs rpm has a Requires for the particular and specific kernel version it was built on. That would directly enforce and tie it to the upstream ext4 version source it was built from. This is only my opinion. I think we need buy in from all concerned. Would really like to see comment from Minh, Andreas, Dmitry, or other experts.

            Not sure how that is properly carried thru with the Provides exported by osd-ldiskfs or the Requires in other lustre rpms.

            bogl Bob Glossman (Inactive) added a comment - I think it would be an acceptable solution if only the osd-ldiskfs rpm has a Requires for the particular and specific kernel version it was built on. That would directly enforce and tie it to the upstream ext4 version source it was built from. This is only my opinion. I think we need buy in from all concerned. Would really like to see comment from Minh, Andreas, Dmitry, or other experts. Not sure how that is properly carried thru with the Provides exported by osd-ldiskfs or the Requires in other lustre rpms.

            People

              mdiep Minh Diep
              morrone Christopher Morrone (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: