Details
Description
Per the docs:
http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/service_offerings.html#network-throttling
Guest/public nics on VR should pick network rate from the VR's network offering (or as fallback use the rate defined in the network.throttling.rate global setting) however it is not the case.
Attachments
Issue Links
- links to
Activity
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-349238792
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-349253470
Packaging result: ✔centos6 ✔centos7 ✖debian. JID-1343
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
rhtyd commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-349278875
@blueorangutan test
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-349278993
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-349421271
<b>Trillian test result (tid-1732)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 29733 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2351-t1732-kvm-centos7.zip
Test /marvin/tests/smoke/test_accounts.py took 1212 seconds
Test /marvin/tests/smoke/test_affinity_groups_projects.py took 148 seconds
Test /marvin/tests/smoke/test_affinity_groups.py took 133 seconds
Test /marvin/tests/smoke/test_certauthority_root.py took 36 seconds
Test /marvin/tests/smoke/test_deploy_vgpu_enabled_vm.py took 5 seconds
Test /marvin/tests/smoke/test_deploy_virtio_scsi_vm.py took 771 seconds
Test /marvin/tests/smoke/test_deploy_vm_iso.py took 88 seconds
Test /marvin/tests/smoke/test_deploy_vm_root_resize.py took 118 seconds
Test /marvin/tests/smoke/test_deploy_vms_with_varied_deploymentplanners.py took 189 seconds
Test /marvin/tests/smoke/test_deploy_vm_with_userdata.py took 97 seconds
Test /marvin/tests/smoke/test_disk_offerings.py took 6 seconds
Test /marvin/tests/smoke/test_dynamicroles.py took 116 seconds
Test /marvin/tests/smoke/test_global_settings.py took 5 seconds
Test /marvin/tests/smoke/test_guest_vlan_range.py took 27 seconds
Test /marvin/tests/smoke/test_host_annotations.py took 14 seconds
Test /marvin/tests/smoke/test_hostha_simulator.py took 6 seconds
Test /marvin/tests/smoke/test_host_maintenance.py took 284 seconds
Test /marvin/tests/smoke/test_hosts.py took 6 seconds
Test /marvin/tests/smoke/test_internal_lb.py took 1520 seconds
Test /marvin/tests/smoke/test_iso.py took 266 seconds
Test /marvin/tests/smoke/test_list_ids_parameter.py took 648 seconds
Test /marvin/tests/smoke/test_loadbalance.py took 675 seconds
Test /marvin/tests/smoke/test_login.py took 25 seconds
Test /marvin/tests/smoke/test_metrics_api.py took 75 seconds
Test /marvin/tests/smoke/test_multipleips_per_nic.py took 128 seconds
Test /marvin/tests/smoke/test_nested_virtualization.py took 11 seconds
Test /marvin/tests/smoke/test_network_acl.py took 148 seconds
Test /marvin/tests/smoke/test_network.py took 1375 seconds
Test /marvin/tests/smoke/test_nic_adapter_type.py took 11 seconds
Test /marvin/tests/smoke/test_nic.py took 511 seconds
Test /marvin/tests/smoke/test_non_contigiousvlan.py took 21 seconds
Test /marvin/tests/smoke/test_outofbandmanagement_nestedplugin.py took 93 seconds
Test /marvin/tests/smoke/test_outofbandmanagement.py took 244 seconds
Test /marvin/tests/smoke/test_over_provisioning.py took 6 seconds
Test /marvin/tests/smoke/test_password_server.py took 234 seconds
Test /marvin/tests/smoke/test_portable_publicip.py took 53 seconds
Test /marvin/tests/smoke/test_portforwardingrules.py took 130 seconds
Test /marvin/tests/smoke/test_primary_storage.py took 470 seconds
Test /marvin/tests/smoke/test_privategw_acl.py took 896 seconds
Test /marvin/tests/smoke/test_projects.py took 664 seconds
Test /marvin/tests/smoke/test_public_ip_range.py took 11 seconds
Test /marvin/tests/smoke/test_pvlan.py took 10 seconds
Test /marvin/tests/smoke/test_regions.py took 6 seconds
Test /marvin/tests/smoke/test_reset_vm_on_reboot.py took 288 seconds
Test /marvin/tests/smoke/test_resource_detail.py took 22 seconds
Test /marvin/tests/smoke/test_router_dhcphosts.py took 480 seconds
Test /marvin/tests/smoke/test_router_dns.py took 225 seconds
Test /marvin/tests/smoke/test_router_dnsservice.py took 227 seconds
Test /marvin/tests/smoke/test_routers_iptables_default_policy.py took 290 seconds
Test /marvin/tests/smoke/test_routers_network_ops.py took 958 seconds
Test /marvin/tests/smoke/test_routers.py took 256 seconds
Test /marvin/tests/smoke/test_scale_vm.py took 5 seconds
Test /marvin/tests/smoke/test_secondary_storage.py took 6 seconds
Test /marvin/tests/smoke/test_service_offerings.py took 373 seconds
Test /marvin/tests/smoke/test_snapshots.py took 216 seconds
Test /marvin/tests/smoke/test_ssvm.py took 857 seconds
Test /marvin/tests/smoke/test_staticroles.py took 5 seconds
Test /marvin/tests/smoke/test_templates.py took 1247 seconds
Test /marvin/tests/smoke/test_usage_events.py took 5 seconds
Test /marvin/tests/smoke/test_usage.py took 1643 seconds
Test /marvin/tests/smoke/test_vm_life_cycle.py took 798 seconds
Test /marvin/tests/smoke/test_vm_snapshots.py took 647 seconds
Test /marvin/tests/smoke/test_volumes.py took 2269 seconds
Test /marvin/tests/smoke/test_vpc_redundant.py took 3177 seconds
Test /marvin/tests/smoke/test_vpc_router_nics.py took 724 seconds
Test /marvin/tests/smoke/test_vpc_vpn.py took 712 seconds
Test /marvin/tests/smoke/test_hostha_kvm.py took 1008 seconds
Test completed. 64 look OK, 3 have error(s)
Test | Result | Time (s) | Test File
— | — | — | —
test_01_vpc_remote_access_vpn | `Failure` | 55.93 | test_vpc_vpn.py
test_04_rvpc_privategw_static_routes | `Failure` | 294.13 | test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 117.71 | test_privategw_acl.py
test_02_vpc_privategw_static_routes | `Failure` | 208.40 | test_privategw_acl.py
test_01_vpc_privategw_acl | `Failure` | 66.83 | test_privategw_acl.py
ContextSuite context=TestInternalLb>:setup | `Error` | 0.00 | test_internal_lb.py
test_change_service_offering_for_vm_with_snapshots | Skipped | 0.00 | test_vm_snapshots.py
test_09_copy_delete_template | Skipped | 0.02 | test_templates.py
test_06_copy_template | Skipped | 0.00 | test_templates.py
test_static_role_account_acls | Skipped | 0.02 | test_staticroles.py
test_11_ss_nfs_version_on_ssvm | Skipped | 0.02 | test_ssvm.py
test_01_scale_vm | Skipped | 0.00 | test_scale_vm.py
test_01_primary_storage_iscsi | Skipped | 0.13 | test_primary_storage.py
test_vm_nic_adapter_vmxnet3 | Skipped | 0.00 | test_nic_adapter_type.py
test_03_nic_multiple_vmware | Skipped | 1.11 | test_nic.py
test_nested_virtualization_vmware | Skipped | 0.00 | test_nested_virtualization.py
test_06_copy_iso | Skipped | 0.00 | test_iso.py
test_list_ha_for_host_valid | Skipped | 0.02 | test_hostha_simulator.py
test_list_ha_for_host_invalid | Skipped | 0.03 | test_hostha_simulator.py
test_list_ha_for_host | Skipped | 0.02 | test_hostha_simulator.py
test_hostha_enable_feature_without_setting_provider | Skipped | 0.02 | test_hostha_simulator.py
test_hostha_enable_feature_valid | Skipped | 0.02 | test_hostha_simulator.py
test_hostha_disable_feature_valid | Skipped | 0.02 | test_hostha_simulator.py
test_hostha_configure_invalid_provider | Skipped | 0.02 | test_hostha_simulator.py
test_hostha_configure_default_driver | Skipped | 0.02 | test_hostha_simulator.py
test_ha_verify_fsm_recovering | Skipped | 0.02 | test_hostha_simulator.py
test_ha_verify_fsm_fenced | Skipped | 0.02 | test_hostha_simulator.py
test_ha_verify_fsm_degraded | Skipped | 0.03 | test_hostha_simulator.py
test_ha_verify_fsm_available | Skipped | 0.02 | test_hostha_simulator.py
test_ha_multiple_mgmt_server_ownership | Skipped | 0.03 | test_hostha_simulator.py
test_ha_list_providers | Skipped | 0.02 | test_hostha_simulator.py
test_ha_enable_feature_invalid | Skipped | 0.02 | test_hostha_simulator.py
test_ha_disable_feature_invalid | Skipped | 0.02 | test_hostha_simulator.py
test_ha_configure_enabledisable_across_clusterzones | Skipped | 0.02 | test_hostha_simulator.py
test_configure_ha_provider_valid | Skipped | 0.02 | test_hostha_simulator.py
test_configure_ha_provider_invalid | Skipped | 0.03 | test_hostha_simulator.py
test_deploy_vgpu_enabled_vm | Skipped | 0.03 | test_deploy_vgpu_enabled_vm.py
test_3d_gpu_support | Skipped | 0.04 | test_deploy_vgpu_enabled_vm.py
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
rhtyd commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-350774668
Tests LGTM, the failures are known intermittent issues and not caused by this PR.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
rhtyd commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-351980716
Updated fix /cc @borisstoyanov
@blueorangutan package
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-351980803
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-351985299
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1373
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
rhtyd commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-351986849
@blueorangutan test centos7 vmware-55u3
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-351986996
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + vmware-55u3) has been kicked to run smoke tests
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-352157845
<b>Trillian test result (tid-1789)</b>
Environment: vmware-55u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 57003 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2351-t1789-vmware-55u3.zip
Test completed. Failed tests results shown below:
Test | Result | Time (s) | Test File
— | — | — | —
test_00_deploy_vm_root_resize | `Error` | 6.16 | test_deploy_vm_root_resize.py
ContextSuite context=TestDeployVmRootSize>:teardown | `Error` | 0.08 | test_deploy_vm_root_resize.py
test_04_extract_Iso | `Failure` | 132.35 | test_iso.py
test_01_deploy_vms_storage_tags | `Error` | 35.58 | test_primary_storage.py
test_01_deploy_vms_storage_tags | `Error` | 35.61 | test_primary_storage.py
ContextSuite context=TestStorageTags>:teardown | `Error` | 85.56 | test_primary_storage.py
test_01_vpc_privategw_acl | `Failure` | 126.66 | test_privategw_acl.py
test_02_vpc_privategw_static_routes | `Failure` | 458.53 | test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 383.61 | test_privategw_acl.py
test_04_rvpc_privategw_static_routes | `Failure` | 554.28 | test_privategw_acl.py
test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Failure` | 400.06 | test_routers_network_ops.py
test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Failure` | 478.73 | test_routers_network_ops.py
test_02_list_snapshots_with_removed_data_store | `Error` | 30.72 | test_snapshots.py
test_02_list_snapshots_with_removed_data_store | `Error` | 30.74 | test_snapshots.py
test_05_stop_ssvm | `Error` | 320.58 | test_ssvm.py
test_06_stop_cpvm | `Error` | 143.69 | test_ssvm.py
test_07_reboot_ssvm | `Error` | 127.10 | test_ssvm.py
test_08_reboot_cpvm | `Failure` | 0.03 | test_ssvm.py
test_02_create_template_with_checksum_sha1 | `Error` | 5.15 | test_templates.py
test_03_create_template_with_checksum_sha256 | `Error` | 5.17 | test_templates.py
test_04_create_template_with_checksum_md5 | `Error` | 5.17 | test_templates.py
test_04_extract_template | `Failure` | 142.38 | test_templates.py
ContextSuite context=TestISOUsage>:setup | `Error` | 0.00 | test_usage.py
test_01_volume_usage | `Error` | 15.80 | test_usage.py
test_01_create_volume | `Error` | 25.31 | test_volumes.py
test_02_attach_volume | `Error` | 20.15 | test_volumes.py
test_03_download_attached_volume | `Error` | 5.07 | test_volumes.py
test_04_delete_attached_volume | `Error` | 5.07 | test_volumes.py
test_05_detach_volume | `Error` | 5.07 | test_volumes.py
test_06_download_detached_volume | `Error` | 5.07 | test_volumes.py
test_07_resize_fail | `Error` | 10.21 | test_volumes.py
test_08_resize_volume | `Error` | 5.06 | test_volumes.py
test_09_delete_detached_volume | `Error` | 20.23 | test_volumes.py
test_10_list_volumes | `Failure` | 365.98 | test_volumes.py
ContextSuite context=TestVolumes>:teardown | `Error` | 366.17 | test_volumes.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Failure` | 1518.24 | test_vpc_redundant.py
test_05_rvpc_multi_tiers | `Failure` | 1436.28 | test_vpc_redundant.py
test_01_vpc_remote_access_vpn | `Failure` | 558.26 | test_vpc_vpn.py
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
rhtyd commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-352160235
@blueorangutan test
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-352160258
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-352180710
<b>Trillian test result (tid-1797)</b>
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 28803 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2351-t1797-kvm-centos7.zip
Test completed. Failed tests results shown below:
Test | Result | Time (s) | Test File
— | — | — | —
ContextSuite context=TestTemplateHierarchy>:setup | `Error` | 1551.29 | test_accounts.py
ContextSuite context=TestDeployVirtioSCSIVM>:setup | `Error` | 0.00 | test_deploy_virtio_scsi_vm.py
test_01_vpc_privategw_acl | `Failure` | 51.59 | test_privategw_acl.py
test_02_vpc_privategw_static_routes | `Failure` | 147.94 | test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 152.94 | test_privategw_acl.py
test_04_rvpc_privategw_static_routes | `Failure` | 163.02 | test_privategw_acl.py
test_02_create_template_with_checksum_sha1 | `Error` | 5.27 | test_templates.py
test_03_create_template_with_checksum_sha256 | `Error` | 5.28 | test_templates.py
test_04_create_template_with_checksum_md5 | `Error` | 5.27 | test_templates.py
test_01_volume_usage | `Failure` | 796.87 | test_usage.py
test_01_vpc_remote_access_vpn | `Failure` | 45.83 | test_vpc_vpn.py
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
rhtyd commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-353036329
Please review @nvazquez @DaanHoogland @borisstoyanov @rafaelweingartner and others
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
rhtyd commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-353337394
Thanks for confirming @borisstoyanov and @wido for the review.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
rhtyd commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-353337569
Merging this based on regression tests, code reviews and two LGTMs.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
rhtyd closed pull request #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
index 40ffdf490d4..aaffe8da1c3 100644
— a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
+++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java
@@ -1170,7 +1170,7 @@ private UnPlugNicAnswer execute(UnPlugNicCommand cmd) {
}
}
- private void plugPublicNic(VirtualMachineMO vmMo, final String vlanId, final String vifMacAddress) throws Exception {
+ private void plugPublicNic(VirtualMachineMO vmMo, final String vlanId, final IpAddressTO ipAddressTO) throws Exception {
// TODO : probably need to set traffic shaping
Pair<ManagedObjectReference, String> networkInfo = null;
VirtualSwitchType vSwitchType = VirtualSwitchType.StandardVirtualSwitch;
@@ -1182,11 +1182,11 @@ private void plugPublicNic(VirtualMachineMO vmMo, final String vlanId, final Str
*/
if (VirtualSwitchType.StandardVirtualSwitch == vSwitchType) { networkInfo = HypervisorHostHelper.prepareNetwork(_publicTrafficInfo.getVirtualSwitchName(), - "cloud.public", vmMo.getRunningHost(), vlanId, null, null, + "cloud.public", vmMo.getRunningHost(), vlanId, ipAddressTO.getNetworkRate(), null, _opsTimeout, true, BroadcastDomainType.Vlan, null, null); }else
{ networkInfo = - HypervisorHostHelper.prepareNetwork(_publicTrafficInfo.getVirtualSwitchName(), "cloud.public", vmMo.getRunningHost(), vlanId, null, null, null, + HypervisorHostHelper.prepareNetwork(_publicTrafficInfo.getVirtualSwitchName(), "cloud.public", vmMo.getRunningHost(), vlanId, null, ipAddressTO.getNetworkRate(), null, _opsTimeout, vSwitchType, _portsPerDvPortGroup, null, false, BroadcastDomainType.Vlan, _vsmCredentials, null); }
@@ -1302,7 +1302,7 @@ private ExecutionResult prepareNetworkElementCommand(IpAssocCommand cmd) {
}
if (addVif) {
- plugPublicNic(vmMo, vlanId, ip.getVifMacAddress());
+ plugPublicNic(vmMo, vlanId, ip);
publicNicInfo = vmMo.getNicDeviceIndex(publicNeworkName);
if (publicNicInfo.first().intValue() >= 0) {
networkUsage(controlIp, "addVif", "eth" + publicNicInfo.first());
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
index 2efec9a0999..8842b12935f 100644-
- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -34,6 +34,7 @@
import javax.naming.ConfigurationException;
- a/server/src/com/cloud/network/NetworkModelImpl.java
-
import org.apache.cloudstack.acl.ControlledEntity.ACLType;
+import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService;
import org.apache.cloudstack.framework.config.ConfigKey;
import org.apache.cloudstack.framework.config.Configurable;
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
@@ -994,33 +995,43 @@ public Integer getNetworkRate(long networkId, Long vmId) {
if (vmId != null)
- Network network = getNetwork(networkId);
- NetworkOffering ntwkOff = _entityMgr.findById(NetworkOffering.class, network.getNetworkOfferingId());
- - // For default userVm Default network and domR guest/public network, get rate information from the service
- // offering; for other situations get information
- // from the network offering
- boolean isUserVmsDefaultNetwork = false;
- boolean isDomRGuestOrPublicNetwork = false;
- boolean isSystemVmNetwork = false;
+ final Network network = getNetwork(networkId);
+ final NetworkOffering ntwkOff = _entityMgr.findById(NetworkOffering.class, network.getNetworkOfferingId());
+
+ // For user VM: For default nic use network rate from the service/compute offering,
+ // or on NULL from vm.network.throttling.rate global setting
+ // For router: Get network rate for guest and public networks from the guest network offering
+ // or on NULL from network.throttling.rate
+ // For others: Use network rate from their network offering,
+ // or on NULL from network.throttling.rate setting at zone > global level
+ // http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/service_offerings.html#network-throttling
if (vm != null) { - Nic nic = _nicDao.findByNtwkIdAndInstanceId(networkId, vmId);
- if (vm.getType() == Type.User && nic != null && nic.isDefaultNic())
{
- isUserVmsDefaultNetwork = true;
- }
else if (vm.getType() == Type.DomainRouter && ntwkOff != null &&
- (ntwkOff.getTrafficType() == TrafficType.Public || ntwkOff.getTrafficType() == TrafficType.Guest))
{
- isDomRGuestOrPublicNetwork = true;
- }
else if (vm.getType() == Type.ConsoleProxy || vm.getType() == Type.SecondaryStorageVm)
{ - isSystemVmNetwork = true; - } - }
- if (isUserVmsDefaultNetwork || isDomRGuestOrPublicNetwork)
{
- return _configMgr.getServiceOfferingNetworkRate(vm.getServiceOfferingId(), network.getDataCenterId());
- }
else if (isSystemVmNetwork)
{ - return -1; - }else {
+ if (vm.getType() == Type.User)Unknown macro: {+ final Nic nic = _nicDao.findByNtwkIdAndInstanceId(networkId, vmId);+ if (nic != null && nic.isDefaultNic()) { + return _configMgr.getServiceOfferingNetworkRate(vm.getServiceOfferingId(), network.getDataCenterId()); + }+ }+ if (vm.getType() == Type.DomainRouter && (network.getTrafficType() == TrafficType.Public || network.getTrafficType() == TrafficType.Guest)) {
+ for (final Nic nic: _nicDao.listByVmId(vmId))Unknown macro: {+ final NetworkVO nw = _networksDao.findById(nic.getNetworkId());+ if (nw.getTrafficType() == TrafficType.Guest) { + return _configMgr.getNetworkOfferingNetworkRate(nw.getNetworkOfferingId(), network.getDataCenterId()); + }+ }+ }
{ + return -1; + }
+ if (vm.getType() == Type.ConsoleProxy || vm.getType() == Type.SecondaryStorageVm)+ }
{ return _configMgr.getNetworkOfferingNetworkRate(ntwkOff.getId(), network.getDataCenterId()); }
+ if (ntwkOff != null)+ final Integer networkRate = NetworkOrchestrationService.NetworkThrottlingRate.valueIn(network.getDataCenterId());
{ + return networkRate; + }
+ if (networkRate != null && networkRate > 0)+ return -1;
}
@Override
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-353337730
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
blueorangutan commented on issue #2351: CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offering
URL: https://github.com/apache/cloudstack/pull/2351#issuecomment-353342524
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1451
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
rhtyd opened a new pull request #2351:
CLOUDSTACK-10173: VR's guest/public nic to pick network rate from offeringURL: https://github.com/apache/cloudstack/pull/2351
Per the following doc, VR's guest/public nic should pick up network
rate from its network offering:
http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/service_offerings.html#network-throttling
@blueorangutan package
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org