Bug 1760217 - RHVH4.4 installation fails when security profile is selected
Summary: RHVH4.4 installation fails when security profile is selected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: redhat-virtualization-host
Version: 4.4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.4.0
: 4.4.0
Assignee: Yuval Turgeman
QA Contact: Qin Yuan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-10 07:47 UTC by Qin Yuan
Modified: 2020-08-04 16:22 UTC (History)
10 users (show)

Fixed In Version: imgbased-1.2.6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-04 16:22:05 UTC
oVirt Team: Node
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2020:3316 0 None None None 2020-08-04 16:22:33 UTC
oVirt gerrit 104166 0 'None' MERGED openscap: decode bytes for py3 2020-05-17 11:10:02 UTC

Description Qin Yuan 2019-10-10 07:47:24 UTC
Description of problem:
When security profile is applied, installation will fail with the following error:

2019-10-10 06:14:46,577 [INFO] (MainThread) Registering profile xccdf_org.ssgproject.content_profile_pci-dss from /usr/share/xml/scap/ssg/content/ssg-rhvh4-ds.xml
Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.6/site-packages/imgbased/__main__.py", line 53, in <module>
    CliApplication()
  File "/usr/lib/python3.6/site-packages/imgbased/__init__.py", line 82, in CliApplication
    app.hooks.emit("post-arg-parse", args)
  File "/usr/lib/python3.6/site-packages/imgbased/hooks.py", line 120, in emit
    cb(self.context, *args)
  File "/usr/lib/python3.6/site-packages/imgbased/plugins/core.py", line 173, in post_argparse
    layout.initialize(args.source, args.init_nvr)
  File "/usr/lib/python3.6/site-packages/imgbased/plugins/core.py", line 220, in initialize
    self.app.imgbase.init_layout_from(source, init_nvr)
  File "/usr/lib/python3.6/site-packages/imgbased/imgbase.py", line 313, in init_layout_from
    self.add_layer(initial_base, new_layer)
  File "/usr/lib/python3.6/site-packages/imgbased/imgbase.py", line 212, in add_layer
    self.hooks.emit("new-layer-added", prev_lv, new_lv)
  File "/usr/lib/python3.6/site-packages/imgbased/hooks.py", line 120, in emit
    cb(self.context, *args)
  File "/usr/lib/python3.6/site-packages/imgbased/plugins/osupdater.py", line 134, in on_new_layer
    postprocess(new_lv)
  File "/usr/lib/python3.6/site-packages/imgbased/plugins/osupdater.py", line 197, in postprocess
    _apply_scap_profile()
  File "/usr/lib/python3.6/site-packages/imgbased/plugins/osupdater.py", line 155, in _apply_scap_profile
    OSCAPScanner().process(new_fs.path("/"))
  File "/usr/lib/python3.6/site-packages/imgbased/openscap.py", line 92, in process
    self.configure()
  File "/usr/lib/python3.6/site-packages/imgbased/openscap.py", line 154, in configure
    self.register(ds, profile)
  File "/usr/lib/python3.6/site-packages/imgbased/openscap.py", line 96, in register
    if profile not in self.profiles(datastream):
  File "/usr/lib/python3.6/site-packages/imgbased/openscap.py", line 131, in profiles
    profiles = dict([x.split(":") for x in stdout.splitlines()])
  File "/usr/lib/python3.6/site-packages/imgbased/openscap.py", line 131, in <listcomp>
    profiles = dict([x.split(":") for x in stdout.splitlines()])
TypeError: a bytes-like object is required, not 'str'


Version-Release number of selected component (if applicable):
RHVH-4.4-20190926.3-RHVH-x86_64-dvd1.iso

How reproducible:
100%


Steps to Reproduce:
1. Install RHVH-4.4-20190926.3-RHVH-x86_64-dvd1.iso
2. Select a security profile on security policy page(there are only two profiles, choose pci-dss which doesn't have additional requirements)
3. Continue to configure other required parameters and begin install


Actual results:
1. Installation failed, the error is as above


Expected results:
1. Installation should succeed


Additional info:

Comment 2 Qin Yuan 2019-11-11 09:06:12 UTC
Tested redhat-virtualization-host-4.4.0-20191107.1.el8_1, this bug got fixed.

Comment 4 Qin Yuan 2019-12-16 07:37:50 UTC
redhat-virtualization-host-4.4.0-20191204.2.el8_1 also works, move to VERIFIED.

Comment 6 errata-xmlrpc 2020-08-04 16:22:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (RHV Host (redhat-virtualization-host) 4.4), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:3316


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