Skip to content

kvm: don't always force scsi controller for aarch64 VMs#5802

Merged
yadvr merged 3 commits into
apache:4.16from
shapeblue:aarch64-scsi-fix
Dec 30, 2021
Merged

kvm: don't always force scsi controller for aarch64 VMs#5802
yadvr merged 3 commits into
apache:4.16from
shapeblue:aarch64-scsi-fix

Conversation

@yadvr
Copy link
Copy Markdown
Member

@yadvr yadvr commented Dec 22, 2021

This would allow use of virtio disk controller with Ceph, etc or as
defined in the VM's root disk controller setting, rather than always
enforce SCSI.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

On ARM64 setup, this would now allow use of virtio disk controller for nfs and ceph. With Ceph, when virtio is used rbd performance increases drastically.

This would allow use of virtio disk controller with Ceph, etc or as
defined in the VM's root disk controller setting, rather than always
enforce SCSI.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
return null;
}

if (_guestCpuArch != null && _guestCpuArch.equals("aarch64")) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of removing, is it better to move this block to the default else case, because the default case always returns IDE ? I'm thinking in terms of backward compatibility

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This my own hardcoded check for experimental arm64 guest CPU/platform, this is only hit for users using arm64 hosts such as Ampere or Raspberry Pi4 - so there's no backward compatibility to take into consideration.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... on second thought, I've moved the code to fallback as default for aarch64 when other controller's can't be found/guessed.

@sureshanaparti
Copy link
Copy Markdown
Contributor

Following unit test failed
LibvirtComputingResourceTest.testCreateDevicesWithSCSIDisk:432->assertNodeExists:847

@rhtyd Can you update the unit test. Thanks.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr
Copy link
Copy Markdown
Member Author

yadvr commented Dec 23, 2021

Thanks @sureshanaparti done (I've tested this in my ceph/rpi lab, works)
@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

verifyDevices(devicesDef, to);
}

@Test
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhtyd
code lgtm

is it necessary to remove this unit test ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, as it was checking that for aarch64 scsi would always return; now it's not the case.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good. just tested it can be fixed by adding to.setPlatformEmulator("");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rohityadavcloud
I just had a look at the test again. I think we should not remove the test.
we could apply the following change

-        libvirtComputingResourceSpy._guestCpuArch = "aarch64";
+        to.setPlatformEmulator("Other PV Virtio-SCSI");

unit test will pass

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @weizhouapache on keeping the test with the needed adjustments.

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1999

@yadvr
Copy link
Copy Markdown
Member Author

yadvr commented Dec 23, 2021

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@yadvr
Copy link
Copy Markdown
Member Author

yadvr commented Dec 28, 2021

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
@yadvr yadvr requested a review from weizhouapache December 29, 2021 08:18
@yadvr
Copy link
Copy Markdown
Member Author

yadvr commented Dec 29, 2021

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@rohityadavcloud a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

Copy link
Copy Markdown
Member

@GabrielBrascher GabrielBrascher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2037

@yadvr
Copy link
Copy Markdown
Member Author

yadvr commented Dec 29, 2021

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-2754)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30877 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5802-t2754-kvm-centos7.zip
Smoke tests completed. 91 look OK, 0 have errors
Only failed tests results shown below:

Test Result Time (s) Test File

@DaanHoogland
Copy link
Copy Markdown
Contributor

@rohityadavcloud is further testing needed for this?

@yadvr
Copy link
Copy Markdown
Member Author

yadvr commented Dec 30, 2021

@DaanHoogland No, I've manually test the changes with RPi4 and smoketests with x86/kvm has passed.

@yadvr yadvr merged commit 6728b69 into apache:4.16 Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants