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

[4.6] CLOUDSTACK-4787 - vmware diskcontrollers #1132

Merged
merged 2 commits into from
Dec 12, 2015

Conversation

rohityadavcloud
Copy link
Member

Same as #1131 (see this for screenshots etc)

Sateesh Chodapuneedi and others added 2 commits November 27, 2015 18:39
    commit #7
    So far only 1 controller (scsi or ide) is supported in Cloudstack for ide or
    scsi, this is existing limitation. Added support for 2nd IDE controller. Support adding IDE
    virtual disk to VM. Also added check if VM is running as IDE virtual disk cannot be attached
    to VM if VM is runnning.If user detaches a virtual disk on lower unit number of controller,
    then subsequent attach operation should find free unit number on the controller and attach
    the virtual disk there.

    commit #6
    Let the controllers of existing VMs continue without flip, current busInfo retrieved from
    chain_info field of volume record from database would be preferred over
    controller settings from all configuration settings.

    commit #5
    Editing global configuration param vmware.root.disk.controller osdefault value results
    in loss of previous root disk controller type. Hence root disk's controller type for legacy
    VMs is unknow post that modificaiton by user. If VM is stop/start then we could get this
    infromation from bus info of existing volume. But if user resets VM and then try to start VM.
    The existing bus info would be lost. Hence existing disk info is not available to depend on.
    Using lsilogic or generic scsi controller for ROOT disk of legacy VMs if reset.

    commit #4
    Avoid adding additional (>1) scsi controllers to system vms. While attaching volume to legacy VM
    don't use osdefault optoin which applicable only for VM created with the option enabled, use
    legacy data disk controller type (lsilogic)

    commit #3
    If root disk's controller type is scsi and data disk controller type condenses
    to any of scsi sub-types then data disk controller type would fall back to root disk controller itself. This
    ensures data volumes would be accessible in all cases as controller of root volume would be reliable
    and it means VM has the supported controller. It also avoids mix of scsi controller sub-types in a user instance.
    Also translating disk controller type scsi to lsilogic.

    commit #2
    Support auto detection of recommended virtual disk controller type for specific guest OS.

    commit #1
    Support granual controller types. Add support for controller types in template registration as well.

    Fix white spaces.
    Removed stale HEAD merge lines
    Removed tail of merge lines
    Fixed VmwareResource, removing storage commands that moved to VmwareStorageProcessor.
    removed stale code of controller that is present in processor
    Fixed check style errors.
    Fixed injection.
    Tested with Linux and windows templates. Unable to run iso based tests due to few bugs in register iso area.

    Signed-off-by: Sateesh Chodapuneedi <[email protected]>

(cherry picked from commit a4cc987)
Signed-off-by: Rohit Yadav <[email protected]>
- Adds new controller types in the UI, for selecting root disk controller while
  registering templates
- Fixes bug to not override disk controller type if provided in the details (either
  vm details or from template details)

(cherry picked from commit c7d6762)
Signed-off-by: Rohit Yadav <[email protected]>
@remibergsma
Copy link
Contributor

LGTM based on these tests:

nosetests --with-marvin --marvin-config=${marvinCfg} -s -a tags=advanced,required_hardware=true \
component/test_vpc_redundant.py \
component/test_routers_iptables_default_policy.py \
component/test_routers_network_ops.py \
component/test_vpc_router_nics.py \
smoke/test_loadbalance.py \
smoke/test_internal_lb.py \
smoke/test_ssvm.py \
smoke/test_network.py

Result:

