Paul Brett created MESOS-3029:
---------------------------------

             Summary: Stout os::release returns unsortable version
                 Key: MESOS-3029
                 URL: https://issues.apache.org/jira/browse/MESOS-3029
             Project: Mesos
          Issue Type: Bug
            Reporter: Paul Brett
            Priority: Minor


When the Linux kernel version was incremented from 2.6.39 to 3.0.0 it was 
discovered that a few applications could not process kernel versions starting 
with anything but 2.x.  For compatibility, Red Hat and others mapped kernel 
version 3.n to 2.6.n+40.  

This introduces the interesting property that kernel 2.6.50 is later that 
kernel 3.9 but Version(2, 60, 50) is not greater that Version(3, 9, 0).  Since 
we want to be able to order kernel versions, we need to undo this mapping.

The following function is proposed for use in linux/perf.cpp to address this 
issue:

Version canonicalLinuxRelease(const Version& v) {
  if((v > Version(2, 6, 39)) && (v < Version(3, 0, 0))) {
    return Version(3, v.patchVersion-40, 0);
  }
  return v;
}

We could either add this to stout/os.hpp or add a custom sort order to Version 
(which we might need later when we generalize it).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to