You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by likitha <gi...@git.apache.org> on 2015/07/06 08:32:00 UTC

[GitHub] cloudstack pull request: Cloudstack 8612

GitHub user likitha opened a pull request:

    https://github.com/apache/cloudstack/pull/562

    Cloudstack 8612

    To ensure that setting a high timeout value for snapshot backup operation will not affect vCenter connections made for any other operations besides volume snapshot, split the existing vCenter session timeout configuration into two configurations,
    1. To tune timeout value for CS's session vCenter during snapshot backup operation - 'vmware.snapshot.backup.session.timeout' (new; default: 20 minutes)
    2. For all other operations - 'vmware.vcenter.session.timeout' (existing; default: 20 minutes)
    
    Additional change -
    Users could potentially run into a timeout issue while trying to snapshot large VMs. There is a timeout for async-jobs that ensures that any job that has been in process for too long is cancelled by CSMS. This timeout is configurable using a global configuration ‘job.cancel.threshold.minutes’ and it defaults to 1 hour.
    Now for large volumes even though users configure other snapshot timeout values (‘vmware.snapshot.backup.session.timeout’ and ‘backup.snapshot.wait‘) to a very high value, the snapshot operation will still fail because the job will be cancelled in 1 hour.
    Hence proposing a configuration that will allow admins to separate out the job cancellation timeout for ‘volume snapshot’ jobs from other vm work jobs - 'volume.snapshot.job.cancel.threshold'.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/likitha/cloudstack CLOUDSTACK-8612

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/562.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #562
    
----
commit 1093a9626e1d401ba3501882797c2ea2b0fd54c7
Author: Likitha Shetty <li...@citrix.com>
Date:   2015-04-30T05:05:57Z

    CLOUDSTACK-8612. [VMware] Make vCenter session timeout configurable for volume snapshot.
    Separate out vmware vcenter session timeout config for volume snapshot backup operation.