Test iptables default INPUT/FORWARD policies on VPC router ... === TestName: test_01_single_VPC_iptables_policies | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: test_01_isolate_network_FW_PF_default_routes_egress_true | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: test_02_isolate_network_FW_PF_default_routes_egress_false | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | Status : SUCCESS ===
ok
Test redundant router internals ... === TestName: test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | Status : SUCCESS ===
ok
Create a VPC with two networks with one VM in each network and test nics after destroy ... === TestName: test_01_VPC_nics_after_destroy | Status : SUCCESS ===
ok
Create a VPC with two networks with one VM in each network and test default routes ... === TestName: test_02_VPC_default_routes | Status : SUCCESS ===
ok
Check the password file in the Router VM ... === TestName: test_isolate_network_password_server | Status : SUCCESS ===
ok
Check that the /etc/dhcphosts.txt doesn't contain duplicate IPs ... === TestName: test_router_dhcphosts | Status : SUCCESS ===
ok
Test to create Load balancing rule with source NAT ... === TestName: test_01_create_lb_rule_src_nat | Status : SUCCESS ===
ok
Test to create Load balancing rule with non source NAT ... === TestName: test_02_create_lb_rule_non_nat | Status : SUCCESS ===
ok
Test for assign & removing load balancing rule ... === TestName: test_assign_and_removal_lb | Status : SUCCESS ===
ok
Test to verify access to loadbalancer haproxy admin stats page ... === TestName: test02_internallb_haproxy_stats_on_all_interfaces | Status : SUCCESS ===
ok
Test create, assign, remove of an Internal LB with roundrobin http traffic to 3 vm's ... === TestName: test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | Status : SUCCESS ===
ok
Test SSVM Internals ... === TestName: test_03_ssvm_internals | Status : SUCCESS ===
ok
Test CPVM Internals ... === TestName: test_04_cpvm_internals | Status : SUCCESS ===
ok
Test stop SSVM ... === TestName: test_05_stop_ssvm | Status : SUCCESS ===
ok
Test stop CPVM ... === TestName: test_06_stop_cpvm | Status : SUCCESS ===
ok
Test reboot SSVM ... === TestName: test_07_reboot_ssvm | Status : SUCCESS ===
ok
Test reboot CPVM ... === TestName: test_08_reboot_cpvm | Status : SUCCESS ===
ok
Test destroy SSVM ... === TestName: test_09_destroy_ssvm | Status : SUCCESS ===
ok
Test destroy CPVM ... === TestName: test_10_destroy_cpvm | Status : SUCCESS ===
ok
Test Remote Access VPN in VPC ... === TestName: test_vpc_remote_access_vpn | Status : SUCCESS ===
ok
Test VPN in VPC ... === TestName: test_vpc_site2site_vpn | Status : SUCCESS ===
ok
Test for port forwarding on source NAT ... === TestName: test_01_port_fwd_on_src_nat | Status : SUCCESS ===
ok
Test for port forwarding on non source NAT ... === TestName: test_02_port_fwd_on_non_src_nat | Status : SUCCESS ===
ok
Test for reboot router ... === TestName: test_reboot_router | Status : SUCCESS ===
ok
Test for Router rules for network rules on acquired public IP ... === TestName: test_network_rules_acquired_public_ip_1_static_nat_rule | Status : SUCCESS ===
ok
Test for Router rules for network rules on acquired public IP ... === TestName: test_network_rules_acquired_public_ip_2_nat_rule | Status : SUCCESS ===
ok
Test for Router rules for network rules on acquired public IP ... === TestName: test_network_rules_acquired_public_ip_3_Load_Balancer_Rule | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 33 tests in 16746.083s

OK

And:

nosetests --with-marvin --marvin-config=${marvinCfg} -s -a tags=advanced,required_hardware=false \
smoke/test_routers.py \
smoke/test_network_acl.py \
smoke/test_privategw_acl.py \
smoke/test_reset_vm_on_reboot.py \
smoke/test_vm_life_cycle.py \
smoke/test_vpc_vpn.py \
smoke/test_service_offerings.py \
component/test_vpc_offerings.py \
component/test_vpc_routers.py

Result:

