Project

General

Profile

coordination #54995

[SLE][Migration][SLE12SP5][EPIC]:Integrate service check before/after migration

Added by coolgw over 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-08-02
Due date:
% Done:

100%

Estimated time:
(Total: 204.00 h)
Difficulty:

Description

This EPIC is used for tracking service check task:
Detail info please check the attachment.
Currently we plan following service list for 12sp5:
ntp
postfix
nfs
rpcbind
autofs
cups
apparm
dhcp
kdump


Subtasks

action #54998: [SLE][Migration][SLE12SP5][SRV CHECK]:ntpResolvedAZhou

action #55001: [SLE][Migration][SLE12SP5][SRV CHECK]:postfixResolvedAZhou

action #55004: [SLE][Migration][SLE12SP5][SRV CHECK]:nfsResolvedcoolgw

action #55007: [SLE][Migration][SLE12SP5][SRV CHECK]:rpcbindResolvedAZhou

action #55010: [SLE][Migration][SLE12SP5][SRV CHECK]:autofsResolvedhjluo

action #55013: [SLE][Migration][SLE12SP5][SRV CHECK]:cpusResolvedleli

action #55016: [SLE][Migration][SLE12SP5][SRV CHECK]:apparmResolvedhjluo

action #55019: [SLE][Migration][SLE12SP5][SRV CHECK]:dhcpResolvedAZhou

action #55022: [SLE][Migration][SLE12SP5][SRV CHECK]:kdumpResolvedhjluo

History

#1 Updated by coolgw over 2 years ago

coolgw wrote:

This EPIC is used for tracking service check task:
Detail info please check the attachment.
Currently we plan following service list for 12sp5:
ntp
postfix
nfs
rpcbind
autofs
cups
apparm
dhcp
kdump
Please check following PR to get idea how to integrate the service check part:
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/7643/files

#2 Updated by hjluo over 2 years ago

=====================================

service check design and implementation

Background:
Customer report an issue which specific service can’t start after migration, so migration team decide do service check before and after migration process in OpenQA.

Design specific:
we want to check some services before migration and after migration, there are some different check point for before and after migration, which listed below chart.

For migration test we need to check following steps before the migration: they are
install_service
enable_service
start_service
check_service
check_function

And after migration finished we need to check following steps, they are:
check_service
check_function

Services that need be check:

Currently we need cover the following service check before and after migration:

apache2
SuSEfirewall2
firewall
ntp
chrony
postfix
bind
snmp
nfs
rpcbind
autofs
cups
radvd
cron
apparm
dhcp
kdump

Detail info you can check progress ticket: 54995
https://progress.opensuse.org/issues/54995

How to implementation?

We add these services in a hash list in lib/service_check.pm which will be called by installation/install_service.pm before migration and console/check_upgraded_service.pm
after migration.

You can check out the current service_check.pm for how it looks like.
https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/service_check.pm

For each service that to be added to the service check we have 2 options.

1) if there’s no existed service lib/utils then we need to add a service.pm to lib/services/ directory.

2) if there’s existed service lib/utils then we can use the existed lib/utils to avoid code duplication.

For each service module we need provide following interfaces:

1) install_service
Parameter: None.

Description:
install the service by zypper in services_name

2) enable_service
Parameter: None
Description:
use systemctl enable to start the service after reboot.

3) configure_service
Parameter: None.

 Description:
setup and configure the test service to make it ready to  check the function. 

3) start_service
Parameter: None

 Description:
 use systemctl start to start the service.

4) service_check
Parameter: None

 Description:
check if a service is enabled and active by ‘systemctl status service’

5) function_check

Parameter:
1.test type
before: means pre-migratoin check
after : means post-migration check

Description:
The function_check will check the service function but for some service we just check the basic function while the original function module will do the fully function check.

Above functions will be called both by migration (lib/service_check.pm) and module service.pm

Code example:

you can check out this link as example:
https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/services/apache.pm

For more information on the implementation and code example please check out our apache2 service check.

https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/7643

#3 Updated by coolgw over 2 years ago

  • Status changed from New to Resolved

#4 Updated by szarate over 1 year ago

  • Tracker changed from action to coordination

Also available in: Atom PDF