[ovs-dev] [PATCH ovn] RHEL: Suppress systemd status message during pre-installation.

Numan Siddique nusiddiq at redhat.com
Mon Aug 5 19:37:03 UTC 2019


On Mon, Aug 5, 2019 at 11:45 PM Mark Michelson <mmichels at redhat.com> wrote:

> When running the pre-installation hook, the spec file attempts to
> determine if the old openvswitch-provided OVN services are running. If
> this is a fresh installation, then there never was an
> openvswitch-provided service installed on the machine. Therefore,
> systemd will emit a warning saying the service can't be found. There is
> nothing that indicates that this message is coming pre-installation, and
> so it appears as though something has gone wrong while trying to install
> the package.
>
> This commit suppresses stderr when checking the status of the ovn
> services pre-installation. This way, if a problem is encountered, it
> does not appear that there was an error during installation.
>
> Signed-off-by: Mark Michelson <mmichels at redhat.com>
>

Acked-by: Numan Siddique <nusiddiq at redhat.com>



> ---
>  rhel/ovn-fedora.spec.in | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/rhel/ovn-fedora.spec.in b/rhel/ovn-fedora.spec.in
> index 2ecc629f2..2234e949f 100644
> --- a/rhel/ovn-fedora.spec.in
> +++ b/rhel/ovn-fedora.spec.in
> @@ -219,7 +219,7 @@ rm -rf $RPM_BUILD_ROOT
>  %pre central
>  if [ $1 -eq 1 ] ; then
>      # Package install.
> -    /bin/systemctl status ovn-northd.service >/dev/null
> +    /bin/systemctl status ovn-northd.service &>/dev/null
>      ovn_status=$?
>      rpm -ql openvswitch-ovn-central > /dev/null
>      if [[ "$?" = "0" && "$ovn_status" = "0" ]]; then
> @@ -233,7 +233,7 @@ fi
>  %pre host
>  if [ $1 -eq 1 ] ; then
>      # Package install.
> -    /bin/systemctl status ovn-controller.service >/dev/null
> +    /bin/systemctl status ovn-controller.service &>/dev/null
>      ovn_status=$?
>      rpm -ql openvswitch-ovn-host > /dev/null
>      if [[ "$?" = "0" && "$ovn_status" = "0" ]]; then
> --
> 2.14.5
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list