diff mbox series

[ovs-dev] Documentation: Document module install issues

Message ID 1509644808-6199-1-git-send-email-gvrose8192@gmail.com
State Changes Requested
Headers show
Series [ovs-dev] Documentation: Document module install issues | expand

Commit Message

Gregory Rose Nov. 2, 2017, 5:46 p.m. UTC
On certain Ubuntu systems running the 4.4 based kernel depmod
may not correctly search for module dependencies when newer
openvswitch kernel modules have been installed in the extra
directory at /lib/modules/$(uname -r)/extra.  A symptom of
this are the following messages in system log that can be
printed with the dmesg command:

[164917.582125] vport_lisp: disagrees about version of symbol ovs_netdev_link
[164917.582139] vport_lisp: Unknown symbol ovs_netdev_link (err -22)
[164917.582155] vport_lisp: Unknown symbol ovs_lisp_fill_metadata_dst (err 0)
[164917.582165] vport_lisp: Unknown symbol rpl_rtnl_delete_link (err 0)
[164917.582169] vport_lisp: disagrees about version of symbol ovs_netdev_tunnel_destroy
[164917.582170] vport_lisp: Unknown symbol ovs_netdev_tunnel_destroy (err -22)
[164917.582178] vport_lisp: Unknown symbol rpl_lisp_xmit (err 0)
[164917.582184] vport_lisp: Unknown symbol rpl_lisp_dev_create_fb (err 0)
[164917.582187] vport_lisp: disagrees about version of symbol __ovs_vport_ops_register
[164917.582188] vport_lisp: Unknown symbol __ovs_vport_ops_register (err -22)
[164917.582191] vport_lisp: disagrees about version of symbol ovs_vport_ops_unregister
[164917.582192] vport_lisp: Unknown symbol ovs_vport_ops_unregister (err -22)
[164917.582194] vport_lisp: disagrees about version of symbol ovs_vport_alloc
[164917.582195] vport_lisp: Unknown symbol ovs_vport_alloc (err -22)
[164917.582197] vport_lisp: disagrees about version of symbol ovs_vport_free
[164917.582198] vport_lisp: Unknown symbol ovs_vport_free (err -22)
[164917.606229] vport_stt: disagrees about version of symbol ovs_netdev_link
[164917.606233] vport_stt: Unknown symbol ovs_netdev_link (err -22)
[164917.606248] vport_stt: Unknown symbol ovs_stt_fill_metadata_dst (err 0)
[164917.606260] vport_stt: Unknown symbol rpl_rtnl_delete_link (err 0)
[164917.606264] vport_stt: disagrees about version of symbol ovs_netdev_tunnel_destroy
[164917.606266] vport_stt: Unknown symbol ovs_netdev_tunnel_destroy (err -22)
[164917.606274] vport_stt: Unknown symbol ovs_stt_dev_create_fb (err 0)
[164917.606279] vport_stt: disagrees about version of symbol __ovs_vport_ops_register
[164917.606281] vport_stt: Unknown symbol __ovs_vport_ops_register (err -22)
[164917.606285] vport_stt: disagrees about version of symbol ovs_vport_ops_unregister
[164917.606286] vport_stt: Unknown symbol ovs_vport_ops_unregister (err -22)
[164917.606291] vport_stt: disagrees about version of symbol ovs_vport_alloc
[164917.606292] vport_stt: Unknown symbol ovs_vport_alloc (err -22)
[164917.606295] vport_stt: disagrees about version of symbol ovs_vport_free
[164917.606297] vport_stt: Unknown symbol ovs_vport_free (err -22)
[164917.606305] vport_stt: Unknown symbol ovs_stt_xmit (err 0)

When this occurs the 'make check-kmod' command will experience many
failures and openvswitch will not operate correctly.

Document adding the 'extra' directory to the depmod search configuration
file in /etc/depmod.d/ubuntu.conf.  Adding the extra directory to the
depmod search path fixes the problem.

Signed-off-by: Greg Rose <gvrose8192@gmail.com>
---
 Documentation/intro/install/general.rst | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

Comments

Ben Pfaff Nov. 2, 2017, 6:07 p.m. UTC | #1
On Thu, Nov 02, 2017 at 10:46:48AM -0700, Greg Rose wrote:
> On certain Ubuntu systems running the 4.4 based kernel depmod
> may not correctly search for module dependencies when newer
> openvswitch kernel modules have been installed in the extra
> directory at /lib/modules/$(uname -r)/extra.  A symptom of
> this are the following messages in system log that can be
> printed with the dmesg command:

