title: openstack-octavia: failed to create amphora disk-image
body: <p>I configure openstack victoria multi-node on CentOS8. When I create amphora-disk-image (option -r rootpassword), I have an issue:</p>
  <pre><code>[root@controller ~(keystone)]# dnf --enablerepo=centos-openstack-victoria,powertools,epel -y install openstack-octavia-diskimage-create debootstrap
  [root@controller ~(keystone)]# sudo octavia-diskimage-create.sh -r rootpassword
  </code></pre>
  <p>And <strong>exec_sudo failed</strong></p>
  <pre><code>2021-05-08 17:00:22.057 | INFO diskimage_builder.block_device.blockdevice [-] Getting value for [image-path]
  2021-05-08 17:00:22.497 | INFO diskimage_builder.block_device.level3.mount [-] Called for [mount_mkfs_root]
  2021-05-08 17:00:22.497 | INFO diskimage_builder.block_device.utils [-] Calling [sudo sync]
  2021-05-08 17:00:22.522 | INFO diskimage_builder.block_device.utils [-] Calling [sudo fstrim --verbose /tmp/dib_build.jx0MDPok/mnt/]
  2021-05-08 17:00:22.554 | INFO diskimage_builder.block_device.utils [-] Calling [sudo umount /tmp/dib_build.jx0MDPok/mnt/]
  2021-05-08 17:00:22.721 | INFO diskimage_builder.block_device.utils [-] Calling [sudo kpartx -d /dev/loop0]
  2021-05-08 17:00:22.751 | Traceback (most recent call last):
  2021-05-08 17:00:22.751 |   File &quot;/bin/dib-block-device&quot;, line 10, in &lt;module&gt;
  2021-05-08 17:00:22.751 |     sys.exit(main())
  2021-05-08 17:00:22.751 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/cmd.py&quot;, line 120, in main
  2021-05-08 17:00:22.751 |     return bdc.main()
  2021-05-08 17:00:22.751 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/cmd.py&quot;, line 115, in main
  2021-05-08 17:00:22.751 |     self.args.func()
  2021-05-08 17:00:22.751 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/cmd.py&quot;, line 39, in cmd_umount
  2021-05-08 17:00:22.751 |     self.bd.cmd_umount()
  2021-05-08 17:00:22.751 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/blockdevice.py&quot;, line 442, in cmd_umount
  2021-05-08 17:00:22.751 |     node.umount()
  2021-05-08 17:00:22.751 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/level1/partition.py&quot;, line 88, in umount
  2021-05-08 17:00:22.751 |     self.partitioning.umount()
  2021-05-08 17:00:22.751 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/level1/partitioning.py&quot;, line 228, in umount
  2021-05-08 17:00:22.751 |     self.state['blockdev'][self.base]['device']])
  2021-05-08 17:00:22.751 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/utils.py&quot;, line 143, in exec_sudo
  2021-05-08 17:00:22.751 |     raise e
  2021-05-08 17:00:22.751 | diskimage_builder.block_device.exception.BlockDeviceSetupException: exec_sudo failed
  2021-05-08 17:00:23.208 | INFO diskimage_builder.block_device.level3.mount [-] Called for [mount_mkfs_root]
  2021-05-08 17:00:23.208 | INFO diskimage_builder.block_device.utils [-] Calling [sudo sync]
  2021-05-08 17:00:23.233 | INFO diskimage_builder.block_device.utils [-] Calling [sudo fstrim --verbose /tmp/dib_build.jx0MDPok/mnt/]
  2021-05-08 17:00:23.255 | Traceback (most recent call last):
  2021-05-08 17:00:23.255 |   File &quot;/bin/dib-block-device&quot;, line 10, in &lt;module&gt;
  2021-05-08 17:00:23.256 |     sys.exit(main())
  2021-05-08 17:00:23.256 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/cmd.py&quot;, line 120, in main
  2021-05-08 17:00:23.256 |     return bdc.main()
  2021-05-08 17:00:23.256 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/cmd.py&quot;, line 115, in main
  2021-05-08 17:00:23.256 |     self.args.func()
  2021-05-08 17:00:23.256 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/cmd.py&quot;, line 39, in cmd_umount
  2021-05-08 17:00:23.256 |     self.bd.cmd_umount()
  2021-05-08 17:00:23.256 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/blockdevice.py&quot;, line 442, in cmd_umount
  2021-05-08 17:00:23.256 |     node.umount()
  2021-05-08 17:00:23.256 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/level3/mount.py&quot;, line 111, in umount
  2021-05-08 17:00:23.256 |     self.state['mount'][self.mount_point]['path']])
  2021-05-08 17:00:23.256 |   File &quot;/usr/lib/python3.6/site-packages/diskimage_builder/block_device/utils.py&quot;, line 143, in exec_sudo
  2021-05-08 17:00:23.256 |     raise e
  2021-05-08 17:00:23.256 | diskimage_builder.block_device.exception.BlockDeviceSetupException: exec_sudo failed
  </code></pre>
  <p>**The reason I create amphora-disk-image with root password because I guess firewalld of amphora block port 9443. So that, octavia-api can't connect to amphora-instance to create --vip-subnet-id loadbalancer. My other post of this issue here if you can check it out:  <a href="https://stackoverflow.com/questions/67406980/openstack-octavia-error-warning-octavia-amphorae-drivers-haproxy-rest-api-drive?noredirect=1#comment119149656_67406980">Openstack Octavia Error: WARNING octavia.amphorae.drivers.haproxy.rest_api_driver [-] Could not connect to instance</a></p>
  <p><strong>Best regards!</strong></p>