Bug 1802610 - Create and document transition from Restraint-RHTS to Restraint
Summary: Create and document transition from Restraint-RHTS to Restraint
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Restraint
Classification: Retired
Component: general
Version: master
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 0.2.1
Assignee: Carol Bouchard
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-13 14:38 UTC by Martin Styk
Modified: 2020-05-20 07:24 UTC (History)
25 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-20 07:24:02 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github beaker-project restraint pull 27 0 None closed Doc: Detail how to remove rhts from jobs 2020-10-06 18:35:50 UTC

Description Martin Styk 2020-02-13 14:38:10 UTC
Description of problem:
Users should stop using RHTS extension for their jobs and rely on Restraint.
We should cover what has to be done for tasks, execution, basically everything. So users can adapt to that

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
yum install restraint-rhts

Expected results:
yum install restraint

Additional info:

Comment 1 Rachel Sibley 2020-02-13 21:17:56 UTC
We are working on migrating our tests to remove legacy RHTS functions for CKI team. As we review tests
we have found the following findings and would like to know best practice for migrating tests to remove
RHTS. It might be possible that Restraint has or will have certain features to avoid having to update
every single test unnecessarily. Later we can move this to a common place for folks to reference as they
migrate from RHTS to Restraint.

What needs to happen:

1.) Remove restraint-rhts

2.) Remove rhts_environment.sh source from tests, e.g.
    . /usr/share/beakerlib/beakerlib.sh || exit 1

3.) Move all rhts-* commands to rstrnt-* compatible commands:
    https://restraint.readthedocs.io/en/latest/commands.html#

4.) Various parameters will need to be manually set (ARCH, OUTPUFILE, HOSTNAME,...) or the tests will break, can this be
    added to restraint ? 
    https://github.com/beaker-project/rhts/blob/master/bin/rhts-environment.sh      

5.) Traditional Makefile will no longer work, will need to be migrated to Restraint's metadata, e.g.
    https://github.com/CKI-project/tests-beaker/blob/master/acpi/acpitable/Makefile
    https://restraint.readthedocs.io/en/latest/tasks.html#metadata

What am I forgetting ? Is there a way to make this transition easier ?

Comment 2 Rachel Sibley 2020-02-13 22:43:07 UTC
Step 2 should be:
. /usr/bin/rhts-environment.sh
. /usr/share/rhts-library/rhtslib.sh

Comment 5 Jeff Bastian 2020-03-03 15:48:26 UTC
(In reply to Rachel Sibley from comment #1)
> 2.) Remove rhts_environment.sh source from tests, e.g.
>     . /usr/share/beakerlib/beakerlib.sh || exit 1


Was this a copy/paste error, Rachel?  I think you mean this line instead:

. /usr/bin/rhts-environment.sh || exit 1

Comment 7 Rachel Sibley 2020-03-03 17:37:48 UTC
Hi Jeff, yes copy/paste error, see https://bugzilla.redhat.com/show_bug.cgi?id=1802610#c2

Comment 8 Rachel Sibley 2020-03-05 22:01:29 UTC
Hi Carol, here is the PR that Fendy is working on to transition CKI tests to remove rhts legacy support, would you mind taking a look to check that our approach is correct ? 
https://github.com/CKI-project/tests-beaker/pull/479

Comment 9 Carol Bouchard 2020-03-06 11:14:03 UTC
Thank you very much for this.  I will look at what you provided.

Comment 10 zguo 2020-03-12 09:46:31 UTC
Hello, just wondering why do transition from Restraint-RHTS to Restraint? Would anyone like to explain?

Comment 11 Martin Styk 2020-03-12 09:53:13 UTC
Hi,

Some of the teams would like to get rid of all RHTS parts. This actually makes sense, because you can run Restraint jobs on any bare-metal machine / virtual machine.
This means I can use Restraint in Beaker and then I will buy AWS bare metal solution and use pure Restraint to do the communication.

restraint-rhts contains a lot of parts that shouldn't be used. For example, leveraging /mnt namespace for testing / keeping data / etc.
Furthermore .. Task Library/RPMs. You don't really need RPMs for your tests. It is easier for everyone to start onboarding your team and telling them, push it to git and run it.

We are not saying that you shouldn't use restraint-rhts, however, if you want to be more flexible, then you should consider the usage of pure restraint.

Comment 12 zguo 2020-03-13 02:09:55 UTC
(In reply to Martin Styk from comment #11)
> Hi,
> 
> Some of the teams would like to get rid of all RHTS parts. This actually
> makes sense, because you can run Restraint jobs on any bare-metal machine /
> virtual machine.
> This means I can use Restraint in Beaker and then I will buy AWS bare metal
> solution and use pure Restraint to do the communication.
> 
> restraint-rhts contains a lot of parts that shouldn't be used. For example,
> leveraging /mnt namespace for testing / keeping data / etc.
> Furthermore .. Task Library/RPMs. You don't really need RPMs for your tests.
> It is easier for everyone to start onboarding your team and telling them,
> push it to git and run it.
> 
> We are not saying that you shouldn't use restraint-rhts, however, if you
> want to be more flexible, then you should consider the usage of pure
> restraint.

Got it, thanks!


Note You need to log in before you can comment on or make changes to this bug.