Thanks for figuring out the problem and documenting a fix.  I really
appreciate documentation patches.

> +        #!/bin/sh
> +
> +        check_ubuntu_depmod_config() {
> +            if [ -e /etc/depmod.d/ubuntu.conf ]; then
> +                if ! grep -q extra /etc/depmod.d/ubuntu.conf
> +                    then
> +                    sed -i s\/search\/"search extra"\/ /etc/depmod.d/ubuntu.conf
> +                    /sbin/depmod -a
> +                fi
> +            fi
> +        }

I wonder about the details of this particular fix.  Usually, when there
is a configuration file in a .d directory, like depmod.d, it is possible
to add more files to the same directory that also get used for
configuration.  When that works, it is usually better to add files to
the directory rather than changing existing files, because it behaves
better on upgrade.  So, in this case, I wonder whether it is possible to
add a new file that would have something like:

    search extra

or

    override kmod * extra

The latter is suggested by depmod.d(5).
Gregory Rose Nov. 2, 2017, 6:12 p.m. UTC | #2
On 11/02/2017 11:07 AM, Ben Pfaff wrote:
> On Thu, Nov 02, 2017 at 10:46:48AM -0700, Greg Rose wrote:
> > On certain Ubuntu systems running the 4.4 based kernel depmod
> > may not correctly search for module dependencies when newer
> > openvswitch kernel modules have been installed in the extra
> > directory at /lib/modules/$(uname -r)/extra.  A symptom of
> > this are the following messages in system log that can be
> > printed with the dmesg command:
>
> Thanks for figuring out the problem and documenting a fix.  I really
> appreciate documentation patches.
>
> > +        #!/bin/sh
> > +
> > +        check_ubuntu_depmod_config() {
> > +            if [ -e /etc/depmod.d/ubuntu.conf ]; then
> > +                if ! grep -q extra /etc/depmod.d/ubuntu.conf
> > +                    then
> > +                    sed -i s\/search\/"search extra"\/ /etc/depmod.d/ubuntu.conf
> > +                    /sbin/depmod -a
> > +                fi
> > +            fi
> > +        }
>
> I wonder about the details of this particular fix.  Usually, when there
> is a configuration file in a .d directory, like depmod.d, it is possible
> to add more files to the same directory that also get used for
> configuration.  When that works, it is usually better to add files to
> the directory rather than changing existing files, because it behaves
> better on upgrade.  So, in this case, I wonder whether it is possible to
> add a new file that would have something like:
>
>      search extra
>
> or
>
>      override kmod * extra
>
> The latter is suggested by depmod.d(5).
>
I'll give it a try and get back with the results.

Thanks!
Gregory Rose Nov. 2, 2017, 7:55 p.m. UTC | #3
On 11/02/2017 11:12 AM, Greg Rose wrote:
> On 11/02/2017 11:07 AM, Ben Pfaff wrote:
>> On Thu, Nov 02, 2017 at 10:46:48AM -0700, Greg Rose wrote:
>> > On certain Ubuntu systems running the 4.4 based kernel depmod
>> > may not correctly search for module dependencies when newer
>> > openvswitch kernel modules have been installed in the extra
>> > directory at /lib/modules/$(uname -r)/extra.  A symptom of
>> > this are the following messages in system log that can be
>> > printed with the dmesg command:
>>
>> Thanks for figuring out the problem and documenting a fix.  I really
>> appreciate documentation patches.
>>
>> > +        #!/bin/sh
>> > +
>> > +        check_ubuntu_depmod_config() {
>> > +            if [ -e /etc/depmod.d/ubuntu.conf ]; then
>> > +                if ! grep -q extra /etc/depmod.d/ubuntu.conf
>> > +                    then
>> > +                    sed -i s\/search\/"search extra"\/ /etc/depmod.d/ubuntu.conf
>> > +                    /sbin/depmod -a
>> > +                fi
>> > +            fi
>> > +        }
>>
>> I wonder about the details of this particular fix.  Usually, when there
>> is a configuration file in a .d directory, like depmod.d, it is possible
>> to add more files to the same directory that also get used for
>> configuration.  When that works, it is usually better to add files to
>> the directory rather than changing existing files, because it behaves
>> better on upgrade.  So, in this case, I wonder whether it is possible to
>> add a new file that would have something like:
>>
>>      search extra

