Bug 1656615 - disk build fails with: diskimage_builder.block_device.exception.BlockDeviceSetupException: Config entry not a dict: /
Summary: disk build fails with: diskimage_builder.block_device.exception.BlockDeviceSe...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: diskimage-builder
Version: 12.0 (Pike)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: async
: ---
Assignee: RHOS Maint
QA Contact: mlammon
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-05 21:03 UTC by Alexander Chuzhoy
Modified: 2019-04-11 16:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-04-11 16:06:52 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Alexander Chuzhoy 2018-12-05 21:03:07 UTC
disk build fails with: diskimage_builder.block_device.exception.BlockDeviceSetupException: Config entry not a dict: /


Environment:
openstack-ironic-common-9.1.4-2.el7ost.noarch
instack-undercloud-7.4.12-3.el7ost.noarch
python-ironic-lib-2.10.1-2.el7ost.noarch
python-ironic-inspector-client-2.1.0-1.el7ost.noarch
python-ironicclient-1.17.0-1.el7ost.noarch
openstack-ironic-conductor-9.1.4-2.el7ost.noarch
openstack-ironic-inspector-6.0.2-1.el7ost.noarch
openstack-ironic-api-9.1.4-2.el7ost.noarch
puppet-ironic-11.5.0-2.el7ost.noarch
openstack-tripleo-heat-templates-7.0.12-17.el7ost.noarch



Steps to reproduce:
DIB_LOCAL_IMAGE=./rhel-guest-image-7.6-215.x86_64.qcow2
DIB_BLOCK_DEVICE_CONFIG=/home/stack/partitions.yaml
DIB_YUM_REPO_CONF=/etc/yum.repos.d/rhos-release-rhel-7.6.repo /etc/yum.repos.d/rhos-release-12.repo


Follow the guide to build a whole disk image:
https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/12/html/director_installation_and_usage/appe-whole_disk_images#appe-Customizing-Security-Hardened-Whole-Disk-Image



[stack@undercloud-0 ~]$ cat partitions.yaml 
export DIB_BLOCK_DEVICE_CONFIG='''
- local_loop:
    name: image0
- partitioning:
    base: image0
    label: mbr
    partitions:
      - name: root
        flags: [ boot,primary ]
        size: 8G
        mkfs:
            type: xfs
            label: "img-rootfs"
            mount:
                mount_point: /
                fstab:
                    options: "rw,relatime"
                    fck-passno: 1
      - name: tmp
        size: 1G
        mkfs:
            type: xfs
            mount:
                mount_point: /tmp
                fstab:
                    options: "rw,nosuid,nodev,noexec,relatime"
      - name: var
        size: 10G
        mkfs:
            type: xfs
            mount:
                mount_point: /var
                fstab:
                    options: "rw,relatime"
      - name: log
        size: 5G
        mkfs:
            type: xfs
            mount:
                mount_point: /var/log
                fstab:
                    options: "rw,relatime"
      - name: audit
        size: 900M
        mkfs:
            type: xfs
            mount:
                mount_point: /var/log/audit
                fstab:
                    options: "rw,relatime"
      - name: home
        size: 100M
        mkfs:
            type: xfs
            mount:
                mount_point: /home
                fstab:
                    options: "rw,nodev,relatime"
'''



Run:
openstack overcloud image build --image-name overcloud-hardened-full --config-file /usr/share/openstack-tripleo-common/image-yaml/overcloud-hardened-images.yaml --config-file /usr/share/openstack-tripleo-common/image-yaml/overcloud-hardened-images-rhel7.yaml


Result:
Running ['disk-image-create', '-a', 'amd64', '-o', './overcloud-hardened-full', '-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', '--min-tmpfs', '5', 'rhel7', 'dhcp-all-interfaces', 'overcloud-agent', 'overcloud-full', 'overcloud-controller', 'overcloud-compute', 'overcloud-ceph-storage', 'puppet-modules', 'os-net-config', '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']
Logging output to ./overcloud-hardened-full.log
2018-12-05 21:02:13.359 | diskimage-builder version 2.9.1
2018-12-05 21:02:13.359 | Building elements: base  rhel7 dhcp-all-interfaces overcloud-agent overcloud-full overcloud-controller overcloud-compute overcloud-ceph-storage puppet-modules os-net-config 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
2018-12-05 21:02:13.434 | Expanded element dependencies to: pip-and-virtualenv-override rpm-distro puppet-modules install-bin pip-manifest manifests dhcp-all-interfaces puppet overcloud-base modprobe-blacklist os-apply-config package-installs bootloader os-refresh-config source-repositories dynamic-login os-net-config os-svc-install enable-packages-install overcloud-secure select-boot-kernel-initrd stable-interface-names overcloud-agent iptables install-types install-static openssh-server rhel-common svc-map dib-python element-manifest openvswitch overcloud-opstools base dib-init-system remove-machine-id rhel7 dracut-regenerate overcloud-controller redhat-common overcloud-ceph-storage runtime-ssh-host-keys overcloud-full cache-url pkg-map yum overcloud-compute remove-resolvconf
2018-12-05 21:02:13.506 | Building in /tmp/dib_build.KlQOfVOX
2018-12-05 21:02:13.510 | User specified block-device config from DIB_BLOCK_DEVICE_CONFIG
2018-12-05 21:02:13.939 | Traceback (most recent call last):
2018-12-05 21:02:13.939 |   File "/bin/dib-block-device", line 10, in <module>
2018-12-05 21:02:13.939 |     sys.exit(main())
2018-12-05 21:02:13.939 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/cmd.py", line 120, in main
2018-12-05 21:02:13.939 |     return bdc.main()
2018-12-05 21:02:13.940 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/cmd.py", line 115, in main
2018-12-05 21:02:13.940 |     self.args.func()
2018-12-05 21:02:13.940 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/cmd.py", line 30, in cmd_init
2018-12-05 21:02:13.940 |     self.bd.cmd_init()
2018-12-05 21:02:13.940 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/blockdevice.py", line 242, in cmd_init
2018-12-05 21:02:13.940 |     self.config = config_tree_to_graph(self.config)
2018-12-05 21:02:13.940 |   File "/usr/lib/python2.7/site-packages/diskimage_builder/block_device/config.py", line 128, in config_tree_to_graph
2018-12-05 21:02:13.940 |     "Config entry not a dict: %s" % entry)
2018-12-05 21:02:13.940 | diskimage_builder.block_device.exception.BlockDeviceSetupException: Config entry not a dict: /
2018-12-05 21:02:14.379 | INFO diskimage_builder.block_device.blockdevice [-] State already cleaned - no way to do anything here
2018-12-05 21:02:14.408 | *** /tmp/dib_build.KlQOfVOX/mnt is not a directory
Command '['disk-image-create', '-a', 'amd64', '-o', './overcloud-hardened-full', '-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', '--min-tmpfs', '5', 'rhel7', 'dhcp-all-interfaces', 'overcloud-agent', 'overcloud-full', 'overcloud-controller', 'overcloud-compute', 'overcloud-ceph-storage', 'puppet-modules', 'os-net-config', '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']' returned non-zero exit status 1

Comment 2 Bob Fournier 2019-04-11 16:06:52 UTC
Haven't seen since, or in version other than OSP-12.  Closing for now, please reopen if it occurs again.


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