On 1/12/2018 9:20 AM, Guru Shetty wrote:


On 12 January 2018 at 08:37, Greg Rose <gvrose8...@gmail.com <mailto:gvrose8...@gmail.com>> wrote:

    From: Gurucharan Shetty <shet...@vmware.com
    <mailto:shet...@vmware.com>>

    There are occasions when an openvswitch kernel module rpm which does
    not match the exact build number of the running kernel. In that
    case the openvswitch kernel modules will be installed to the
    "weak-updates" directory under the /lib/modules/$(uname -r)
    directory.  But the new kernel modules will not be found because
    the default /etc/depmod.d/dist.conf search path lists weak-updates
    last.

    This patch creates a file in /etc/depmod.d/ named 01openvswitch.conf.
    This file specifies weak-updates first in the search path and since
    it is named with a preceeding "01" it will be found first by depmod.

    This resolves issues with customers who have installed openvswitch
    kernel modules previously and a kernel upgrade has occurred since
    and when the kernel minor build numbers do not exactly match the
    running kernel.

    Signed-off-by: Greg Rose <gvrose8...@gmail.com
    <mailto:gvrose8...@gmail.com>>

Signed-off-by:  Gurucharan Shetty <shet...@vmware.com <mailto:shet...@vmware.com>>

If you decide to change my author to my usually preferred ovn.org <http://ovn.org> email id, then
Signed-off-by: Gurucharan Shetty <g...@ovn.org <mailto:g...@ovn.org>>

Ah yes, of course.  What was I thinking!?  I'll add your correct authorship and signed-off-by in the next round of patches.

Thanks!


    ---

    V2 - Fix typo in commit title
    ---
     rhel/openvswitch-kmod-rhel6.spec.in
    <http://openvswitch-kmod-rhel6.spec.in> | 10 ++++++----
     rhel/openvswitch-kmod.files         |  2 +-
     2 files changed, 7 insertions(+), 5 deletions(-)

    diff --git a/rhel/openvswitch-kmod-rhel6.spec.in
    <http://openvswitch-kmod-rhel6.spec.in>
    b/rhel/openvswitch-kmod-rhel6.spec.in
    <http://openvswitch-kmod-rhel6.spec.in>
    index 8413b25..a7f4832 100644
    --- a/rhel/openvswitch-kmod-rhel6.spec.in
    <http://openvswitch-kmod-rhel6.spec.in>
    +++ b/rhel/openvswitch-kmod-rhel6.spec.in
    <http://openvswitch-kmod-rhel6.spec.in>
    @@ -62,17 +62,19 @@ for flavor in %flavors_to_build ; do
              find $INSTALL_MOD_PATH/lib/modules -iname 'modules.*'
    -exec rm {} \;
     done
     install -d %{buildroot}%{_sysconfdir}/depmod.d/
    +
    +echo "search extra/openvswitch weak-updates/openvswitch updates
    extra built-in weak-updates" >> 01%{oname}.conf
     for module in
    %{buildroot}/lib/modules/%{kernel_version}/$INSTALL_MOD_DIR/*.ko;
     do
         modname="$(basename ${module})"
    -    echo "override ${modname%.ko} * extra/%{oname}" >> %{oname}.conf
    -    echo "override ${modname%.ko} * weak-updates/%{oname}" >>
    %{oname}.conf
    +    echo "override ${modname%.ko} * extra/%{oname}" >>
    01%{oname}.conf
    +    echo "override ${modname%.ko} * weak-updates/%{oname}" >>
    01%{oname}.conf
     done
    -install -m 644 %{oname}.conf %{buildroot}%{_sysconfdir}/depmod.d/
    +install -m 644 01%{oname}.conf %{buildroot}%{_sysconfdir}/depmod.d/

     %files
     %defattr(644,root,root)
    -/etc/depmod.d/%{oname}.conf
    +/etc/depmod.d/01%{oname}.conf

     %clean
     rm -rf $RPM_BUILD_ROOT
    diff --git a/rhel/openvswitch-kmod.files b/rhel/openvswitch-kmod.files
    index 357c2e8..49262f3 100644
    --- a/rhel/openvswitch-kmod.files
    +++ b/rhel/openvswitch-kmod.files
    @@ -1,3 +1,3 @@
     %defattr(644,root,root,755)
     /lib/modules/%2-%1
    -/etc/depmod.d/openvswitch.conf
    +/etc/depmod.d/01openvswitch.conf
    --
    1.8.3.1

    _______________________________________________
    dev mailing list
    d...@openvswitch.org <mailto:d...@openvswitch.org>
    https://mail.openvswitch.org/mailman/listinfo/ovs-dev
    <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>



_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to