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:
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