[GitHub] rhtyd commented on a change in pull request #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds
rhtyd commented on a change in pull request #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds URL: https://github.com/apache/cloudstack/pull/2244#discussion_r158674795 ## File path: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java ## @@ -98,28 +98,31 @@ @Override public boolean execute(VmwareHostService hostService, CreateEntityDownloadURLCommand cmd) { DataTO data = cmd.getData(); +int timeout = NumbersUtil.parseInt(cmd.getContextParam(VmwareManager.s_vmwareOVAPackageTimeout.key()), VmwareManagerImpl.DEFAULT_VM_OVA_PACKAGE_TIMEOUT); Review comment: @mrunalinikankariya you can get a `default()` from a ConfigKey, just like you did with the `key()`. This won't read the value from the db. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on a change in pull request #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds
rhtyd commented on a change in pull request #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds URL: https://github.com/apache/cloudstack/pull/2244#discussion_r158674795 ## File path: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java ## @@ -98,28 +98,31 @@ @Override public boolean execute(VmwareHostService hostService, CreateEntityDownloadURLCommand cmd) { DataTO data = cmd.getData(); +int timeout = NumbersUtil.parseInt(cmd.getContextParam(VmwareManager.s_vmwareOVAPackageTimeout.key()), VmwareManagerImpl.DEFAULT_VM_OVA_PACKAGE_TIMEOUT); Review comment: @mrunalinikankariya you can get a `default()` from a ConfigKey. This won't read the value from the db. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on a change in pull request #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds
rhtyd commented on a change in pull request #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds URL: https://github.com/apache/cloudstack/pull/2244#discussion_r158674726 ## File path: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java ## @@ -42,6 +44,9 @@ static final ConfigKey s_vmwareSearchExcludeFolder = new ConfigKey("Advanced", String.class, "vmware.search.exclude.folders", null, "Comma seperated list of Datastore Folders to exclude from VMWare search", true, ConfigKey.Scope.Global); +static final ConfigKey s_vmwareOVAPackageTimeout = new ConfigKey(Integer.class, "vmware.package.ova.timeout", "Advanced",String.valueOf(VM_OVA_PACKAGE_TIMEOUT_SEC), Review comment: @mrunalinikankariya see ` "Advanced",String.valueOf` would look better as ` "Advanced", String.valueOf` this is what I meant by fixing the space. The constant are default values for the ConfigKey, and not used anywhere else. ConfigKey defaul values are themselves treated as well `defaults`. 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on a change in pull request #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds
rhtyd commented on a change in pull request #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds URL: https://github.com/apache/cloudstack/pull/2244#discussion_r153505547 ## File path: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java ## @@ -98,28 +98,31 @@ @Override public boolean execute(VmwareHostService hostService, CreateEntityDownloadURLCommand cmd) { DataTO data = cmd.getData(); +int timeout = NumbersUtil.parseInt(cmd.getContextParam(VmwareManager.s_vmwareOVAPackageTimeout.key()), VmwareManagerImpl.DEFAULT_VM_OVA_PACKAGE_TIMEOUT); Review comment: Instead of `DEFAULT_VM_OVA_PACKAGE_TIMEOUT` use the value dynamically by calling a method or reading the current value, using the ConfigKey (i.e. multiply them). This will enable admins to change value and enforce new settings without restarting the mgmt server(s). 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on a change in pull request #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds
rhtyd commented on a change in pull request #2244: CLOUDSTACK-10054:Volume download times out in 3600 seconds URL: https://github.com/apache/cloudstack/pull/2244#discussion_r153505188 ## File path: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManager.java ## @@ -42,6 +44,9 @@ static final ConfigKey s_vmwareSearchExcludeFolder = new ConfigKey("Advanced", String.class, "vmware.search.exclude.folders", null, "Comma seperated list of Datastore Folders to exclude from VMWare search", true, ConfigKey.Scope.Global); +static final ConfigKey s_vmwareOVAPackageTimeout = new ConfigKey(Integer.class, "vmware.package.ova.timeout", "Advanced",String.valueOf(VM_OVA_PACKAGE_TIMEOUT_SEC), Review comment: Fix a space after `,`. Remove the `VM_OVA_PACKAGE_TIMEOUT_SEC` and `SEC_TO_MILLIS_MULTIPLIER`. 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: us...@infra.apache.org With regards, Apache Git Services