This works if put in a separate file such as /etc/depmod.d/ovs-search-path.conf
or something else.  Suggested names are welcome.  It also works if the
instructions already in place to create the /etc/depmod.d/openvswitch.conf
file are amended so that the first line of the file is 'search extra'.

Like this:

search extra
override * * extra
override * * weak-updates

>>
>> or
>>
>>      override kmod * extra

Doesn't work.

>>
>> The latter is suggested by depmod.d(5).
>>
> I'll give it a try and get back with the results.
> 
> Thanks!

Let me know what the preference is and I'll spin up a V2 of the patch.

Thanks,

- Greg
Ben Pfaff Nov. 2, 2017, 8:09 p.m. UTC | #4
On Thu, Nov 02, 2017 at 12:55:13PM -0700, Greg Rose wrote:
> On 11/02/2017 11:12 AM, Greg Rose wrote:
> >On 11/02/2017 11:07 AM, Ben Pfaff wrote:
> >>On Thu, Nov 02, 2017 at 10:46:48AM -0700, Greg Rose wrote:
> >>> On certain Ubuntu systems running the 4.4 based kernel depmod
> >>> may not correctly search for module dependencies when newer
> >>> openvswitch kernel modules have been installed in the extra
> >>> directory at /lib/modules/$(uname -r)/extra.  A symptom of
> >>> this are the following messages in system log that can be
> >>> printed with the dmesg command:
> >>
> >>Thanks for figuring out the problem and documenting a fix.  I really
> >>appreciate documentation patches.
> >>
> >>> +        #!/bin/sh
> >>> +
> >>> +        check_ubuntu_depmod_config() {
> >>> +            if [ -e /etc/depmod.d/ubuntu.conf ]; then
> >>> +                if ! grep -q extra /etc/depmod.d/ubuntu.conf
> >>> +                    then
> >>> +                    sed -i s\/search\/"search extra"\/ /etc/depmod.d/ubuntu.conf
> >>> +                    /sbin/depmod -a
> >>> +                fi
> >>> +            fi
> >>> +        }
> >>
> >>I wonder about the details of this particular fix.  Usually, when there
> >>is a configuration file in a .d directory, like depmod.d, it is possible
> >>to add more files to the same directory that also get used for
> >>configuration.  When that works, it is usually better to add files to
> >>the directory rather than changing existing files, because it behaves
> >>better on upgrade.  So, in this case, I wonder whether it is possible to
> >>add a new file that would have something like:
> >>
> >>     search extra
> 
> This works if put in a separate file such as /etc/depmod.d/ovs-search-path.conf
> or something else.  Suggested names are welcome.  It also works if the
> instructions already in place to create the /etc/depmod.d/openvswitch.conf
> file are amended so that the first line of the file is 'search extra'.
> 
> Like this:
> 
> search extra
> override * * extra
> override * * weak-updates

I forgot we already had instructions for that.  It seems easiest to just
add the extra line there, then.
Gregory Rose Nov. 2, 2017, 8:13 p.m. UTC | #5
On 11/02/2017 01:09 PM, Ben Pfaff wrote:
> On Thu, Nov 02, 2017 at 12:55:13PM -0700, Greg Rose wrote:
>> On 11/02/2017 11:12 AM, Greg Rose wrote:
>>> On 11/02/2017 11:07 AM, Ben Pfaff wrote:
>>>> On Thu, Nov 02, 2017 at 10:46:48AM -0700, Greg Rose wrote:
>>>>> On certain Ubuntu systems running the 4.4 based kernel depmod
>>>>> may not correctly search for module dependencies when newer
>>>>> openvswitch kernel modules have been installed in the extra
>>>>> directory at /lib/modules/$(uname -r)/extra.  A symptom of
>>>>> this are the following messages in system log that can be
>>>>> printed with the dmesg command:
>>>>
>>>> Thanks for figuring out the problem and documenting a fix.  I really
>>>> appreciate documentation patches.
>>>>
>>>>> +        #!/bin/sh
>>>>> +
>>>>> +        check_ubuntu_depmod_config() {
>>>>> +            if [ -e /etc/depmod.d/ubuntu.conf ]; then
>>>>> +                if ! grep -q extra /etc/depmod.d/ubuntu.conf
>>>>> +                    then
>>>>> +                    sed -i s\/search\/"search extra"\/ /etc/depmod.d/ubuntu.conf
>>>>> +                    /sbin/depmod -a
>>>>> +                fi
>>>>> +            fi
>>>>> +        }
>>>>
>>>> I wonder about the details of this particular fix.  Usually, when there
>>>> is a configuration file in a .d directory, like depmod.d, it is possible
>>>> to add more files to the same directory that also get used for
>>>> configuration.  When that works, it is usually better to add files to
>>>> the directory rather than changing existing files, because it behaves
>>>> better on upgrade.  So, in this case, I wonder whether it is possible to
>>>> add a new file that would have something like:
>>>>
>>>>      search extra
>>
>> This works if put in a separate file such as /etc/depmod.d/ovs-search-path.conf
>> or something else.  Suggested names are welcome.  It also works if the
>> instructions already in place to create the /etc/depmod.d/openvswitch.conf
>> file are amended so that the first line of the file is 'search extra'.
>>
>> Like this:
>>
>> search extra
>> override * * extra
>> override * * weak-updates
> 
> I forgot we already had instructions for that.  It seems easiest to just
> add the extra line there, then.
> 

