Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed volume stats #3798

Closed
wants to merge 1 commit into from
Closed

Conversation

Spaceman1984
Copy link
Contributor

@Spaceman1984 Spaceman1984 commented Jan 8, 2020

Description

This fixes a bug where the volume statistics for the physical size is incorrect

Fixes: #3416

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)

Screenshots (if appropriate):

How Has This Been Tested?

This was tested by verifying that the vmdk file size in vcenter corresponds to the physical volume size in the ui of the management server. Please note that vcenter displays kilobytes where
Cloudstack management server displays kibibytes on linux.

@andrijapanicsb
Copy link
Contributor

@Spaceman1984 is this meant to go in 4.14, 4.13.1 or else?
@blueorangutan package

@blueorangutan
Copy link

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

@Spaceman1984
Copy link
Contributor Author

Spaceman1984 commented Jan 9, 2020

@Spaceman1984 is this meant to go in 4.14, 4.13.1 or else?
@blueorangutan package

@andrijapanicsb Looks like 4.13.1

@blueorangutan
Copy link

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

@andrijapanicsb
Copy link
Contributor

@Spaceman1984 pls don't quote the reply with the blue monkey, it triggers re-build or whatever command was there for "him"...
I've killed both jobs, running a new one again
@blueorangutan package

@andrijapanicsb andrijapanicsb added this to the 4.13.1.0 milestone Jan 9, 2020
@andrijapanicsb
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

@Spaceman1984 , though it looks like an improvement to me, i have one worry:

  • we are iterating over volumes
  • we get the owning vm
  • we get the file layout for the vm
  • and we than iterate over the files for that vm.
    it seems to me that we might count doubles if multiple volumes are attached to a vm.
    any thoughts?

VirtualMachineFileLayoutEx fileLayout = vmMo.getFileLayout();
List<VirtualMachineFileLayoutExFileInfo> files = fileLayout.getFile();
for(VirtualMachineFileLayoutExFileInfo fileInfo: files){
if (fileInfo.getName().contains("ROOT")){
Copy link
Contributor

Choose a reason for hiding this comment

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

on second thought, there is no way here we know that we "only" want "ROOT" while iterating over a list of cmd.getVolumeUuids()

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-558

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian test result (tid-738)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 28260 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3798-t738-kvm-centos7.zip
Smoke tests completed. 77 look OK, 0 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File

@Spaceman1984
Copy link
Contributor Author

There is an issue here, this fix doesn't take into account when the volume has a different name than root, and it also doesn't work for volumes that are not attached to a vm. A rework is in progress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants