diff mbox

[ovs-dev,2/2] fedora: Prioritize OVS modules in weak-updates.

Message ID 20160729000938.816-2-joe@ovn.org
State Accepted
Headers show

Commit Message

Joe Stringer July 29, 2016, 12:09 a.m. UTC
Out-of-tree modules are installed into the kernel's "extra" modules
directory for the version that kmod-openvswitch is compiled against. For
all other kernels on the system at install time, a symlink is created in
the "weak-updates" directory. This provides a path for the same kernel
module to be used when minor kernel updates are done on a system.
However, without updating the depmod configuration the weak-update will
not be prioritized, so modprobe will switch back to using upstream
kernel modules when you upgrade. This patch introduces that depmod
configuration to ensure that the out-of-tree module is always used when
it is installed, regardless of kernel upgrades.

Signed-off-by: Joe Stringer <joe@ovn.org>
---
 rhel/openvswitch-kmod-fedora.spec.in | 2 ++
 1 file changed, 2 insertions(+)

Comments

Pravin Shelar July 29, 2016, 6:41 p.m. UTC | #1
On Thu, Jul 28, 2016 at 5:09 PM, Joe Stringer <joe@ovn.org> wrote:
> Out-of-tree modules are installed into the kernel's "extra" modules
> directory for the version that kmod-openvswitch is compiled against. For
> all other kernels on the system at install time, a symlink is created in
> the "weak-updates" directory. This provides a path for the same kernel
> module to be used when minor kernel updates are done on a system.
> However, without updating the depmod configuration the weak-update will
> not be prioritized, so modprobe will switch back to using upstream
> kernel modules when you upgrade. This patch introduces that depmod
> configuration to ensure that the out-of-tree module is always used when
> it is installed, regardless of kernel upgrades.
>
> Signed-off-by: Joe Stringer <joe@ovn.org>

Thanks for fixing it.

Acked-by: Pravin B Shelar <pshelar@ovn.org>

> ---
>  rhel/openvswitch-kmod-fedora.spec.in | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
> index ea89d15c8d87..93adb0330cbb 100644
> --- a/rhel/openvswitch-kmod-fedora.spec.in
> +++ b/rhel/openvswitch-kmod-fedora.spec.in
> @@ -48,6 +48,8 @@ do
>      modname="$(basename ${module})"
>      echo "override ${modname%.ko} * extra" >> \
>          $RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf
> +    echo "override ${modname%.ko} * weak-updates" >> \
> +        $RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf
>  done
>
>  %clean


Fedora spec is much easier to read. Is there way to merge these rpm spec files?
Flavio Leitner July 29, 2016, 6:53 p.m. UTC | #2
On Thu, Jul 28, 2016 at 05:09:38PM -0700, Joe Stringer wrote:
> Out-of-tree modules are installed into the kernel's "extra" modules
> directory for the version that kmod-openvswitch is compiled against. For
> all other kernels on the system at install time, a symlink is created in
> the "weak-updates" directory. This provides a path for the same kernel
> module to be used when minor kernel updates are done on a system.
> However, without updating the depmod configuration the weak-update will
> not be prioritized, so modprobe will switch back to using upstream
> kernel modules when you upgrade. This patch introduces that depmod
> configuration to ensure that the out-of-tree module is always used when
> it is installed, regardless of kernel upgrades.
> 
> Signed-off-by: Joe Stringer <joe@ovn.org>
> ---

It's been a while since I looked at kmod stuff, but looks ok.

Acked-by: Flavio Leitner <fbl@sysclose.org>
Joe Stringer July 29, 2016, 8:01 p.m. UTC | #3
On 29 July 2016 at 11:41, pravin shelar <pshelar@ovn.org> wrote:
> On Thu, Jul 28, 2016 at 5:09 PM, Joe Stringer <joe@ovn.org> wrote:
>> Out-of-tree modules are installed into the kernel's "extra" modules
>> directory for the version that kmod-openvswitch is compiled against. For
>> all other kernels on the system at install time, a symlink is created in
>> the "weak-updates" directory. This provides a path for the same kernel
>> module to be used when minor kernel updates are done on a system.
>> However, without updating the depmod configuration the weak-update will
>> not be prioritized, so modprobe will switch back to using upstream
>> kernel modules when you upgrade. This patch introduces that depmod
>> configuration to ensure that the out-of-tree module is always used when
>> it is installed, regardless of kernel upgrades.
>>
>> Signed-off-by: Joe Stringer <joe@ovn.org>
>
> Thanks for fixing it.
>
> Acked-by: Pravin B Shelar <pshelar@ovn.org>
>
>> ---
>>  rhel/openvswitch-kmod-fedora.spec.in | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
>> index ea89d15c8d87..93adb0330cbb 100644
>> --- a/rhel/openvswitch-kmod-fedora.spec.in
>> +++ b/rhel/openvswitch-kmod-fedora.spec.in
>> @@ -48,6 +48,8 @@ do
>>      modname="$(basename ${module})"
>>      echo "override ${modname%.ko} * extra" >> \
>>          $RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf
>> +    echo "override ${modname%.ko} * weak-updates" >> \
>> +        $RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf
>>  done
>>
>>  %clean
>
>
> Fedora spec is much easier to read. Is there way to merge these rpm spec files?

Perhaps. I'm not sure why they're different to begin with, although
with a quick glance it's clear that the rhel6 specfile has a bunch of
logic to deal with flavors, which the fedora packaging doesn't handle.
Joe Stringer July 29, 2016, 8:15 p.m. UTC | #4
Thanks for the reviews all, I pushed this to master.

On 29 July 2016 at 11:53, Flavio Leitner <fbl@sysclose.org> wrote:
> On Thu, Jul 28, 2016 at 05:09:38PM -0700, Joe Stringer wrote:
>> Out-of-tree modules are installed into the kernel's "extra" modules
>> directory for the version that kmod-openvswitch is compiled against. For
>> all other kernels on the system at install time, a symlink is created in
>> the "weak-updates" directory. This provides a path for the same kernel
>> module to be used when minor kernel updates are done on a system.
>> However, without updating the depmod configuration the weak-update will
>> not be prioritized, so modprobe will switch back to using upstream
>> kernel modules when you upgrade. This patch introduces that depmod
>> configuration to ensure that the out-of-tree module is always used when
>> it is installed, regardless of kernel upgrades.
>>
>> Signed-off-by: Joe Stringer <joe@ovn.org>
>> ---
>
> It's been a while since I looked at kmod stuff, but looks ok.
>
> Acked-by: Flavio Leitner <fbl@sysclose.org>
>
>
diff mbox

Patch

diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in
index ea89d15c8d87..93adb0330cbb 100644
--- a/rhel/openvswitch-kmod-fedora.spec.in
+++ b/rhel/openvswitch-kmod-fedora.spec.in
@@ -48,6 +48,8 @@  do
     modname="$(basename ${module})"
     echo "override ${modname%.ko} * extra" >> \
         $RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf
+    echo "override ${modname%.ko} * weak-updates" >> \
+        $RPM_BUILD_ROOT/etc/depmod.d/kmod-openvswitch.conf
 done
 
 %clean