Will do.  Thanks.
Gurucharan Shetty Nov. 2, 2017, 9:39 p.m. UTC | #6
On 2 November 2017 at 12:55, Greg Rose <gvrose8192@gmail.com> wrote:

> On 11/02/2017 11:12 AM, Greg Rose wrote:
>
>> On 11/02/2017 11:07 AM, Ben Pfaff wrote:
>>
>>> On Thu, Nov 02, 2017 at 10:46:48AM -0700, Greg Rose wrote:
>>> > On certain Ubuntu systems running the 4.4 based kernel depmod
>>> > may not correctly search for module dependencies when newer
>>> > openvswitch kernel modules have been installed in the extra
>>> > directory at /lib/modules/$(uname -r)/extra.  A symptom of
>>> > this are the following messages in system log that can be
>>> > printed with the dmesg command:
>>>
>>> Thanks for figuring out the problem and documenting a fix.  I really
>>> appreciate documentation patches.
>>>
>>> > +        #!/bin/sh
>>> > +
>>> > +        check_ubuntu_depmod_config() {
>>> > +            if [ -e /etc/depmod.d/ubuntu.conf ]; then
>>> > +                if ! grep -q extra /etc/depmod.d/ubuntu.conf
>>> > +                    then
>>> > +                    sed -i s\/search\/"search extra"\/
>>> /etc/depmod.d/ubuntu.conf
>>> > +                    /sbin/depmod -a
>>> > +                fi
>>> > +            fi
>>> > +        }
>>>
>>> I wonder about the details of this particular fix.  Usually, when there
>>> is a configuration file in a .d directory, like depmod.d, it is possible
>>> to add more files to the same directory that also get used for
>>> configuration.  When that works, it is usually better to add files to
>>> the directory rather than changing existing files, because it behaves
>>> better on upgrade.  So, in this case, I wonder whether it is possible to
>>> add a new file that would have something like:
>>>
>>>      search extra
>>>
>>
> This works if put in a separate file such as /etc/depmod.d/ovs-search-path.
> conf
> or something else.  Suggested names are welcome.  It also works if the
> instructions already in place to create the /etc/depmod.d/openvswitch.conf
> file are amended so that the first line of the file is 'search extra'.
>
> Like this:
>
> search extra
> override * * extra
> override * * weak-updates


I have over the years found something like this to work::

cat > /etc/depmod.d/openvswitch.conf << EOF
override openvswitch * extra
override vport-geneve * extra
override vport-stt * extra
override vport-* * extra
EOF



