Trying to alter downloaded Redhat image and getting failures.

Solution In Progress - Updated -

Issue

  • We are running a script that alters a redhat7 overcloud image. It alters the partitions and make it so we can breakout separate mount points for /var, /var/log and /var/log/audit. We are attaching the scripts and logs as a tarball. We will also send a sos report from the director. The overcloud-hardened-full-uefi.log file in the attached tarball contains debug output. We need these filesystems broke out to comply with DISA STIG.

  • The overcloud image creation fails with the following error:

    $ openstack --debug overcloud image build --config-file harden_images_uefi.yaml
    [...]
    2020-09-16 15:44:37.869 | ++ export DIB_DISABLE_KERNEL_CLEANUP=1
    2020-09-16 15:44:37.869 | ++ DIB_DISABLE_KERNEL_CLEANUP=1
    2020-09-16 15:44:37.869 | dib-run-parts Running /tmp/dib_build.ETVuAHJr/hooks/root.d/10-rhel7-cloud-image
    2020-09-16 15:44:37.882 | Getting /root/.cache/image-create/overcloud-full.qcow2.tgz.lock: Wed Sep 16 11:44:37 EDT 2020
    2020-09-16 15:44:37.884 | Repacking base image as tarball.
    2020-09-16 15:44:37.888 | Working in /tmp/tmp.EwpwT0d1Bm
    2020-09-16 15:45:04.114 | /dev/loop8
    2020-09-16 15:45:04.201 | mount:  /dev/mapper is not a block device
    2020-09-16 15:45:04.625 | INFO diskimage_builder.block_device.blockdevice [-] State already cleaned - no way to do anything here
    Command '['disk-image-create', '-a', 'amd64', '-o', './overcloud-hardened-full-uefi', '-t', 'qcow2', '-p', 'ntp,python-psutil,python-debtcollector,plotnetcfg,sos,device-mapper-multipath,python-heat-agent-puppet,python-heat-agent-hiera,python-heat-agent-apply-config,python-heat-agent-ansible,python-heat-agent-docker-cmd,python-heat-agent-json-file,screen,os-net-config,jq', '--min-tmpfs=7', 'rhel7', 'dhcp-all-interfaces', 'openvswitch', 'overcloud-agent', 'overcloud-full', 'overcloud-controller', 'overcloud-compute', 'overcloud-ceph-storage', 'puppet-modules', 'stable-interface-names', 'bootloader', 'element-manifest', 'dynamic-login', 'iptables', 'enable-packages-install', 'pip-and-virtualenv-override', 'dracut-regenerate', 'remove-machine-id', 'remove-resolvconf', 'modprobe-blacklist', 'overcloud-secure-uefi']' returned non-zero exit status 1
    Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
    File "/usr/lib/python2.7/site-packages/tripleoclient/command.py", line 25, in run
    super(Command, self).run(parsed_args)
    File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
    File "/usr/lib/python2.7/site-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
    File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_image.py", line 93, in take_action
    manager.build()
    File "/usr/lib/python2.7/site-packages/tripleo_common/image/build.py", line 85, in build
    elements, options, packages, extra_options)
    File "/usr/lib/python2.7/site-packages/tripleo_common/image/image_builder.py", line 140, in build_image
    raise subprocess.CalledProcessError(process.returncode, cmd)
    CalledProcessError: Command '['disk-image-create', '-a', 'amd64', '-o', './overcloud-hardened-full-uefi', '-t', 'qcow2', '-p', 'ntp,python-psutil,python-debtcollector,plotnetcfg,sos,device-mapper-multipath,python-heat-agent-puppet,python-heat-agent-hiera,python-heat-agent-apply-config,python-heat-agent-ansible,python-heat-agent-docker-cmd,python-heat-agent-json-file,screen,os-net-config,jq', '--min-tmpfs=7', 'rhel7', 'dhcp-all-interfaces', 'openvswitch', 'overcloud-agent', 'overcloud-full', 'overcloud-controller', 'overcloud-compute', 'overcloud-ceph-storage', 'puppet-modules', 'stable-interface-names', 'bootloader', 'element-manifest', 'dynamic-login', 'iptables', 'enable-packages-install', 'pip-and-virtualenv-override', 'dracut-regenerate', 'remove-machine-id', 'remove-resolvconf', 'modprobe-blacklist', 'overcloud-secure-uefi']' returned non-zero exit status 1
    clean_up BuildOvercloudImage: Command '['disk-image-create', '-a', 'amd64', '-o', './overcloud-hardened-full-uefi', '-t', 'qcow2', '-p', 'ntp,python-psutil,python-debtcollector,plotnetcfg,sos,device-mapper-multipath,python-heat-agent-puppet,python-heat-agent-hiera,python-heat-agent-apply-config,python-heat-agent-ansible,python-heat-agent-docker-cmd,python-heat-agent-json-file,screen,os-net-config,jq', '--min-tmpfs=7', 'rhel7', 'dhcp-all-interfaces', 'openvswitch', 'overcloud-agent', 'overcloud-full', 'overcloud-controller', 'overcloud-compute', 'overcloud-ceph-storage', 'puppet-modules', 'stable-interface-names', 'bootloader', 'element-manifest', 'dynamic-login', 'iptables', 'enable-packages-install', 'pip-and-virtualenv-override', 'dracut-regenerate', 'remove-machine-id', 'remove-resolvconf', 'modprobe-blacklist', 'overcloud-secure-uefi']' returned non-zero exit status 1
    Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 134, in run
    ret_val = super(OpenStackShell, self).run(argv)
    File "/usr/lib/python2.7/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
    File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 169, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
    File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
    File "/usr/lib/python2.7/site-packages/tripleoclient/command.py", line 25, in run
    super(Command, self).run(parsed_args)
    File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
    File "/usr/lib/python2.7/site-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
    File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_image.py", line 93, in take_action
    manager.build()
    File "/usr/lib/python2.7/site-packages/tripleo_common/image/build.py", line 85, in build
    elements, options, packages, extra_options)
    File "/usr/lib/python2.7/site-packages/tripleo_common/image/image_builder.py", line 140, in build_image
    raise subprocess.CalledProcessError(process.returncode, cmd)
    CalledProcessError: Command '['disk-image-create', '-a', 'amd64', '-o', './overcloud-hardened-full-uefi', '-t', 'qcow2', '-p', 'ntp,python-psutil,python-debtcollector,plotnetcfg,sos,device-mapper-multipath,python-heat-agent-puppet,python-heat-agent-hiera,python-heat-agent-apply-config,python-heat-agent-ansible,python-heat-agent-docker-cmd,python-heat-agent-json-file,screen,os-net-config,jq', '--min-tmpfs=7', 'rhel7', 'dhcp-all-interfaces', 'openvswitch', 'overcloud-agent', 'overcloud-full', 'overcloud-controller', 'overcloud-compute', 'overcloud-ceph-storage', 'puppet-modules', 'stable-interface-names', 'bootloader', 'element-manifest', 'dynamic-login', 'iptables', 'enable-packages-install', 'pip-and-virtualenv-override', 'dracut-regenerate', 'remove-machine-id', 'remove-resolvconf', 'modprobe-blacklist', 'overcloud-secure-uefi']' returned non-zero exit status 1
    
  • There are no obvious reasons for the above failure except that disk-image-create returned non-zero exit status.

Environment

  • Red Hat OpenStack Platform 13.0 (RHOSP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In