← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1802101] Re: Devstack OVS module: OVS compilation fails when using an old kernel (even if the build_modules param is False)

 

Reviewed:  https://review.openstack.org/616195
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=cdfeeaf2bcd422c1b5cbb9d9ccc49ec639f5abea
Submitter: Zuul
Branch:    master

commit cdfeeaf2bcd422c1b5cbb9d9ccc49ec639f5abea
Author: Lucas Alvares Gomes <lucasagomes@xxxxxxxxx>
Date:   Wed Nov 7 13:17:43 2018 +0000

    DevStack: OVS: Only install kernel-* packages when needed
    
    If the host OS is using an older kernel and invoke the compile_ovs
    function from the DevStack OVS library (devstack/lib/ovs), that function
    will try to install the kernel-dev and kernel-headers package even if
    the "build_modules" parameter is set to False.
    
    That could fail because the specific kernel-* packages for the version
    of the kernel running may not be present in the distro's repository
    anymore. Plus, if the kernel modules will not be compiled, there's no
    reason to install such packages.
    
    This patch is fixing this problem by using the "build_modules" parameter
    as a flag to whether install or not those kernel-* packages.
    
    Change-Id: I11af0e22d25973e6334e867ab2659fbdf9f10d86
    Closes-Bug: #1802101
    Signed-off-by: Lucas Alvares Gomes <lucasagomes@xxxxxxxxx>


** Changed in: neutron
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1802101

Title:
  Devstack OVS module: OVS compilation fails when using an old kernel
  (even if the build_modules param is False)

Status in neutron:
  Fix Released

Bug description:
  The compile_ovs function from the DevStack OVS module fails when the
  host OS is using a older kernel even if the "build_modules" parameter
  is set to False.

  The code will attempt to install the matching version of the kernel-
  devel and kernel-headers package, but, since we are running with an
  older kernel those package may not be presented.

  There's no reason to install these packages when we are not compiling
  the modules, so, I suggest we use the "build_modules" parameters as a
  flag to indicate whether these packages should be installed or not.

  Output:

  + RETRY_UPDATE=True
  + [[ False = \T\r\u\e ]]
  + is_ubuntu
  + [[ -z rpm ]]
  + '[' rpm = deb ']'
  + real_install_package kernel-devel-3.10.0-944.el7.x86_64
  + is_ubuntu
  + [[ -z rpm ]]
  + '[' rpm = deb ']'
  + is_fedora
  + [[ -z RedHatEnterpriseServer ]]
  + '[' RedHatEnterpriseServer = Fedora ']'
  + '[' RedHatEnterpriseServer = 'Red Hat' ']'
  + '[' RedHatEnterpriseServer = RedHatEnterpriseServer ']'
  + yum_install kernel-devel-3.10.0-944.el7.x86_64
  + local result parse_yum_result
  + [[ '' = \T\r\u\e ]]
  + time_start yum_install
  + local name=yum_install
  + local start_time=
  + [[ -n '' ]]
  ++ date +%s%3N
  + _TIME_START[$name]=1541413607804
  + parse_yum_result='              \
          BEGIN { result=0 }          \
          /^YUM_FAILED/ { result=$2 } \
          /^No package/ { result=2 }  \
          /^Failed:/    { result=2 }  \
          //{ print }                 \
          END { exit result }'
  + sudo_with_proxies yum install -y kernel-devel-3.10.0-944.el7.x86_64
  + awk '              \
          BEGIN { result=0 }          \
          /^YUM_FAILED/ { result=$2 } \
          /^No package/ { result=2 }  \
          /^Failed:/    { result=2 }  \
          //{ print }                 \
          END { exit result }'
  + echo YUM_FAILED 1
  + result=1

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1802101/+subscriptions


References