Bug 1803555

Summary: Harness not installed: No package [urestraint-rhts- ...
Product: [Retired] Beaker Reporter: Alois Mahdal <amahdal>
Component: generalAssignee: Martin Styk <mastyk>
Status: CLOSED NEXTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: developCC: azelinka, bpeck, cbouchar, jkriz, mastyk
Target Milestone: 28.0Keywords: Patch, Reopened, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-06-18 20:16:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alois Mahdal 2020-02-16 22:33:02 UTC
Description of problem
======================

Passing this:

    <recipe ks_meta="method=http harness=restraint-rhts-0.1.44 harness='restraint-rhts beakerlib-redhat' disable_repo_CRB disable_repo_CRB-debuginfo" whiteboard="morf-0.5.13+t20200214221903.rst.g05dc130 upg: lp=U,lpr=U,pe=N,rm=M @ rhel-7.6:(rhsm.rh.stage)rhel-8.1(Server/x86_64): no-op test">

will generate invalid kickstart lines in `%post`:

    if command -v dnf >/dev/null ; then
       package_command="dnf"
    else
       package_command="yum"
    fi
    $package_command -y install [u'restraint-rhts-0.1.44', u'restraint-rhts beakerlib-redhat']

This will result in failure to install restraint, and the job will stay forever in Waiting.


Version-Release number of selected component
============================================

Beaker 27.1


How reproducible
================

Always


Steps to Reproduce
==================

 1. Use <recipe/> like this in your job XML:

        <recipe ks_meta="method=http harness=restraint-rhts-0.1.44 harness='restraint-rhts beakerlib-redhat' disable_repo_CRB disable_repo_CRB-debuginfo" whiteboard="morf-0.5.13+t20200214221903.rst.g05dc130 upg: lp=U,lpr=U,pe=N,rm=M @ rhel-7.6:(rhsm.rh.stage)rhel-8.1(Server/x86_64): no-op test">

 2. Submit, wait
 3. wait more..


Actual results
==============

Command to install harness is rendered incorrectlu:

    $package_command -y install [u'restraint-rhts-0.1.44', u'restraint-rhts beakerlib-redhat']

thus restraint fails to install (program.log):

    20:08:55,030 INFO program: + package_command=yum
    20:08:55,030 INFO program: + yum -y install '[urestraint-rhts-0.1.44,' 'urestraint-rhts beakerlib-redhat]'
    20:08:55,030 INFO program: Loaded plugins: product-id, search-disabled-repos, subscription-manager,
    20:08:55,031 INFO program: : versionlock
    20:08:55,031 INFO program: This system is not registered with an entitlement server. You can use subscription-manager to register.
    20:08:55,031 INFO program: No package [urestraint-rhts-0.1.44, available.
    20:08:55,031 INFO program: No package urestraint-rhts beakerlib-redhat] available.
    20:08:55,031 INFO program: Error: Nothing to do
    20:08:55,031 INFO program: + useradd --password '$6$oIW3o2Mr$XbWZKaM7nA.cQqudfDJScupXOia5h1u517t6Htx/Q/MgXm82Pc/OcytatTeI4ULNWOMJzvpCigWiL4xKP9PX4.' test

...and the job remains in Waiting until timeout.


Expected results
================

Commands in kickstart should be valid shell commands, eg.:

    $package_command -y install restraint-rhts-0.1.44 restraint-rhts beakerlib-redhat

and recipe should proceed normally.


Additional info
===============

The XML here was produced by workflow-tomorrow plugin and kind of seems strange already (defining `harness` twice) but Beaker should probably be more robust here.

Comment 1 Martin Styk 2020-02-17 07:06:43 UTC
Passing harness twice?