Test router internal advanced zone ... === TestName: test_02_router_internal_adv | Status : SUCCESS ===
ok
Test restart network ... === TestName: test_03_restart_network_cleanup | Status : SUCCESS ===
ok
Test router basic setup ... === TestName: test_05_router_basic | Status : SUCCESS ===
ok
Test router advanced setup ... === TestName: test_06_router_advanced | Status : SUCCESS ===
ok
Test stop router ... === TestName: test_07_stop_router | Status : SUCCESS ===
ok
Test start router ... === TestName: test_08_start_router | Status : SUCCESS ===
ok
Test reboot router ... === TestName: test_09_reboot_router | Status : SUCCESS ===
ok
test_privategw_acl (integration.smoke.test_privategw_acl.TestPrivateGwACL) ... === TestName: test_privategw_acl | Status : SUCCESS ===
ok
Test reset virtual machine on reboot ... === TestName: test_01_reset_vm_on_reboot | Status : SUCCESS ===
ok
Test advanced zone virtual router ... === TestName: test_advZoneVirtualRouter | Status : SUCCESS ===
ok
Test Deploy Virtual Machine ... === TestName: test_deploy_vm | Status : SUCCESS ===
ok
Test Multiple Deploy Virtual Machine ... === TestName: test_deploy_vm_multiple | Status : SUCCESS ===
ok
Test Stop Virtual Machine ... === TestName: test_01_stop_vm | Status : SUCCESS ===
ok
Test Start Virtual Machine ... === TestName: test_02_start_vm | Status : SUCCESS ===
ok
Test Reboot Virtual Machine ... === TestName: test_03_reboot_vm | Status : SUCCESS ===
ok
Test destroy Virtual Machine ... === TestName: test_06_destroy_vm | Status : SUCCESS ===
ok
Test recover Virtual Machine ... === TestName: test_07_restore_vm | Status : SUCCESS ===
ok
Test migrate VM ... === TestName: test_08_migrate_vm | Status : SUCCESS ===
ok
Test destroy(expunge) Virtual Machine ... === TestName: test_09_expunge_vm | Status : SUCCESS ===
ok
Test to create service offering ... === TestName: test_01_create_service_offering | Status : SUCCESS ===
ok
Test to update existing service offering ... === TestName: test_02_edit_service_offering | Status : SUCCESS ===
ok
Test to delete service offering ... === TestName: test_03_delete_service_offering | Status : SUCCESS ===
ok
Test for delete account ... === TestName: test_delete_account | Status : SUCCESS ===
ok
Test for Associate/Disassociate public IP address for admin account ... === TestName: test_public_ip_admin_account | Status : SUCCESS ===
ok
Test for Associate/Disassociate public IP address for user account ... === TestName: test_public_ip_user_account | Status : SUCCESS ===
ok
Test for release public IP address ... === TestName: test_releaseIP | Status : SUCCESS ===
ok
Test create VPC offering ... === TestName: test_01_create_vpc_offering | Status : SUCCESS ===
ok
Test VPC offering without load balancing service ... === TestName: test_03_vpc_off_without_lb | Status : SUCCESS ===
ok
Test VPC offering without static NAT service ... === TestName: test_04_vpc_off_without_static_nat | Status : SUCCESS ===
ok
Test VPC offering without port forwarding service ... === TestName: test_05_vpc_off_without_pf | Status : SUCCESS ===
ok
Test VPC offering with invalid services ... === TestName: test_06_vpc_off_invalid_services | Status : SUCCESS ===
ok
Test update VPC offering ... === TestName: test_07_update_vpc_off | Status : SUCCESS ===
ok
Test list VPC offering ... === TestName: test_08_list_vpc_off | Status : SUCCESS ===
test_09_create_redundant_vpc_offering (integration.component.test_vpc_offerings.TestVPCOffering) ... === TestName: test_09_create_redundant_vpc_offering | Status : SUCCESS ===
ok
Test start/stop of router after addition of one guest network ... === TestName: test_01_start_stop_router_after_addition_of_one_guest_network | Status : SUCCESS ===
ok
Test reboot of router after addition of one guest network ... === TestName: test_02_reboot_router_after_addition_of_one_guest_network | Status : SUCCESS ===
ok
Test to change service offering of router after addition of one guest network ... === TestName: test_04_chg_srv_off_router_after_addition_of_one_guest_network | Status : SUCCESS ===
ok
Test destroy of router after addition of one guest network ... === TestName: test_05_destroy_router_after_addition_of_one_guest_network | Status : SUCCESS ===
ok
Test to stop and start router after creation of VPC ... === TestName: test_01_stop_start_router_after_creating_vpc | Status : SUCCESS ===
ok
Test to reboot the router after creating a VPC ... === TestName: test_02_reboot_router_after_creating_vpc | Status : SUCCESS ===
ok
Tests to change service offering of the Router after ... === TestName: test_04_change_service_offerring_vpc | Status : SUCCESS ===
ok
Test to destroy the router after creating a VPC ... === TestName: test_05_destroy_router_after_creating_vpc | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 42 tests in 8506.950s

OK

I have no VMware setup so I didn't test the actual feature. This just shows it didn't break anything else.

@remibergsma
Copy link
Contributor

@bhaisaab Let's find someone else who can review this..

@rohityadavcloud
Copy link
Member Author

Thanks @remibergsma
Ping @sateesh-chodapuneedi can you review this, and later if you want sent additional PRs with further changes etc.

@sateesh-chodapuneedi
Copy link
Member

@bhaisaab why are we merging the feature branch into a 4.6.* maintenance/minor release branch. Shouldn't it be merged into a major release branch/master?

BTW, this week I am working towards a PR against ACS master, for this feature branch along with tests.

@rohityadavcloud
Copy link
Member Author

@sateesh-chodapuneedi this is a real bug for many users as they are not able to use Windows 2012 templates with vmware/CloudStack, which is why we need the fix in 4.5 for 4.5.3 besides this does not involve any db changes but simply add to a list of supported controller types other than ide or scsi.

@rohityadavcloud
Copy link
Member Author

Ping @abhinandanprateek @borisroman @jburwell @pdion891 and others for review

@DaanHoogland
Copy link
Contributor

code LGTM and @remibergsma his test succeed, as this is in 4.5 I think it must go in 4.6 as well, however it contains way to little tests and can not be guaranteed to continue working. @bhaisaab please consider continued maintenance by automation, i.e. both unit - and integration tests.

merging

@asfgit asfgit merged commit a15187a into apache:4.6 Dec 12, 2015
asfgit pushed a commit that referenced this pull request Dec 12, 2015
[4.6] CLOUDSTACK-4787 - vmware diskcontrollersSame as #1131 (see this for screenshots etc)

* pr/1132:
  CLOUDSTACK-4787: Allow users to select disk controller for VM/template
  CLOUDSTACK-4787 Allow selection of scsi controller type in vSphere

Signed-off-by: Daan Hoogland <[email protected]>
@rohityadavcloud
Copy link
Member Author

@DaanHoogland thanks for merging. This is not yet in 4.5 as I'm yet to merge the 4.5 based PR #1131
Will do that on Monday :)

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.

5 participants