Message ID | 1597946426-7319-1-git-send-email-gvrose8192@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [ovs-dev] rhel: ovs-kmod-manage.sh: Disable unneeded warning | expand |
On Thu, Aug 20, 2020 at 11:00 AM Greg Rose <gvrose8192@gmail.com> wrote: > > The script itself says which versions the script is needed for but > it is run on RHEL 8.x as well where it is not needed. Disable the > warning since it may unnecessarily alarm users and is really only > for debugging anyway. > > Signed-off-by: Greg Rose <gvrose8192@gmail.com> > --- > rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh > index c70e135..c2c8d18 100644 > --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh > +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh > @@ -136,7 +136,7 @@ elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "12" ]; then > fi > > if [ X"$ver_offset" = X ]; then > - echo "This script is not intended to run on kernel $(uname -r)" > +# echo "This script is not intended to run on kernel $(uname -r)" > exit 1 > fi Hi Greg, From /rhel/openvswitch-kmod-fedora.spec.in, looks like for RHEL 8.2, ovs-kmod-manage.sh is invoked in the %posttrans section, since in the %post section we do check if the kernel version is applied to ovs-kmod-manage.sh. Commenting out the warning message would make the rpm package installation warning from: $ rpm -ivh ./openvswitch-kmod-2.13.1.rhel82.16775750-1.el8.x86_64.rpm .... current kernel is 4.18.0-193.el8.x86_64 This script is not intended to run on kernel 4.18.0-193.el8.x86_64 warning: %posttrans(openvswitch-kmod-2.13.1.rhel82.16775750-1.el8.x86_64) scriptlet failed, exit status 1 To the following, which still contains confusing message "scriptlet failed, exit status 1". .... current kernel is 4.18.0-193.el8.x86_64 warning: %posttrans(openvswitch-kmod-2.13.1.rhel82.16775750-1.el8.x86_64) scriptlet failed, exit status 1 ovs-kmod-manage.sh is not intended to run on RHEL 8.2, should we consider to 1) add checking on the %posttrans section or 2) simply make the exit code from 1 to 0 so that "the scriptlet failed" is not triggered? Thanks, -Yi-Hung
On 8/20/2020 2:10 PM, Yi-Hung Wei wrote: > On Thu, Aug 20, 2020 at 11:00 AM Greg Rose <gvrose8192@gmail.com> wrote: >> >> The script itself says which versions the script is needed for but >> it is run on RHEL 8.x as well where it is not needed. Disable the >> warning since it may unnecessarily alarm users and is really only >> for debugging anyway. >> >> Signed-off-by: Greg Rose <gvrose8192@gmail.com> >> --- >> rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh >> index c70e135..c2c8d18 100644 >> --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh >> +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh >> @@ -136,7 +136,7 @@ elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "12" ]; then >> fi >> >> if [ X"$ver_offset" = X ]; then >> - echo "This script is not intended to run on kernel $(uname -r)" >> +# echo "This script is not intended to run on kernel $(uname -r)" >> exit 1 >> fi > > Hi Greg, > > From /rhel/openvswitch-kmod-fedora.spec.in, looks like for RHEL 8.2, > ovs-kmod-manage.sh is invoked in the %posttrans section, since in the > %post section we do check if the kernel version is applied to > ovs-kmod-manage.sh. > > Commenting out the warning message would make the rpm package > installation warning from: > > $ rpm -ivh ./openvswitch-kmod-2.13.1.rhel82.16775750-1.el8.x86_64.rpm > .... > current kernel is 4.18.0-193.el8.x86_64 > This script is not intended to run on kernel 4.18.0-193.el8.x86_64 > warning: %posttrans(openvswitch-kmod-2.13.1.rhel82.16775750-1.el8.x86_64) > scriptlet failed, exit status 1 > > To the following, which still contains confusing message "scriptlet > failed, exit status 1". > > .... > current kernel is 4.18.0-193.el8.x86_64 > warning: %posttrans(openvswitch-kmod-2.13.1.rhel82.16775750-1.el8.x86_64) > scriptlet failed, exit status 1 > > ovs-kmod-manage.sh is not intended to run on RHEL 8.2, should we consider to > 1) add checking on the %posttrans section or > 2) simply make the exit code from 1 to 0 > > so that "the scriptlet failed" is not triggered? Good point - I think we should change the exit code. It is not an error so let's change the exit code to zero. I'll send Rev 2 shortly. Thanks for the review! - Greg > > Thanks, > > -Yi-Hung >
diff --git a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh index c70e135..c2c8d18 100644 --- a/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh +++ b/rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh @@ -136,7 +136,7 @@ elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "12" ]; then fi if [ X"$ver_offset" = X ]; then - echo "This script is not intended to run on kernel $(uname -r)" +# echo "This script is not intended to run on kernel $(uname -r)" exit 1 fi
The script itself says which versions the script is needed for but it is run on RHEL 8.x as well where it is not needed. Disable the warning since it may unnecessarily alarm users and is really only for debugging anyway. Signed-off-by: Greg Rose <gvrose8192@gmail.com> --- rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)