Re: [ovs-dev] [PATCH] Documentation: Document module install issues

2017-11-02 Thread Greg Rose

On 11/02/2017 02:39 PM, Guru Shetty wrote:



On 2 November 2017 at 12:55, 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 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
d...@openvswitch.org 
https://mail.openvswitch.org/mailman/listinfo/ovs-dev 





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


Re: [ovs-dev] [PATCH] Documentation: Document module install issues

2017-11-02 Thread Guru Shetty
On 2 November 2017 at 12:55, 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 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
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] Documentation: Document module install issues

2017-11-02 Thread Greg Rose

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.

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


Re: [ovs-dev] [PATCH] Documentation: Document module install issues

2017-11-02 Thread Greg Rose

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
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] Documentation: Document module install issues

2017-11-02 Thread Greg Rose

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!
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] Documentation: Document module install issues

2017-11-02 Thread Ben Pfaff
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).
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev