Skip to content

Conversation

@nvazquez
Copy link
Contributor

@nvazquez nvazquez commented Jul 15, 2019

Description

When VM is created but not started on any host, attaching a volume on it causes the maximum number of allowed volumes to be 6 (hardcoded)

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?

  • Deploy VM with startvm=false parameter
  • Attach more than 6 volumes to VM (in case of KVM and VMware)

@nvazquez nvazquez self-assigned this Jul 15, 2019
@nvazquez nvazquez changed the title Fix hardcoded max data volumes when VM has been created but not started before [WIP DO NOT MERGE] Fix hardcoded max data volumes when VM has been created but not started before Jul 15, 2019
@nvazquez
Copy link
Contributor Author

Ping @anuragaw @shwstppr can you please review?

HypervisorType.KVM, HypervisorType.Ovm, HypervisorType.LXC);
HypervisorType hypervisorType = vm.getHypervisorType();
if (hypervisorType != null && supportingDefaultHV.contains(hypervisorType)) {
maxDataVolumesSupported = _hypervisorCapabilitiesDao.getMaxDataVolumesLimit(hypervisorType, "default");
Copy link
Member

Choose a reason for hiding this comment

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

Could version specific values cause regression or bug?

Copy link
Contributor

Choose a reason for hiding this comment

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

if these are lower the "default", yes @rhtyd. But that should never be the case, should it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I've verified any version contains max limit lower than the default for each hypervisor

HypervisorType.KVM, HypervisorType.Ovm, HypervisorType.LXC);
HypervisorType hypervisorType = vm.getHypervisorType();
if (hypervisorType != null && supportingDefaultHV.contains(hypervisorType)) {
maxDataVolumesSupported = _hypervisorCapabilitiesDao.getMaxDataVolumesLimit(hypervisorType, "default");
Copy link
Contributor

Choose a reason for hiding this comment

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

if these are lower the "default", yes @rhtyd. But that should never be the case, should it?

@DaanHoogland
Copy link
Contributor

hudson couldn't reach github :(

@DaanHoogland
Copy link
Contributor

try again

@DaanHoogland DaanHoogland reopened this Jul 16, 2019
Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

LGTM. Tested locally with KVM. Able to attach upto 32 volumes
Screenshot from 2019-07-16 14-17-48

@nvazquez nvazquez changed the title [WIP DO NOT MERGE] Fix hardcoded max data volumes when VM has been created but not started before Fix hardcoded max data volumes when VM has been created but not started before Jul 16, 2019
@nvazquez nvazquez added this to the 4.13.0.0 milestone Jul 16, 2019
@nvazquez nvazquez force-pushed the fixmaxdatavolumes branch from 07b38f0 to 435ad5f Compare July 16, 2019 13:49
@nvazquez nvazquez force-pushed the fixmaxdatavolumes branch from 435ad5f to 5fa201c Compare July 16, 2019 13:51
@nvazquez
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Packaging result: ✖centos6 ✖centos7 ✖debian. JID-137

@nvazquez
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Copy link
Contributor

@anuragaw anuragaw left a comment

Choose a reason for hiding this comment

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

LGTM in general but a minor questions.

}

@Override
public List<HypervisorType> getHypervisorsWithDefaultEntries() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a possibility of high frequency calls to this method? If so we can perhaps optimize query calls with some caching? If not LGTM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @anuragaw, have refactored it to invoke this only once

@nvazquez
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@nvazquez
Copy link
Contributor Author

@blueorangutan test matrix

@blueorangutan
Copy link

@nvazquez a Trillian-Jenkins matrix job (centos6 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

Copy link
Contributor

@anuragaw anuragaw left a comment

Choose a reason for hiding this comment

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

LGTM based on code and manual testing.

@blueorangutan
Copy link

Trillian test result (tid-167)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33160 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3494-t167-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py
Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Smoke tests completed. 76 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_04_rvpc_network_garbage_collector_nics Failure 297.88 test_vpc_redundant.py
test_05_rvpc_multi_tiers Failure 422.28 test_vpc_redundant.py
test_05_rvpc_multi_tiers Error 448.88 test_vpc_redundant.py

Copy link
Contributor

@borisstoyanov borisstoyanov left a comment

Choose a reason for hiding this comment

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

LGTM

@blueorangutan
Copy link

Trillian test result (tid-168)
Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39476 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3494-t168-vmware-65u2.zip
Intermittent failure detected: /marvin/tests/smoke/test_network.py
Intermittent failure detected: /marvin/tests/smoke/test_routers.py
Intermittent failure detected: /marvin/tests/smoke/test_snapshots.py
Intermittent failure detected: /marvin/tests/smoke/test_usage.py
Smoke tests completed. 73 look OK, 4 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_reboot_router Error 325.67 test_network.py
test_08_start_router Error 75.22 test_routers.py
test_09_reboot_router Error 1.15 test_routers.py
test_02_list_snapshots_with_removed_data_store Error 1.21 test_snapshots.py
test_01_volume_usage Error 10.51 test_usage.py

@nvazquez nvazquez closed this Jul 17, 2019
@nvazquez nvazquez reopened this Jul 17, 2019
@rohityadavcloud
Copy link
Member

Tests LGTM, they are failing irrespective of this PR.

@rohityadavcloud rohityadavcloud merged commit 38f97c6 into apache:master Jul 22, 2019
@nvazquez nvazquez deleted the fixmaxdatavolumes branch April 6, 2020 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants