Skip to content

Commit

Permalink
Revert "qa/tasks/qemu: switch nbd devices from virtio to ide"
Browse files Browse the repository at this point in the history
This reverts commit fa1bf21.
  • Loading branch information
orozery committed Jan 23, 2022
1 parent fa1bf21 commit 8e5e1c7
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions qa/tasks/qemu.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,21 +204,13 @@ def generate_iso(ctx, config):
'image_url' in disk:
continue
dev_letter = disk['device_letter']
if disk['encryption_format'] == 'none':
link_dev_command = ':' # no-op
else:
# encrypted disks use IDE (/dev/sdX instead of /dev/vdX)
link_dev_command = \
'ln -s /dev/sd{dev_letter} /dev/vd{dev_letter}'.format(
dev_letter=dev_letter)
user_data += """
- |
#!/bin/bash
mkdir /mnt/test_{dev_letter}
{link_dev_command}
mkfs -t xfs /dev/vd{dev_letter}
mount -t xfs /dev/vd{dev_letter} /mnt/test_{dev_letter}
""".format(dev_letter=dev_letter, link_dev_command=link_dev_command)
""".format(dev_letter=dev_letter)

user_data += """
- |
Expand Down Expand Up @@ -504,23 +496,17 @@ def run_qemu(ctx, config):
continue

if disk['encryption_format'] == 'none':
interface = 'virtio'
disk_spec = 'rbd:rbd/{img}:id={id}'.format(
img=disk['image_name'],
id=client[len('client.'):]
)
else:
# encrypted disks use ide as a temporary workaround for
# a bug in qemu when using virtio over nbd
# TODO: use librbd encryption directly via qemu (not via nbd)
interface = 'ide'
disk_spec = disk['device_path']

args.extend([
'-drive',
'file={disk_spec},format=raw,if={interface},cache={cachemode}'.format(
'file={disk_spec},format=raw,if=virtio,cache={cachemode}'.format(
disk_spec=disk_spec,
interface=interface,
cachemode=cachemode,
),
])
Expand Down

0 comments on commit 8e5e1c7

Please sign in to comment.