[Fuego] [PATCH] Add test cases of service multipathd.

Wang, Mingyu wangmy at cn.fujitsu.com
Fri Jan 11 02:27:51 UTC 2019


Hi Tim

>exec_service_on_target() {
>  if [ "$init_manager" = "systemd" ]
>    then
>        systemctl $2 $1
>    else
>        $1 $2
>    fi
>}

There is a problem with this code, which has been fixed in [PATCH] Bugfix: modify the command to start the service of sysvinit.
Actually 'is-active' is only supported by systemctl. 
I will fully consider the various situations and then add the function to fuego_board_function_lib.
After that I will resubmmit the patch, thanks for pointing out the problem.

wangmy


-----Original Message-----
From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com] 
Sent: Friday, January 11, 2019 7:04 AM
To: Tim.Bird at sony.com; Wang, Mingyu/王 鸣瑜 <wangmy at cn.fujitsu.com>; fuego at lists.linuxfoundation.org
Subject: RE: [Fuego] [PATCH] Add test cases of service multipathd.



> -----Original Message-----
> From: Tim.Bird at sony.com
> 
> Same comments as other patches.
> 
> 'is-active' is only supported by systemctl (when init_manager is 
> 'systemd')
> 
> Let's fix that issue, and rework these patches with the solution we 
> decide upon.

I was just looking at fuego_board_function_lib.sh and saw this:
exec_service_on_target() {
    if [ "$init_manager" = "systemd" ]
    then
        systemctl $2 $1
    else
        $1 $2
    fi
}

This doesn't seem right.  Has this library been used for testing on a non-systemd platform?

I'm pretty sure that the command after the 'else' should be one of the following:
  service $1 $2
or
 /etc/init.d/$1 $2

For example, on a system I have here built with Yocto Project:
$ dropbear status
(no result)
$ /etc/init.d/dropbear status
Usage: /etc/init.d/dropbear {start|stop|restart|force-reload} $

Which shows that the dropbear binary executed by itself doesn't perform the start/start operations. It's the init script in /etc/init.d that does this.  Also, that init script (the one for dropbear) doesn't support the 'status' operation.

So, I think that 'status' is not a well-supported operation for embedded Linux services (at least on systems that are using sysvinit as the init manager).
So maybe this whole is_active thing needs to be re-thought.

Maybe it's acceptable to just say that these tests are dependent on the system-under-test using 'systemd'.  Or, maybe the legacy init scripts for these particular services do all support the 'status' operation.

I think it was Fujitsu that introduced this concept of providing an abstraction for service management into Fuego.  Is Fujitsu using systems without systemd?
It doesn't look like this exec_service_on_target would work on non-systemd systems.

Let me know your thoughts.
 -- Tim







More information about the Fuego mailing list