>
>
>
>>> or
>>>
>>>      override kmod * extra
>>>
>>
> Doesn't work.
>
>
>>> The latter is suggested by depmod.d(5).
>>>
>>> I'll give it a try and get back with the results.
>>
>> Thanks!
>>
>
> Let me know what the preference is and I'll spin up a V2 of the patch.
>
> Thanks,
>
> - Greg
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Gregory Rose Nov. 2, 2017, 11:49 p.m. UTC | #7
On 11/02/2017 02:39 PM, Guru Shetty wrote:
> 
> 
> On 2 November 2017 at 12:55, Greg Rose <gvrose8192@gmail.com <mailto:gvrose8192@gmail.com>> wrote:
> 
>     On 11/02/2017 11:12 AM, Greg Rose wrote:
> 
>         On 11/02/2017 11:07 AM, Ben Pfaff wrote:
> 
>             On Thu, Nov 02, 2017 at 10:46:48AM -0700, Greg Rose wrote:
>              > On certain Ubuntu systems running the 4.4 based kernel depmod
>              > may not correctly search for module dependencies when newer
>              > openvswitch kernel modules have been installed in the extra
>              > directory at /lib/modules/$(uname -r)/extra.  A symptom of
>              > this are the following messages in system log that can be
>              > printed with the dmesg command:
> 
>             Thanks for figuring out the problem and documenting a fix.  I really
>             appreciate documentation patches.
> 
>              > +        #!/bin/sh
>              > +
>              > +        check_ubuntu_depmod_config() {
>              > +            if [ -e /etc/depmod.d/ubuntu.conf ]; then
>              > +                if ! grep -q extra /etc/depmod.d/ubuntu.conf
>              > +                    then
>              > +                    sed -i s\/search\/"search extra"\/ /etc/depmod.d/ubuntu.conf
>              > +                    /sbin/depmod -a
>              > +                fi
>              > +            fi
>              > +        }
> 
>             I wonder about the details of this particular fix.  Usually, when there
>             is a configuration file in a .d directory, like depmod.d, it is possible
>             to add more files to the same directory that also get used for
>             configuration.  When that works, it is usually better to add files to
>             the directory rather than changing existing files, because it behaves
>             better on upgrade.  So, in this case, I wonder whether it is possible to
>             add a new file that would have something like:
> 
>                   search extra
> 
> 
>     This works if put in a separate file such as /etc/depmod.d/ovs-search-path.conf
>     or something else.  Suggested names are welcome.  It also works if the
>     instructions already in place to create the /etc/depmod.d/openvswitch.conf
>     file are amended so that the first line of the file is 'search extra'.
> 
>     Like this:
> 
>     search extra
>     override * * extra
>     override * * weak-updates
> 
> 
> I have over the years found something like this to work::
> 
> |cat > /etc/depmod.d/openvswitch.conf << EOF override openvswitch * extra override vport-geneve * extra override vport-stt * extra 
> override vport-* * extra EOF|

That does usually work.  Definitely on all the newer Ubuntu releases.
But I found a case where it did not and thus the safety override of
'search extra'.  It won't hurt anything I guess and will prevent
confusion.  Especially my own!

I suppose my argument is better safe than unpredictable.

Thanks Guru!

- Greg

> 
> 
> 
> 
>             or
> 
>                   override kmod * extra
> 
> 
>     Doesn't work.
> 
> 
>             The latter is suggested by depmod.d(5).
> 
>         I'll give it a try and get back with the results.
> 
>         Thanks!
> 
> 
>     Let me know what the preference is and I'll spin up a V2 of the patch.
> 
>     Thanks,
> 
>     - Greg
> 
>     _______________________________________________
>     dev mailing list
>     dev@openvswitch.org <mailto:dev@openvswitch.org>
>     https://mail.openvswitch.org/mailman/listinfo/ovs-dev <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>
> 
>
diff mbox series

Patch

diff --git a/Documentation/intro/install/general.rst b/Documentation/intro/install/general.rst
index e5ec155..b66e7f1 100644
--- a/Documentation/intro/install/general.rst
+++ b/Documentation/intro/install/general.rst
@@ -412,7 +412,29 @@  Building
          $ /sbin/modinfo /lib/modules/$(uname -r)/kernel/net/bridge/bridge.ko
 
      Compare the "vermagic" lines output by the two commands.  If they differ,
-     then Open vSwitch was built for the wrong kernel.
+     then Open vSwitch may have been built for the wrong kernel.
+     Alternatively, on some Ubuntu based systems, depmod might not have
+     done the proper search for module dependencies.  Adding 'extra' to
+     the configuration file in /etc/depmod.d/ubuntu.conf and then running
+     depmod -a can fix the problem.  The following script can do this::
+
+        #!/bin/sh
+
+        check_ubuntu_depmod_config() {
+            if [ -e /etc/depmod.d/ubuntu.conf ]; then
+                if ! grep -q extra /etc/depmod.d/ubuntu.conf
+                    then
+                    sed -i s\/search\/"search extra"\/ /etc/depmod.d/ubuntu.conf
+                    /sbin/depmod -a
+                fi
+            fi
+        }
+
+        check_ubuntu_depmod_config
+
+
+     The example script implements the check as a function so that is
+     easily portable into user specific configuration checks.
 
      If you decide to report a bug or ask a question related to module loading,
      include the output from the ``dmesg`` and ``modinfo`` commands mentioned