commit c8c9d81b0c2f08f506e828453efbed7911d9a517
Author: Likitha Shetty <li...@citrix.com>
Date:   2015-05-05T08:29:49Z

    CLOUDSTACK-8612. [VMware] Make vCenter session timeout configurable for volume snapshot.
    Separate out async job timeout for volume snapshot job from other vm work jobs.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Cloudstack 8612

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:

    https://github.com/apache/cloudstack/pull/562#issuecomment-120406704
  
    Can you add unit- and/or integration tests?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Cloudstack 8612

Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the pull request:

    https://github.com/apache/cloudstack/pull/562#issuecomment-216186055
  
    tag:vmware-pickup


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Cloudstack 8612

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/562#discussion_r34352466
  
    --- Diff: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java ---
    @@ -5035,9 +5039,16 @@ public VmwareHypervisorHost getHyperHost(VmwareContext context) {
         @Override
         public VmwareContext getServiceContext(Command cmd) {
             VmwareContext context = null;
    +        int vCenterSessionTimeout;
    +        if (cmd != null && cmd.getContextParam("vCenterSessionTimeout") != null) {
    +            vCenterSessionTimeout = NumbersUtil.parseInt(cmd.getContextParam("vCenterSessionTimeout"), 1200000);
    --- End diff --
    
    why not use _vCenterSessionTimeout here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack issue #562: Cloudstack 8612

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on the issue:

    https://github.com/apache/cloudstack/pull/562
  
    ### ACS CI BVT Run
     **Sumarry:**
     Build Number 136
     Hypervisor xenserver
     NetworkType Advanced
     Passed=73
     Failed=0
     Skipped=3
    
    _Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
    
    
    **Failed tests:**
    
    **Skipped tests:**
    test_vm_nic_adapter_vmxnet3
    test_static_role_account_acls
    test_deploy_vgpu_enabled_vm
    
    **Passed test suits:**
    test_deploy_vm_with_userdata.py
    test_affinity_groups_projects.py
    test_portable_publicip.py
    test_vpc_vpn.py
    test_over_provisioning.py
    test_global_settings.py
    test_scale_vm.py
    test_service_offerings.py
    test_routers_iptables_default_policy.py
    test_routers.py
    test_reset_vm_on_reboot.py
    test_snapshots.py
    test_deploy_vms_with_varied_deploymentplanners.py
    test_login.py
    test_list_ids_parameter.py
    test_public_ip_range.py
    test_multipleips_per_nic.py
    test_regions.py
    test_affinity_groups.py
    test_network_acl.py
    test_pvlan.py
    test_volumes.py
    test_nic.py
    test_deploy_vm_root_resize.py
    test_resource_detail.py
    test_secondary_storage.py
    test_vm_life_cycle.py
    test_disk_offerings.py


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Cloudstack 8612

Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on the pull request:

    https://github.com/apache/cloudstack/pull/562#issuecomment-129227087
  
    Who wants to step in and finish this work? It seems the original author is not able to finish it. If no one steps in, we'll have to close the PR without merging it so please help :-).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Cloudstack 8612

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/562#discussion_r34351953
  
    --- Diff: framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/SyncQueueItemDaoImpl.java ---
    @@ -141,23 +141,46 @@ public int getActiveQueueItemCount(long queueId) {
         }
     
         @Override
    -    public List<SyncQueueItemVO> getBlockedQueueItems(long thresholdMs, boolean exclusive) {
    +    public List<SyncQueueItemVO> getBlockedQueueItems(long thresholdMs, long snapshotThresholdMs, String jobCmd, boolean exclusive) {
             Date cutTime = DateUtil.currentGMTTime();
    +        List<SyncQueueItemVO> l = new ArrayList<SyncQueueItemVO>();
     
    -        SearchBuilder<SyncQueueItemVO> sbItem = createSearchBuilder();
    -        sbItem.and("lastProcessMsid", sbItem.entity().getLastProcessMsid(), SearchCriteria.Op.NNULL);
    -        sbItem.and("lastProcessNumber", sbItem.entity().getLastProcessNumber(), SearchCriteria.Op.NNULL);
    -        sbItem.and("lastProcessTime", sbItem.entity().getLastProcessTime(), SearchCriteria.Op.NNULL);
    -        sbItem.and("lastProcessTime2", sbItem.entity().getLastProcessTime(), SearchCriteria.Op.LT);
    -
    -        sbItem.done();
    +        Date date1 = new Date(cutTime.getTime() - thresholdMs);
    +        String  dateString1 = DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), date1);
     
    -        SearchCriteria<SyncQueueItemVO> sc = sbItem.create();
    -        sc.setParameters("lastProcessTime2", new Date(cutTime.getTime() - thresholdMs));
    +        Date date2 = new Date(cutTime.getTime() - snapshotThresholdMs);
    +        String  dateString2 = DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), date2);
     
    -        if(exclusive)
    -            return lockRows(sc, null, true);
    -        return listBy(sc, null);
    +        String sql = "SELECT s.id, s.queue_id, s.content_type, s.content_id, s.queue_proc_msid, s.queue_proc_number, s.queue_proc_time, s.created FROM sync_queue_item AS s " +
    +                "JOIN async_job as a ON s.content_id = a.id WHERE s.queue_proc_msid IS NOT NULL AND s.queue_proc_number IS NOT NULL AND s.queue_proc_time IS NOT NULL" +
    +                " AND ((a.job_cmd NOT LIKE ? AND s.queue_proc_time < ? ) OR (a.job_cmd LIKE ? AND s.queue_proc_time < ?))";
    +        TransactionLegacy txn = TransactionLegacy.currentTxn();
    +        PreparedStatement pstmt = null;
    +        try {
    +            pstmt = txn.prepareAutoCloseStatement(sql);
    +            pstmt.setString(1, "%" + jobCmd + "%");
    +            pstmt.setString(2, dateString1);
    +            pstmt.setString(3, "%" + jobCmd + "%");
    +            pstmt.setString(4, dateString2);
    +            ResultSet rs = pstmt.executeQuery();
    --- End diff --
    
    please use try-with-resource


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: Cloudstack 8612

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/562#discussion_r34351937
  
    --- Diff: framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/SyncQueueItemDaoImpl.java ---
    @@ -141,23 +141,46 @@ public int getActiveQueueItemCount(long queueId) {
         }
     
         @Override
    -    public List<SyncQueueItemVO> getBlockedQueueItems(long thresholdMs, boolean exclusive) {
    +    public List<SyncQueueItemVO> getBlockedQueueItems(long thresholdMs, long snapshotThresholdMs, String jobCmd, boolean exclusive) {
             Date cutTime = DateUtil.currentGMTTime();
    +        List<SyncQueueItemVO> l = new ArrayList<SyncQueueItemVO>();
     
    -        SearchBuilder<SyncQueueItemVO> sbItem = createSearchBuilder();
    -        sbItem.and("lastProcessMsid", sbItem.entity().getLastProcessMsid(), SearchCriteria.Op.NNULL);
    -        sbItem.and("lastProcessNumber", sbItem.entity().getLastProcessNumber(), SearchCriteria.Op.NNULL);
    -        sbItem.and("lastProcessTime", sbItem.entity().getLastProcessTime(), SearchCriteria.Op.NNULL);
    -        sbItem.and("lastProcessTime2", sbItem.entity().getLastProcessTime(), SearchCriteria.Op.LT);
    -
    -        sbItem.done();
    +        Date date1 = new Date(cutTime.getTime() - thresholdMs);
    +        String  dateString1 = DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), date1);
     
    -        SearchCriteria<SyncQueueItemVO> sc = sbItem.create();
    -        sc.setParameters("lastProcessTime2", new Date(cutTime.getTime() - thresholdMs));
    +        Date date2 = new Date(cutTime.getTime() - snapshotThresholdMs);
    +        String  dateString2 = DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), date2);
     
    -        if(exclusive)
    -            return lockRows(sc, null, true);
    -        return listBy(sc, null);
    +        String sql = "SELECT s.id, s.queue_id, s.content_type, s.content_id, s.queue_proc_msid, s.queue_proc_number, s.queue_proc_time, s.created FROM sync_queue_item AS s " +
    +                "JOIN async_job as a ON s.content_id = a.id WHERE s.queue_proc_msid IS NOT NULL AND s.queue_proc_number IS NOT NULL AND s.queue_proc_time IS NOT NULL" +
    +                " AND ((a.job_cmd NOT LIKE ? AND s.queue_proc_time < ? ) OR (a.job_cmd LIKE ? AND s.queue_proc_time < ?))";
    +        TransactionLegacy txn = TransactionLegacy.currentTxn();
    +        PreparedStatement pstmt = null;
    +        try {
    +            pstmt = txn.prepareAutoCloseStatement(sql);
    --- End diff --
    
    please use try-with-resource


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---