Bug 1803555 - Harness not installed: No package [urestraint-rhts- ...
Summary: Harness not installed: No package [urestraint-rhts- ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Beaker
Classification: Community
Component: general
Version: develop
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: 28.0
Assignee: Martin Styk
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-16 22:33 UTC by Alois Mahdal
Modified: 2020-06-18 20:16 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-18 20:16:54 UTC


Attachments (Terms of Use)

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?


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