[GitHub] nitin-maharana commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
nitin-maharana commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#discussion_r181297798 ## File path: ui/scripts/network.js ## @@ -1100,11 +1100,23 @@ }); args.$form.find('.form-item[rel=cleanup]').find('input').attr('checked', 'checked'); //checked args.$form.find('.form-item[rel=cleanup]').css('display', 'inline-block'); //shown + args.$form.find('.form-item[rel=makeredundant]').find('input').attr('checked', 'checked'); //checked + args.$form.find('.form-item[rel=makeredundant]').css('display', 'inline-block'); //shown + +if (Boolean(args.context.networks[0].redundantrouter)) { Review comment: @rhtyd, When we say redundant networks, that means it already contains the new upgraded VR(after Blue-Green deployment), we created after a restart? If that is the case, I think it would be great, if we give a different name instead of redundant. Because there is a chance we will misinterpret as RVR. 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] blueorangutan commented on issue #2563: CLOUDSTACK-10304: turn off apache2 server tokens and signature in systemvms
blueorangutan commented on issue #2563: CLOUDSTACK-10304: turn off apache2 server tokens and signature in systemvms URL: https://github.com/apache/cloudstack/pull/2563#issuecomment-380978801 Trillian test result (tid-2496) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 91764 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2563-t2496-kvm-centos7.zip Intermitten failure detected: /marvin/tests/smoke/test_routers.py Smoke tests completed. 66 look OK, 1 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_04_restart_network_wo_cleanup | `Failure` | 3.98 | test_routers.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: us...@infra.apache.org With regards, Apache Git Services
[cloudstack-cloudmonkey] branch master updated: cli: implement auto-completion for apis
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git The following commit(s) were added to refs/heads/master by this push: new ff373cd cli: implement auto-completion for apis ff373cd is described below commit ff373cd11187234c77f2ff2bfc68de2d82828433 Author: Rohit Yadav AuthorDate: Fri Apr 13 04:43:09 2018 +0530 cli: implement auto-completion for apis Signed-off-by: Rohit Yadav --- .gitignore | 2 +- Makefile | 2 +- cli/completer.go | 218 +++ cli/selector.go | 47 cmd/api.go | 29 cmd/network.go | 4 +- config/cache.go | 69 ++ config/config.go | 43 +++ config/util.go | 67 - 9 files changed, 316 insertions(+), 165 deletions(-) diff --git a/.gitignore b/.gitignore index 0cbfde4..67cb950 100644 --- a/.gitignore +++ b/.gitignore @@ -21,5 +21,5 @@ dist *.exe *.test *.out -.gopath~ +.gopath .idea diff --git a/Makefile b/Makefile index 41184d9..d32b6be 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ PACKAGE = cloudmonkey DATE?= $(shell date +%FT%T%z) VERSION ?= $(shell git describe --tags --always --dirty --match=v* 2> /dev/null || \ cat $(CURDIR)/.version 2> /dev/null || echo v0) -GOPATH = $(CURDIR)/.gopath~ +GOPATH = $(CURDIR)/.gopath BIN = $(GOPATH)/bin BASE = $(GOPATH)/src/$(PACKAGE) PKGS = $(or $(PKG),$(shell cd $(BASE) && env GOPATH=$(GOPATH) $(GO) list ./... | grep -v "^$(PACKAGE)/vendor/")) diff --git a/cli/completer.go b/cli/completer.go index ba45391..1a4c0a2 100644 --- a/cli/completer.go +++ b/cli/completer.go @@ -35,7 +35,29 @@ type CliCompleter struct { var completer *CliCompleter -func TrimSpaceLeft(in []rune) []rune { +func buildApiCacheMap(apiMap map[string][]*config.Api) map[string][]*config.Api { + for _, cmd := range cmd.AllCommands() { + verb := cmd.Name + if cmd.SubCommands != nil && len(cmd.SubCommands) > 0 { + for _, scmd := range cmd.SubCommands { + dummyApi := &config.Api{ + Name: scmd, + Verb: verb, + } + apiMap[verb] = append(apiMap[verb], dummyApi) + } + } else { + dummyApi := &config.Api{ + Name: "", + Verb: verb, + } + apiMap[verb] = append(apiMap[verb], dummyApi) + } + } + return apiMap +} + +func trimSpaceLeft(in []rune) []rune { firstIndex := len(in) for i, r := range in { if unicode.IsSpace(r) == false { @@ -65,36 +87,9 @@ func doInternal(line []rune, pos int, lineLen int, argName []rune) (newLine [][] return } -func (t *CliCompleter) Do(line []rune, pos int) (newLine [][]rune, offset int) { - - line = TrimSpaceLeft(line[:pos]) - lineLen := len(line) +func (t *CliCompleter) Do(line []rune, pos int) (options [][]rune, offset int) { - apiCache := t.Config.GetCache() - apiMap := make(map[string][]*config.Api) - for api := range apiCache { - verb := apiCache[api].Verb - apiMap[verb] = append(apiMap[verb], apiCache[api]) - } - - for _, cmd := range cmd.AllCommands() { - verb := cmd.Name - if cmd.SubCommands != nil && len(cmd.SubCommands) > 0 { - for _, scmd := range cmd.SubCommands { - dummyApi := &config.Api{ - Name: scmd, - Verb: verb, - } - apiMap[verb] = append(apiMap[verb], dummyApi) - } - } else { - dummyApi := &config.Api{ - Name: "", - Verb: verb, - } - apiMap[verb] = append(apiMap[verb], dummyApi) - } - } + apiMap := buildApiCacheMap(t.Config.GetApiVerbMap()) var verbs []string for verb := range apiMap { @@ -105,56 +100,155 @@ func (t *CliCompleter) Do(line []rune, pos int) (newLine [][]rune, offset int) { } sort.Strings(verbs) - var verbsFound []string + line = trimSpaceLeft(line[:pos]) + + // Auto-complete verb + var verbFound string for _, verb := range verbs { search := verb + " " if !runes.HasPrefix(line, []rune(search)) { - sLine, sOffset := doInternal(line,
[GitHub] rafaelweingartner commented on issue #2514: [CLOUDSTACK-10346] Problem with NAT configuration and VMs not accessing each other via public IPs
rafaelweingartner commented on issue #2514: [CLOUDSTACK-10346] Problem with NAT configuration and VMs not accessing each other via public IPs URL: https://github.com/apache/cloudstack/pull/2514#issuecomment-380965556 @ustcweizhou, @rhtyd and others. Are you ok with changes introduce in 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2562: consoleproxy: use consoleproxy.domain for non-ssl enable env
blueorangutan commented on issue #2562: consoleproxy: use consoleproxy.domain for non-ssl enable env URL: https://github.com/apache/cloudstack/pull/2562#issuecomment-380956576 Trillian test result (tid-2495) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 9 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2562-t2495-kvm-centos7.zip Intermitten failure detected: /marvin/tests/smoke/test_routers.py Intermitten failure detected: /marvin/tests/smoke/test_templates.py Smoke tests completed. 66 look OK, 1 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_04_restart_network_wo_cleanup | `Failure` | 2.96 | test_routers.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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2568: Log command output in CsHelper.execute command
blueorangutan commented on issue #2568: Log command output in CsHelper.execute command URL: https://github.com/apache/cloudstack/pull/2568#issuecomment-380954989 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1914 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] blueorangutan commented on issue #2568: Log command output in CsHelper.execute command
blueorangutan commented on issue #2568: Log command output in CsHelper.execute command URL: https://github.com/apache/cloudstack/pull/2568#issuecomment-380948721 @rafaelweingartner 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rafaelweingartner opened a new pull request #2568: Log command output in CsHelper.execute command
rafaelweingartner opened a new pull request #2568: Log command output in CsHelper.execute command URL: https://github.com/apache/cloudstack/pull/2568 ## Description While debugging some problems in our VRs, we noticed that the result of commands (e.g. iptables) was not being logged. It is interesting to log these information (at least in debug level) to facilitate troubleshooting. This PR enable `CsHelper.execute` to log the result of commands being executed in DEBUG level. ## 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) - [X] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) ## How Has This Been Tested? Locally ## Checklist: - [ ] I have read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document. - [X] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. Testing - [ ] I have added tests to cover my changes. - [X] All relevant new and existing integration tests have passed. - [ ] A full integration testsuite with all test that can run on my environment has passed. @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mike-tutkowski commented on issue #2499: Updates to capacity management
mike-tutkowski commented on issue #2499: Updates to capacity management URL: https://github.com/apache/cloudstack/pull/2499#issuecomment-380929090 I looked at several of the error messages for a recent test run of #2486 and it seems the list is quite similar to the list of error messages for this PR. As such, I suggest it is likely that none of the errors that are listed for this test run are related to 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mike-tutkowski commented on issue #2499: Updates to capacity management
mike-tutkowski commented on issue #2499: Updates to capacity management URL: https://github.com/apache/cloudstack/pull/2499#issuecomment-380926801 The test environment is having an issue when we try to put an NFS-based primary storage in maintenance mode. In test_primary_storage.py, the first error is related to that and then we later see other errors where adding a new primary storage with the same name fails because it's already in use (presumably we were originally going to delete the primary storage after putting it in maintenance mode, but putting it in maintenance mode failed). Is this error scenario unique to this PR? It seems like the code in this PR wouldn't be responsible for such a situation. On the up side, both Jenkins and Travis passed. **test_primary_storage.py:** errorText:Primary storage with id 5 cannot be disabled. Storage pool state : Maintenance\n' errorText:Failed to add data store: Storage pool nfs://10.2.0.16/acs/primary/pr2499-t2490-kvm-centos7/marvin_pri1 already in use by another pod (id=1)\n' **(two of these errors)** **test_routers.py:** 'AssertionError: Check uptime is less than 3 mins or not\n' **test_snapshots.py:** errorText:Failed to add data store: Storage pool nfs://10.2.0.16/acs/primary/pr2499-t2490-kvm-centos7/nfs2 already in use by another pod (id=1)\n' **test_vm_life_cycle.py:** errortext : u'Cannot migrate VM, destination host is not in correct state, has status: Up, state: Disabled' 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] blueorangutan commented on issue #2376: [4.11] Smoketest Health Check
blueorangutan commented on issue #2376: [4.11] Smoketest Health Check URL: https://github.com/apache/cloudstack/pull/2376#issuecomment-380923008 Trillian test result (tid-2491) Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 6 Total time taken: 122166 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2376-t2491-xenserver-71.zip Intermitten failure detected: /marvin/tests/smoke/test_network.py Intermitten failure detected: /marvin/tests/smoke/test_projects.py Intermitten failure detected: /marvin/tests/smoke/test_public_ip_range.py Intermitten failure detected: /marvin/tests/smoke/test_routers.py Intermitten failure detected: /marvin/tests/smoke/test_scale_vm.py Intermitten failure detected: /marvin/tests/smoke/test_service_offerings.py Intermitten failure detected: /marvin/tests/smoke/test_ssvm.py Intermitten failure detected: /marvin/tests/smoke/test_templates.py Intermitten failure detected: /marvin/tests/smoke/test_usage.py Intermitten failure detected: /marvin/tests/smoke/test_volumes.py Smoke tests completed. 58 look OK, 9 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_reboot_router | `Error` | 2420.57 | test_network.py test_10_project_activation | `Error` | 2706.41 | test_projects.py test_04_restart_network_wo_cleanup | `Failure` | 3.61 | test_routers.py test_08_start_router | `Error` | 1336.65 | test_routers.py test_09_reboot_router | `Error` | 1.10 | test_routers.py test_01_scale_vm | `Error` | 12.36 | test_scale_vm.py ContextSuite context=TestCpuCapServiceOfferings>:teardown | `Error` | 0.00 | test_service_offerings.py test_05_stop_ssvm | `Failure` | 912.33 | test_ssvm.py test_06_stop_cpvm | `Failure` | 912.50 | test_ssvm.py test_08_reboot_cpvm | `Failure` | 0.03 | test_ssvm.py test_04_extract_template | `Failure` | 128.28 | test_templates.py ContextSuite context=TestISOUsage>:setup | `Error` | 0.00 | test_usage.py test_06_download_detached_volume | `Failure` | 139.68 | test_volumes.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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2567: [Vmware] Fix for OVF parsing error
blueorangutan commented on issue #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567#issuecomment-380904760 @nvazquez 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] nvazquez commented on issue #2567: [Vmware] Fix for OVF parsing error
nvazquez commented on issue #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567#issuecomment-380904591 @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2376: [4.11] Smoketest Health Check
blueorangutan commented on issue #2376: [4.11] Smoketest Health Check URL: https://github.com/apache/cloudstack/pull/2376#issuecomment-380903625 Trillian test result (tid-2492) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 117781 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2376-t2492-kvm-centos7.zip Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py Intermitten failure detected: /marvin/tests/smoke/test_public_ip_range.py Intermitten failure detected: /marvin/tests/smoke/test_routers.py Intermitten failure detected: /marvin/tests/smoke/test_templates.py Intermitten failure detected: /marvin/tests/smoke/test_usage.py Intermitten failure detected: /marvin/tests/smoke/test_volumes.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py Smoke tests completed. 61 look OK, 6 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_02_vpc_privategw_static_routes | `Failure` | 173.48 | test_privategw_acl.py test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 169.43 | test_privategw_acl.py test_04_restart_network_wo_cleanup | `Failure` | 3.05 | test_routers.py test_04_extract_template | `Failure` | 128.31 | test_templates.py ContextSuite context=TestISOUsage>:setup | `Error` | 0.00 | test_usage.py test_06_download_detached_volume | `Failure` | 138.67 | test_volumes.py test_hostha_enable_ha_when_host_in_maintenance | `Error` | 4.59 | test_hostha_kvm.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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2567: [Vmware] Fix for OVF parsing error
blueorangutan commented on issue #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567#issuecomment-380897654 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1913 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] blueorangutan commented on issue #2567: [Vmware] Fix for OVF parsing error
blueorangutan commented on issue #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567#issuecomment-380890003 @nvazquez 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] nvazquez commented on issue #2567: [Vmware] Fix for OVF parsing error
nvazquez commented on issue #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567#issuecomment-380889663 @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2567: [Vmware] Fix for OVF parsing error
blueorangutan commented on issue #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567#issuecomment-380889398 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1912 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] nvazquez commented on a change in pull request #2567: [Vmware] Fix for OVF parsing error
nvazquez commented on a change in pull request #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567#discussion_r181166520 ## File path: api/src/com/cloud/agent/api/storage/OVFHelper.java ## @@ -113,7 +113,7 @@ public static Long getDiskVirtualSize(Long capacity, String allocationUnits, Str String allocationUnits = disk.getAttribute("ovf:capacityAllocationUnits"); od._diskId = disk.getAttribute("ovf:diskId"); od._fileRef = disk.getAttribute("ovf:fileRef"); -od._populatedSize = Long.parseLong(disk.getAttribute("ovf:populatedSize") == null ? "0" : disk.getAttribute("ovf:populatedSize")); +od._populatedSize = Long.parseLong(StringUtils.isBlank(disk.getAttribute("ovf:populatedSize")) ? "0" : disk.getAttribute("ovf:populatedSize")); Review comment: Excellent, thanks @rafaelweingartner 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 #2566: ConfigDrive fixes: CLOUDSTACK-10288, CLOUDSTACK-10289
rhtyd commented on a change in pull request #2566: ConfigDrive fixes: CLOUDSTACK-10288, CLOUDSTACK-10289 URL: https://github.com/apache/cloudstack/pull/2566#discussion_r181163582 ## File path: services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java ## @@ -480,7 +480,7 @@ public Answer createConfigDriveIsoForVM(HandleConfigDriveIsoCommand cmd) { for (String[] item : cmd.getVmData()) { String dataType = item[CONFIGDATA_DIR]; String fileName = item[CONFIGDATA_FILE]; -String content = item[CONFIGDATA_CONTENT]; +String content = item[CONFIGDATA_CONTENT]; // base64 Review comment: you can rename the variable to `base64Content` 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
[cloudstack] branch master updated: [CLOUDSTACK-10214] Unable to remove local primary storage (#2390)
This is an automated email from the ASF dual-hosted git repository. rafael pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new eba2e1d [CLOUDSTACK-10214] Unable to remove local primary storage (#2390) eba2e1d is described below commit eba2e1d8a1ce4e86b4df144db03e96739da455e5 Author: Rafael Weingärtner AuthorDate: Thu Apr 12 14:34:43 2018 -0300 [CLOUDSTACK-10214] Unable to remove local primary storage (#2390) --- api/src/main/java/com/cloud/storage/StorageService.java | 15 --- .../main/java/com/cloud/storage/StorageManagerImpl.java | 12 +--- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/api/src/main/java/com/cloud/storage/StorageService.java b/api/src/main/java/com/cloud/storage/StorageService.java index e40b1e6..aebbbcd 100644 --- a/api/src/main/java/com/cloud/storage/StorageService.java +++ b/api/src/main/java/com/cloud/storage/StorageService.java @@ -90,23 +90,16 @@ public interface StorageService { boolean deleteSecondaryStagingStore(DeleteSecondaryStagingStoreCmd cmd); -ImageStore discoverImageStore(String name, String url, String providerName, Long zoneId, Map details) throws IllegalArgumentException, DiscoveryException, -InvalidParameterValueException; +ImageStore discoverImageStore(String name, String url, String providerName, Long zoneId, Map details) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException; - -/** +/** * Migrate existing NFS to use object store. * @param name object store name. - * @param url object store url. + * @param url object store URL. * @param providerName object store provider Name. * @param details object store other details * @return Object store created. - * @throws IllegalArgumentException - * @throws DiscoveryException - * @throws InvalidParameterValueException */ -ImageStore migrateToObjectStore(String name, String url, String providerName, Map details) throws IllegalArgumentException, DiscoveryException, -InvalidParameterValueException; - +ImageStore migrateToObjectStore(String name, String url, String providerName, Map details) throws DiscoveryException; } diff --git a/server/src/main/java/com/cloud/storage/StorageManagerImpl.java b/server/src/main/java/com/cloud/storage/StorageManagerImpl.java index a179f8d..749450c 100644 --- a/server/src/main/java/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/main/java/com/cloud/storage/StorageManagerImpl.java @@ -344,7 +344,6 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C return false; } } - // ok to share return true; } @@ -891,11 +890,6 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C s_logger.warn("Unable to delete storage id: " + id + " due to it is not in Maintenance state"); throw new InvalidParameterValueException("Unable to delete storage due to it is not in Maintenance state, id: " + id); } -if (sPool.isLocal()) { -s_logger.warn("Unable to delete local storage id:" + id); -throw new InvalidParameterValueException("Unable to delete local storage id: " + id); -} - Pair vlms = _volsDao.getCountAndTotalByPool(id); if (forced) { if (vlms.first() > 0) { @@ -1126,7 +1120,6 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C s_logger.debug("Failed to delete snapshot: " + ssSnapshotVO.getId() + " from storage"); } } - cleanupSecondaryStorage(recurring); List vols = _volsDao.listVolumesToBeDestroyed(new Date(System.currentTimeMillis() - ((long)StorageCleanupDelay.value() << 10))); @@ -1931,19 +1924,16 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C @Override public Answer sendToPool(long poolId, Command cmd) throws StorageUnavailableException { -// TODO Auto-generated method stub return null; } @Override public Answer[] sendToPool(long poolId, Commands cmd) throws StorageUnavailableException { -// TODO Auto-generated method stub return null; } @Override public String getName() { -// TODO Auto-generated method stub return null; } @@ -2044,7 +2034,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C } @Override -public ImageStore migrateToObjectStore(String name, String url, String providerName, Map details) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException { +pub
[GitHub] rafaelweingartner closed pull request #2390: [CLOUDSTACK-10214] Unable to remove local primary storage
rafaelweingartner closed pull request #2390: [CLOUDSTACK-10214] Unable to remove local primary storage URL: https://github.com/apache/cloudstack/pull/2390 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/api/src/main/java/com/cloud/storage/StorageService.java b/api/src/main/java/com/cloud/storage/StorageService.java index e40b1e6e14c..aebbbcd4bd0 100644 --- a/api/src/main/java/com/cloud/storage/StorageService.java +++ b/api/src/main/java/com/cloud/storage/StorageService.java @@ -90,23 +90,16 @@ boolean deleteSecondaryStagingStore(DeleteSecondaryStagingStoreCmd cmd); -ImageStore discoverImageStore(String name, String url, String providerName, Long zoneId, Map details) throws IllegalArgumentException, DiscoveryException, -InvalidParameterValueException; +ImageStore discoverImageStore(String name, String url, String providerName, Long zoneId, Map details) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException; - -/** +/** * Migrate existing NFS to use object store. * @param name object store name. - * @param url object store url. + * @param url object store URL. * @param providerName object store provider Name. * @param details object store other details * @return Object store created. - * @throws IllegalArgumentException - * @throws DiscoveryException - * @throws InvalidParameterValueException */ -ImageStore migrateToObjectStore(String name, String url, String providerName, Map details) throws IllegalArgumentException, DiscoveryException, -InvalidParameterValueException; - +ImageStore migrateToObjectStore(String name, String url, String providerName, Map details) throws DiscoveryException; } diff --git a/server/src/main/java/com/cloud/storage/StorageManagerImpl.java b/server/src/main/java/com/cloud/storage/StorageManagerImpl.java index a179f8d65c9..749450c135f 100644 --- a/server/src/main/java/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/main/java/com/cloud/storage/StorageManagerImpl.java @@ -344,7 +344,6 @@ public boolean share(VMInstanceVO vm, List vols, HostVO host, boolean return false; } } - // ok to share return true; } @@ -891,11 +890,6 @@ public boolean deletePool(DeletePoolCmd cmd) { s_logger.warn("Unable to delete storage id: " + id + " due to it is not in Maintenance state"); throw new InvalidParameterValueException("Unable to delete storage due to it is not in Maintenance state, id: " + id); } -if (sPool.isLocal()) { -s_logger.warn("Unable to delete local storage id:" + id); -throw new InvalidParameterValueException("Unable to delete local storage id: " + id); -} - Pair vlms = _volsDao.getCountAndTotalByPool(id); if (forced) { if (vlms.first() > 0) { @@ -1126,7 +1120,6 @@ public void cleanupStorage(boolean recurring) { s_logger.debug("Failed to delete snapshot: " + ssSnapshotVO.getId() + " from storage"); } } - cleanupSecondaryStorage(recurring); List vols = _volsDao.listVolumesToBeDestroyed(new Date(System.currentTimeMillis() - ((long)StorageCleanupDelay.value() << 10))); @@ -1931,19 +1924,16 @@ public synchronized boolean registerHostListener(String providerName, Hypervisor @Override public Answer sendToPool(long poolId, Command cmd) throws StorageUnavailableException { -// TODO Auto-generated method stub return null; } @Override public Answer[] sendToPool(long poolId, Commands cmd) throws StorageUnavailableException { -// TODO Auto-generated method stub return null; } @Override public String getName() { -// TODO Auto-generated method stub return null; } @@ -2044,7 +2034,7 @@ public ImageStore discoverImageStore(String name, String url, String providerNam } @Override -public ImageStore migrateToObjectStore(String name, String url, String providerName, Map details) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException { +public ImageStore migrateToObjectStore(String name, String url, String providerName, Map details) throws DiscoveryException, InvalidParameterValueException { // check if current cloud is ready to migrate, we only support cloud with only NFS secondary storages List imgStores = _imageStoreDao.listImageStores(); List nfsStores = new ArrayList(); --
[GitHub] rafaelweingartner commented on a change in pull request #2567: [Vmware] Fix for OVF parsing error
rafaelweingartner commented on a change in pull request #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567#discussion_r181162268 ## File path: api/src/com/cloud/agent/api/storage/OVFHelper.java ## @@ -113,7 +113,7 @@ public static Long getDiskVirtualSize(Long capacity, String allocationUnits, Str String allocationUnits = disk.getAttribute("ovf:capacityAllocationUnits"); od._diskId = disk.getAttribute("ovf:diskId"); od._fileRef = disk.getAttribute("ovf:fileRef"); -od._populatedSize = Long.parseLong(disk.getAttribute("ovf:populatedSize") == null ? "0" : disk.getAttribute("ovf:populatedSize")); +od._populatedSize = Long.parseLong(StringUtils.isBlank(disk.getAttribute("ovf:populatedSize")) ? "0" : disk.getAttribute("ovf:populatedSize")); Review comment: Why not use `org.apache.commons.lang3.math.NumberUtils.toLong(String)` instead? Then, you do not even need this inline IF 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] blueorangutan commented on issue #2567: [Vmware] Fix for OVF parsing error
blueorangutan commented on issue #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567#issuecomment-380881577 @nvazquez 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] nvazquez opened a new pull request #2567: [Vmware] Fix for OVF parsing error
nvazquez opened a new pull request #2567: [Vmware] Fix for OVF parsing error URL: https://github.com/apache/cloudstack/pull/2567 ## Description OVF files contained on OVA template files, with missing 'ovf:populatedSize' attribute fail the post download installation. After template is downloaded, installation fails with error: 2018-04-12 13:36:47,959 INFO [storage.template.OVAProcessor] (pool-1-thread-6:null) The ovf file /mnt/SecStorage/3544cb8f-d19d-3ebb-b8f2-bdc7ee4b7a4c/template/tmpl/2/206/3283498e6608-10f2-34c0-9ad4-808f f593bea9.ovf is invalid java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:601) at java.lang.Long.parseLong(Long.java:631) at com.cloud.agent.api.storage.OVFHelper.getOVFVolumeInfo(OVFHelper.java:116) at com.cloud.storage.template.OVAProcessor.process(OVAProcessor.java:105) at org.apache.cloudstack.storage.template.DownloadManagerImpl.postLocalDownload(DownloadManagerImpl.java:462) at org.apache.cloudstack.storage.template.DownloadManagerImpl.setDownloadStatus(DownloadManagerImpl.java:302) at org.apache.cloudstack.storage.template.DownloadManagerImpl$Completion.downloadComplete(DownloadManagerImpl.java:105) at com.cloud.storage.template.HttpTemplateDownloader.download(HttpTemplateDownloader.java:228) at com.cloud.storage.template.HttpTemplateDownloader.runInContext(HttpTemplateDownloader.java:426) at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49) at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56) at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103) at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53) at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) 2018-04-12 13:36:47,962 ERROR [storage.template.DownloadManagerImpl] (pool-1-thread-6:null) Template process exception com.cloud.exception.InternalErrorException: OVA package has bad ovf file For input string: "" ## Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] 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? Tested on Vmware environment registering a Windows 2012 OVA template. OVF file didn't include the 'ovf:populatedSize' attribute ## Checklist: - [x] I have read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document. - [x] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. Testing - [ ] I have added tests to cover my changes. - [ ] All relevant new and existing integration tests have passed. - [ ] A full integration testsuite with all test that can run on my environment has passed. @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2505: CLOUDSTACK-10333: Secure Live VM Migration for KVM
blueorangutan commented on issue #2505: CLOUDSTACK-10333: Secure Live VM Migration for KVM URL: https://github.com/apache/cloudstack/pull/2505#issuecomment-380870819 Trillian test result (tid-2494) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 101305 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2505-t2494-kvm-centos7.zip Intermitten failure detected: /marvin/tests/smoke/test_routers.py Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py Smoke tests completed. 63 look OK, 4 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_04_restart_network_wo_cleanup | `Failure` | 3.99 | test_routers.py test_01_secured_vm_migration | `Failure` | 1033.48 | test_vm_life_cycle.py test_02_not_secured_vm_migration | `Failure` | 193.32 | test_vm_life_cycle.py test_04_rvpc_network_garbage_collector_nics | `Failure` | 287.33 | test_vpc_redundant.py test_hostha_enable_ha_when_host_in_maintenance | `Error` | 1.39 | test_hostha_kvm.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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2566: ConfigDrive fixes: CLOUDSTACK-10288, CLOUDSTACK-10289
blueorangutan commented on issue #2566: ConfigDrive fixes: CLOUDSTACK-10288, CLOUDSTACK-10289 URL: https://github.com/apache/cloudstack/pull/2566#issuecomment-380856699 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1911 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] blueorangutan commented on issue #2566: Bugfix/cloudstack 10289
blueorangutan commented on issue #2566: Bugfix/cloudstack 10289 URL: https://github.com/apache/cloudstack/pull/2566#issuecomment-380847648 @fmaximus 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] fmaximus opened a new pull request #2566: Bugfix/cloudstack 10289
fmaximus opened a new pull request #2566: Bugfix/cloudstack 10289 URL: https://github.com/apache/cloudstack/pull/2566 ## Description Bugfixes - CLOUDSTACK-10288: Config Drive Userdata: support for binary userdata Moved base64 decoding to ISO generation - CLOUDSTACK-10289: Config Drive Metadata: Use VM UUID instead of VM id Aligned Config Drive metadata code with VR metadata code. ## Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] 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) ## How Has This Been Tested? ## Checklist: - [x] I have read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document. - [x] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. Testing - [x] I have added tests to cover my changes. - [x] All relevant new and existing integration tests have passed. - [ ] A full integration testsuite with all test that can run on my environment has passed. @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2553: Update inconsistent debugging info in catch block
blueorangutan commented on issue #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#issuecomment-380830778 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1910 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] blueorangutan commented on issue #2553: Update inconsistent debugging info in catch block
blueorangutan commented on issue #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#issuecomment-380821502 @rafaelweingartner 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rafaelweingartner commented on issue #2553: Update inconsistent debugging info in catch block
rafaelweingartner commented on issue #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#issuecomment-380821147 @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] lzh3636 commented on a change in pull request #2553: Update inconsistent debugging info in catch block
lzh3636 commented on a change in pull request #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#discussion_r181088380 ## File path: api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java ## @@ -254,7 +254,6 @@ public void create() { setEntityUuid(result.getUuid()); } } catch (NetworkRuleConflictException ex) { -s_logger.info("Network rule conflict: " + ex.getMessage()); s_logger.trace("Network Rule Conflict: ", ex); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage()); Review comment: Yes, I agree with you. I'll change it later. 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] rafaelweingartner commented on a change in pull request #2553: Update inconsistent debugging info in catch block
rafaelweingartner commented on a change in pull request #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#discussion_r181085940 ## File path: api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java ## @@ -254,7 +254,6 @@ public void create() { setEntityUuid(result.getUuid()); } } catch (NetworkRuleConflictException ex) { -s_logger.info("Network rule conflict: " + ex.getMessage()); s_logger.trace("Network Rule Conflict: ", ex); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage()); Review comment: Ah, I am so sorry. I meant the second constructor. What I wanted to say is that it might be better to change the `ex.getMessage` to `ex`. This will maintain the full stack trace. 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] lzh3636 commented on a change in pull request #2553: Update inconsistent debugging info in catch block
lzh3636 commented on a change in pull request #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#discussion_r181084772 ## File path: api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java ## @@ -254,7 +254,6 @@ public void create() { setEntityUuid(result.getUuid()); } } catch (NetworkRuleConflictException ex) { -s_logger.info("Network rule conflict: " + ex.getMessage()); s_logger.trace("Network Rule Conflict: ", ex); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage()); Review comment: https://github.com/apache/cloudstack/blob/893a88d225276e45f12f9490e6af2c94a81c2965/api/src/main/java/org/apache/cloudstack/api/ServerApiException.java I find that their are only two constructors in that Exception class: public ServerApiException(ApiErrorCode errorCode, String description) public ServerApiException(ApiErrorCode errorCode, String description, Throwable cause) Maybe it can be changed to throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage(), ex); 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] blueorangutan commented on issue #2376: [4.11] Smoketest Health Check
blueorangutan commented on issue #2376: [4.11] Smoketest Health Check URL: https://github.com/apache/cloudstack/pull/2376#issuecomment-380806396 Trillian test result (tid-2493) Environment: vmware-65 (x2), Advanced Networking with Mgmt server 7 Total time taken: 99811 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2376-t2493-vmware-65.zip Intermitten failure detected: /marvin/tests/smoke/test_deploy_vgpu_enabled_vm.py Intermitten failure detected: /marvin/tests/smoke/test_routers_network_ops.py Intermitten failure detected: /marvin/tests/smoke/test_routers.py Intermitten failure detected: /marvin/tests/smoke/test_service_offerings.py Smoke tests completed. 64 look OK, 3 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Failure` | 1940.16 | test_routers_network_ops.py test_04_restart_network_wo_cleanup | `Failure` | 2.89 | test_routers.py ContextSuite context=TestCpuCapServiceOfferings>:teardown | `Error` | 0.00 | test_service_offerings.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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage
blueorangutan commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage URL: https://github.com/apache/cloudstack/pull/2502#issuecomment-380780893 Trillian test result (tid-2500) Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 6 Total time taken: 591 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2502-t2500-xenserver-71.zip Intermitten failure detected: /marvin/tests/smoke/test_affinity_groups_projects.py Intermitten failure detected: /marvin/tests/smoke/test_affinity_groups.py Intermitten failure detected: /marvin/tests/smoke/test_deploy_vgpu_enabled_vm.py Intermitten failure detected: /marvin/tests/smoke/test_deploy_vm_iso.py Intermitten failure detected: /marvin/tests/smoke/test_deploy_vm_root_resize.py Intermitten failure detected: /marvin/tests/smoke/test_deploy_vms_with_varied_deploymentplanners.py Intermitten failure detected: /marvin/tests/smoke/test_deploy_vm_with_userdata.py Intermitten failure detected: /marvin/tests/smoke/test_disk_offerings.py Intermitten failure detected: /marvin/tests/smoke/test_dynamicroles.py Intermitten failure detected: /marvin/tests/smoke/test_global_settings.py Intermitten failure detected: /marvin/tests/smoke/test_guest_vlan_range.py Intermitten failure detected: /marvin/tests/smoke/test_internal_lb.py Intermitten failure detected: /marvin/tests/smoke/test_iso.py Intermitten failure detected: /marvin/tests/smoke/test_list_ids_parameter.py Intermitten failure detected: /marvin/tests/smoke/test_loadbalance.py Intermitten failure detected: /marvin/tests/smoke/test_login.py Intermitten failure detected: /marvin/tests/smoke/test_multipleips_per_nic.py Intermitten failure detected: /marvin/tests/smoke/test_network_acl.py Intermitten failure detected: /marvin/tests/smoke/test_network.py Intermitten failure detected: /marvin/tests/smoke/test_nic_adapter_type.py Intermitten failure detected: /marvin/tests/smoke/test_nic.py Intermitten failure detected: /marvin/tests/smoke/test_non_contigiousvlan.py Intermitten failure detected: /marvin/tests/smoke/test_outofbandmanagement.py Intermitten failure detected: /marvin/tests/smoke/test_over_provisioning.py Intermitten failure detected: /marvin/tests/smoke/test_password_server.py Intermitten failure detected: /marvin/tests/smoke/test_portable_publicip.py Intermitten failure detected: /marvin/tests/smoke/test_primary_storage.py Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py Intermitten failure detected: /marvin/tests/smoke/test_public_ip_range.py Intermitten failure detected: /marvin/tests/smoke/test_pvlan.py Intermitten failure detected: /marvin/tests/smoke/test_regions.py Intermitten failure detected: /marvin/tests/smoke/test_reset_vm_on_reboot.py Intermitten failure detected: /marvin/tests/smoke/test_resource_detail.py Intermitten failure detected: /marvin/tests/smoke/test_router_dhcphosts.py Intermitten failure detected: /marvin/tests/smoke/test_router_dns.py Intermitten failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py Intermitten failure detected: /marvin/tests/smoke/test_routers_network_ops.py Intermitten failure detected: /marvin/tests/smoke/test_routers.py Intermitten failure detected: /marvin/tests/smoke/test_scale_vm.py Intermitten failure detected: /marvin/tests/smoke/test_secondary_storage.py Intermitten failure detected: /marvin/tests/smoke/test_service_offerings.py Intermitten failure detected: /marvin/tests/smoke/test_snapshots.py Intermitten failure detected: /marvin/tests/smoke/test_ssvm.py Intermitten failure detected: /marvin/tests/smoke/test_staticroles.py Intermitten failure detected: /marvin/tests/smoke/test_templates.py Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py Intermitten failure detected: /marvin/tests/smoke/test_vm_snapshots.py Intermitten failure detected: /marvin/tests/smoke/test_volumes.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_router_nics.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py Smoke tests completed. 2 look OK, 51 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- ContextSuite context=TestListIdsParams>:setup | `Error` | 0.00 | test_list_ids_parameter.py ContextSuite context=TestNetworkACL>:setup | `Error` | 0.00 | test_network_acl.py ContextSuite context=TestDeployVmWithAffinityGroup>:setup | `Error` | 0.00 | test_affinity_groups_projects.py ContextSuite context=TestDeployVmWithAffinityGroup>:setup | `Error` | 0.00 | test_affinity_groups.py test_delete_account | `Error` | 0.01 | test_network.p
[GitHub] rhtyd commented on issue #2563: CLOUDSTACK-10304: turn off apache2 server tokens and signature in systemvms
rhtyd commented on issue #2563: CLOUDSTACK-10304: turn off apache2 server tokens and signature in systemvms URL: https://github.com/apache/cloudstack/pull/2563#issuecomment-380778512 @jgilbert35 I checked debian9's apache2 filesystem layout, we don't see to sed stuff, we can remove the change and simply include a file as done in 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] jgilbert35 commented on issue #2563: CLOUDSTACK-10304: turn off apache2 server tokens and signature in systemvms
jgilbert35 commented on issue #2563: CLOUDSTACK-10304: turn off apache2 server tokens and signature in systemvms URL: https://github.com/apache/cloudstack/pull/2563#issuecomment-380775957 Should cloudstack/systemvm/debian/opt/cloud/bin/setup/common.sh also be considered? The setup_apache2_common() function contains references to ServerTokens and ServerSignature. 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] blueorangutan commented on issue #2554: agent: Add logging to libvirt qemu hook and cleanup
blueorangutan commented on issue #2554: agent: Add logging to libvirt qemu hook and cleanup URL: https://github.com/apache/cloudstack/pull/2554#issuecomment-380770161 @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2554: agent: Add logging to libvirt qemu hook and cleanup
rhtyd commented on issue #2554: agent: Add logging to libvirt qemu hook and cleanup URL: https://github.com/apache/cloudstack/pull/2554#issuecomment-380769882 @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
rhtyd commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#discussion_r181045243 ## File path: ui/scripts/network.js ## @@ -1100,11 +1100,23 @@ }); args.$form.find('.form-item[rel=cleanup]').find('input').attr('checked', 'checked'); //checked args.$form.find('.form-item[rel=cleanup]').css('display', 'inline-block'); //shown + args.$form.find('.form-item[rel=makeredundant]').find('input').attr('checked', 'checked'); //checked + args.$form.find('.form-item[rel=makeredundant]').css('display', 'inline-block'); //shown + +if (Boolean(args.context.networks[0].redundantrouter)) { Review comment: This code will show option to make network redundant during restart, we hide the checkbox/label for networks that are already redundant. 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 #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
rhtyd commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#discussion_r181045084 ## File path: api/src/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java ## @@ -77,6 +80,13 @@ public Boolean getCleanup() { return true; } +public Boolean getMakeRedundant() { +if (makeRedundant != null) { +return makeRedundant; +} +return true; Review comment: Will fix that. 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 #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
rhtyd commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#discussion_r181044905 ## File path: engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java ## @@ -2868,6 +2849,89 @@ public boolean restartNetwork(final Long networkId, final Account callerAccount, } } +@Override +public void destroyExpendableRouters(final List routers, final ReservationContext context) throws ResourceUnavailableException { +final List remainingRouters = new ArrayList<>(); +// Purge invalid routers +for (final VirtualRouter router : routers) { +if (router.getState() == VirtualMachine.State.Stopped || +router.getState() == VirtualMachine.State.Error || +router.getState() == VirtualMachine.State.Shutdowned || +router.getState() == VirtualMachine.State.Unknown) { +s_logger.debug("Destroying old router " + router); +_routerService.destroyRouter(router.getId(), context.getAccount(), context.getCaller().getId()); +} else { +remainingRouters.add(router); +} +} + +if (remainingRouters.size() < 2) { +return; +} + +// Purge any backup router +VirtualRouter backupRouter = null; +for (final VirtualRouter router : remainingRouters) { +if (router.getRedundantState() == VirtualRouter.RedundantState.BACKUP) { +backupRouter = router; +} +} +if (backupRouter == null) { +backupRouter = routers.get(routers.size() - 1); +} +if (backupRouter != null) { +_routerService.destroyRouter(backupRouter.getId(), context.getAccount(), context.getCaller().getId()); +} +} + +@Override +public boolean validateNewRouters(final List routers, final boolean isRedundant) { +for (final VirtualRouter router : routers) { +if (router.getState() != VirtualMachine.State.Running) { +s_logger.debug("Found new router " + router.getInstanceName() + " to be in non-Running state: " + router.getState() + ". Please try restarting network again."); +return false; +} +if (!isRedundant) { + router.setRedundantState(VirtualRouter.RedundantState.REDUNDANT_CAPABLE); +_routerDao.update(router.getId(), (DomainRouterVO) router); +} +} +return true; +} + +private boolean rollingRestartRouters(final NetworkVO network, final NetworkOffering offering, final DeployDestination dest, final ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException { +s_logger.debug("Performing rolling restart of routers of network " + network); +destroyExpendableRouters(_routerDao.findByNetwork(network.getId()), context); + +final List providersToImplement = getNetworkProviders(network.getId()); +final List oldRouters = _routerDao.findByNetwork(network.getId()); + +// Deploy a new router +final boolean originalRedundancy = network.isRedundant(); +network.setRedundant(true); +implementNetworkElements(dest, context, network, offering, providersToImplement); +network.setRedundant(originalRedundancy); + +// For redundant network wait for 3*advert_int+skew_seconds for VRRP to kick in +if (network.isRedundant() || (oldRouters.size() == 1 && oldRouters.get(0).getIsRedundantRouter())) { +try { +Thread.sleep(1L); +} catch (final InterruptedException ignored) {} +} + +// Destroy old routers +for (final DomainRouterVO oldRouter : oldRouters) { +_routerService.destroyRouter(oldRouter.getId(), context.getAccount(), context.getCaller().getId()); Review comment: @nitin-maharana if you read the code again we're deploying a new VR first. If it fails, the method will fail at that point and won't fallthrough to this code that destroys the old VRs. 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] nitin-maharana commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
nitin-maharana commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#discussion_r181044136 ## File path: ui/scripts/network.js ## @@ -1100,11 +1100,23 @@ }); args.$form.find('.form-item[rel=cleanup]').find('input').attr('checked', 'checked'); //checked args.$form.find('.form-item[rel=cleanup]').css('display', 'inline-block'); //shown + args.$form.find('.form-item[rel=makeredundant]').find('input').attr('checked', 'checked'); //checked + args.$form.find('.form-item[rel=makeredundant]').css('display', 'inline-block'); //shown + +if (Boolean(args.context.networks[0].redundantrouter)) { Review comment: As I understand, for RVR also the rolling upgrade will be applicable, any reason we hide the button. 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] nitin-maharana commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
nitin-maharana commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#discussion_r181043216 ## File path: engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java ## @@ -2868,6 +2849,89 @@ public boolean restartNetwork(final Long networkId, final Account callerAccount, } } +@Override +public void destroyExpendableRouters(final List routers, final ReservationContext context) throws ResourceUnavailableException { +final List remainingRouters = new ArrayList<>(); +// Purge invalid routers +for (final VirtualRouter router : routers) { +if (router.getState() == VirtualMachine.State.Stopped || +router.getState() == VirtualMachine.State.Error || +router.getState() == VirtualMachine.State.Shutdowned || +router.getState() == VirtualMachine.State.Unknown) { +s_logger.debug("Destroying old router " + router); +_routerService.destroyRouter(router.getId(), context.getAccount(), context.getCaller().getId()); +} else { +remainingRouters.add(router); +} +} + +if (remainingRouters.size() < 2) { +return; +} + +// Purge any backup router +VirtualRouter backupRouter = null; +for (final VirtualRouter router : remainingRouters) { +if (router.getRedundantState() == VirtualRouter.RedundantState.BACKUP) { +backupRouter = router; +} +} +if (backupRouter == null) { +backupRouter = routers.get(routers.size() - 1); +} +if (backupRouter != null) { +_routerService.destroyRouter(backupRouter.getId(), context.getAccount(), context.getCaller().getId()); +} +} + +@Override +public boolean validateNewRouters(final List routers, final boolean isRedundant) { +for (final VirtualRouter router : routers) { +if (router.getState() != VirtualMachine.State.Running) { +s_logger.debug("Found new router " + router.getInstanceName() + " to be in non-Running state: " + router.getState() + ". Please try restarting network again."); +return false; +} +if (!isRedundant) { + router.setRedundantState(VirtualRouter.RedundantState.REDUNDANT_CAPABLE); +_routerDao.update(router.getId(), (DomainRouterVO) router); +} +} +return true; +} + +private boolean rollingRestartRouters(final NetworkVO network, final NetworkOffering offering, final DeployDestination dest, final ReservationContext context) throws ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException { +s_logger.debug("Performing rolling restart of routers of network " + network); +destroyExpendableRouters(_routerDao.findByNetwork(network.getId()), context); + +final List providersToImplement = getNetworkProviders(network.getId()); +final List oldRouters = _routerDao.findByNetwork(network.getId()); + +// Deploy a new router +final boolean originalRedundancy = network.isRedundant(); +network.setRedundant(true); +implementNetworkElements(dest, context, network, offering, providersToImplement); +network.setRedundant(originalRedundancy); + +// For redundant network wait for 3*advert_int+skew_seconds for VRRP to kick in +if (network.isRedundant() || (oldRouters.size() == 1 && oldRouters.get(0).getIsRedundantRouter())) { +try { +Thread.sleep(1L); +} catch (final InterruptedException ignored) {} +} + +// Destroy old routers +for (final DomainRouterVO oldRouter : oldRouters) { +_routerService.destroyRouter(oldRouter.getId(), context.getAccount(), context.getCaller().getId()); Review comment: Here, before validating the new routers, we are destroying the old ones. If the new routers don't come up properly, we won't have old routers to roll back. 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] rafaelweingartner commented on a change in pull request #2553: Update inconsistent debugging info in catch block
rafaelweingartner commented on a change in pull request #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#discussion_r181041726 ## File path: api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java ## @@ -254,7 +254,6 @@ public void create() { setEntityUuid(result.getUuid()); } } catch (NetworkRuleConflictException ex) { -s_logger.info("Network rule conflict: " + ex.getMessage()); s_logger.trace("Network Rule Conflict: ", ex); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage()); Review comment: The same question here. 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] rafaelweingartner commented on a change in pull request #2553: Update inconsistent debugging info in catch block
rafaelweingartner commented on a change in pull request #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#discussion_r181041659 ## File path: api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java ## @@ -358,7 +358,6 @@ public void create() { setEntityId(result.getId()); setEntityUuid(result.getUuid()); } catch (NetworkRuleConflictException ex) { -s_logger.info("Network rule conflict: ", ex); s_logger.trace("Network Rule Conflict: ", ex); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage()); Review comment: What about using ` throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex);` instead of what we have here? 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] rafaelweingartner commented on a change in pull request #2554: agent: Add logging to libvirt qemu hook and cleanup
rafaelweingartner commented on a change in pull request #2554: agent: Add logging to libvirt qemu hook and cleanup URL: https://github.com/apache/cloudstack/pull/2554#discussion_r181041107 ## File path: agent/bindir/libvirtqemuhook.in ## @@ -6,59 +6,78 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -import sys + +import logging import re +import sys from xml.dom.minidom import parse from cloudutils.configFileOps import configFileOps from cloudutils.networkConfig import networkConfig + +logging.basicConfig(filename='/var/log/libvirt/qemu-hook.log', +filemode='a', +format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s', +datefmt='%H:%M:%S', +level=logging.INFO) +logger = logging.getLogger('qemu-hook') + def isOldStyleBridge(brName): if brName.find("cloudVirBr") == 0: return True else: return False + def isNewStyleBridge(brName): if brName.startswith('brvx-'): return False if re.match(r"br(\w+)-(\d+)", brName) == None: return False else: return True + def getGuestNetworkDevice(): -netlib = networkConfig() +netlib = networkConfig() cfo = configFileOps("/etc/cloudstack/agent/agent.properties") guestDev = cfo.getEntry("guest.network.device") enslavedDev = netlib.getEnslavedDev(guestDev, 1) return enslavedDev.split(".")[0] + def handleMigrateBegin(): try: domain = parse(sys.stdin) for interface in domain.getElementsByTagName("interface"): source = interface.getElementsByTagName("source")[0] bridge = source.getAttribute("bridge") if isOldStyleBridge(bridge): -vlanId = bridge.replace("cloudVirBr","") +vlanId = bridge.replace("cloudVirBr", "") elif isNewStyleBridge(bridge): -vlanId = re.sub(r"br(\w+)-","",bridge) +vlanId = re.sub(r"br(\w+)-", "", bridge) else: continue phyDev = getGuestNetworkDevice() -newBrName="br" + phyDev + "-" + vlanId +newBrName = "br" + phyDev + "-" + vlanId source.setAttribute("bridge", newBrName) print(domain.toxml()) except: pass + + if __name__ == '__main__': if len(sys.argv) != 5: sys.exit(0) -if sys.argv[2] == "migrate" and sys.argv[3] == "begin": -handleMigrateBegin() +# For docs refer https://libvirt.org/hooks.html#qemu +logger.debug("Executing qemu hook with args: %s" % sys.argv) +action, status = sys.argv[2:4] Review comment: Ah.. never mind. After reading some more time the same explanation I think I understood now. It is not inclusive with the upper bound parameter. Moreover, the arrays are indexed from 0. That is why if we want to ignore the script name, we start getting parameters that are in the first position. 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] rafaelweingartner commented on a change in pull request #2554: agent: Add logging to libvirt qemu hook and cleanup
rafaelweingartner commented on a change in pull request #2554: agent: Add logging to libvirt qemu hook and cleanup URL: https://github.com/apache/cloudstack/pull/2554#discussion_r181040333 ## File path: agent/bindir/libvirtqemuhook.in ## @@ -6,59 +6,78 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -import sys + +import logging import re +import sys from xml.dom.minidom import parse from cloudutils.configFileOps import configFileOps from cloudutils.networkConfig import networkConfig + +logging.basicConfig(filename='/var/log/libvirt/qemu-hook.log', +filemode='a', +format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s', +datefmt='%H:%M:%S', +level=logging.INFO) +logger = logging.getLogger('qemu-hook') + def isOldStyleBridge(brName): if brName.find("cloudVirBr") == 0: return True else: return False + def isNewStyleBridge(brName): if brName.startswith('brvx-'): return False if re.match(r"br(\w+)-(\d+)", brName) == None: return False else: return True + def getGuestNetworkDevice(): -netlib = networkConfig() +netlib = networkConfig() cfo = configFileOps("/etc/cloudstack/agent/agent.properties") guestDev = cfo.getEntry("guest.network.device") enslavedDev = netlib.getEnslavedDev(guestDev, 1) return enslavedDev.split(".")[0] + def handleMigrateBegin(): try: domain = parse(sys.stdin) for interface in domain.getElementsByTagName("interface"): source = interface.getElementsByTagName("source")[0] bridge = source.getAttribute("bridge") if isOldStyleBridge(bridge): -vlanId = bridge.replace("cloudVirBr","") +vlanId = bridge.replace("cloudVirBr", "") elif isNewStyleBridge(bridge): -vlanId = re.sub(r"br(\w+)-","",bridge) +vlanId = re.sub(r"br(\w+)-", "", bridge) else: continue phyDev = getGuestNetworkDevice() -newBrName="br" + phyDev + "-" + vlanId +newBrName = "br" + phyDev + "-" + vlanId source.setAttribute("bridge", newBrName) print(domain.toxml()) except: pass + + if __name__ == '__main__': if len(sys.argv) != 5: sys.exit(0) -if sys.argv[2] == "migrate" and sys.argv[3] == "begin": -handleMigrateBegin() +# For docs refer https://libvirt.org/hooks.html#qemu +logger.debug("Executing qemu hook with args: %s" % sys.argv) +action, status = sys.argv[2:4] Review comment: Just to make sure I understood this notation here. I was reading in the Internet about the notation to deal with arrays, and it seems that it is not inclusive (with respect of the first index used to define the range). I mean, if I want everything after the first parameter, which is the script name I can do the following: `user_args = sys.argv[1:]` Therefore, the code that we have here would assign parameter 3 to variable `action`, and parameter 4 to variable `status`. Is this true? I was under the impression that the variable `action` should be parameter 2, and `status` was expected to be parameter 3. 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] nitin-maharana commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
nitin-maharana commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#discussion_r181038001 ## File path: api/src/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java ## @@ -77,6 +80,13 @@ public Boolean getCleanup() { return true; } +public Boolean getMakeRedundant() { +if (makeRedundant != null) { +return makeRedundant; +} +return true; Review comment: If we don't pass anything, I think it should be false, it would continue with normal restart instead of this blue-green deployment. 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] jorgesumle opened a new issue #2565: Web UI is not responsive
jorgesumle opened a new issue #2565: Web UI is not responsive URL: https://github.com/apache/cloudstack/issues/2565 # ISSUE TYPE * Improvement Request # COMPONENT NAME ~~~ UI ~~~ # CLOUDSTACK VERSION ~~~ Latest ~~~ # CONFIGURATION N/A # OS / ENVIRONMENT Web browser # SUMMARY The web UI is not responsive. # STEPS TO REPRODUCE ~~~ Open the website UI in a small monitor. I tried in a 1024x768 screen. In smaller screens will be even worse. ~~~ # EXPECTED RESULTS ~~~ A responsive website ~~~ # ACTUAL RESULTS ~~~ It wasn't responsive, and I had to scroll. ~~~ 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] MartinEmrich commented on issue #2561: cloud-early-config detects unknown hypervisor type "xen-domU"
MartinEmrich commented on issue #2561: cloud-early-config detects unknown hypervisor type "xen-domU" URL: https://github.com/apache/cloudstack/issues/2561#issuecomment-380732822 @rhtyd Thanks for the updated systemvm templates, I'd like to try them out. But @khos2ow pointed out that cloud-install-sys-tmplt is not a good idea. But I cannot download it via UI either, as there's no working SSVM now. So there's a chicken-and-egg problem... I did the ugly thing, as this is just a test system: disabled all hosts and the zone, deleted all system VMs, removed all references from `vm_instance`, `template_store_ref`, `template_spool_ref` and the entry from `vm_template`. I then installed your template via cloud-install-sys-tmplt, it installed to /1/1 this time. after restarting and reenabling everything, _two_ CPVM/SSVM pairs came up, only one was referenced in the DB. I deleted the orphaned pair from XenCenter. The remaining pair is Debian 7, ACS 4.6.0 (the original installed during the first ACS setup with 4.9.2.0). Looks like it was cached somewhere? 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] blueorangutan commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage
blueorangutan commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage URL: https://github.com/apache/cloudstack/pull/2502#issuecomment-380730840 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1909 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] blueorangutan commented on issue #2553: Update inconsistent debugging info in catch block
blueorangutan commented on issue #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#issuecomment-380730037 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1908 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] blueorangutan commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage
blueorangutan commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage URL: https://github.com/apache/cloudstack/pull/2502#issuecomment-380729866 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1907 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] blueorangutan commented on issue #2499: Updates to capacity management
blueorangutan commented on issue #2499: Updates to capacity management URL: https://github.com/apache/cloudstack/pull/2499#issuecomment-380729597 Trillian test result (tid-2490) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 85871 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2499-t2490-kvm-centos7.zip Intermitten failure detected: /marvin/tests/smoke/test_certauthority_root.py Intermitten failure detected: /marvin/tests/smoke/test_primary_storage.py Intermitten failure detected: /marvin/tests/smoke/test_routers.py Intermitten failure detected: /marvin/tests/smoke/test_snapshots.py Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py Intermitten failure detected: /marvin/tests/smoke/test_host_maintenance.py Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py Smoke tests completed. 61 look OK, 6 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_01_add_primary_storage_disabled_host | `Error` | 0.65 | test_primary_storage.py test_01_primary_storage_nfs | `Error` | 0.12 | test_primary_storage.py ContextSuite context=TestStorageTags>:setup | `Error` | 0.23 | test_primary_storage.py test_04_restart_network_wo_cleanup | `Failure` | 3.00 | test_routers.py test_02_list_snapshots_with_removed_data_store | `Error` | 1.18 | test_snapshots.py test_08_migrate_vm | `Error` | 16.91 | test_vm_life_cycle.py test_01_cancel_host_maintenace_with_no_migration_jobs | `Failure` | 0.11 | test_host_maintenance.py test_02_cancel_host_maintenace_with_migration_jobs | `Error` | 3.34 | test_host_maintenance.py test_hostha_enable_ha_when_host_in_maintenance | `Error` | 2.71 | test_hostha_kvm.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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#issuecomment-376510749 @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
rhtyd commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#issuecomment-376510465 @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#issuecomment-376525033 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1841 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] blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#issuecomment-376710639 Trillian test result (tid-2431) Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 6 Total time taken: 24159 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2508-t2431-xenserver-71.zip Intermitten failure detected: /marvin/tests/smoke/test_network.py Intermitten failure detected: /marvin/tests/smoke/test_outofbandmanagement.py Intermitten failure detected: /marvin/tests/smoke/test_projects.py Intermitten failure detected: /marvin/tests/smoke/test_public_ip_range.py Intermitten failure detected: /marvin/tests/smoke/test_reset_vm_on_reboot.py Intermitten failure detected: /marvin/tests/smoke/test_router_dhcphosts.py Intermitten failure detected: /marvin/tests/smoke/test_router_dns.py Intermitten failure detected: /marvin/tests/smoke/test_router_dnsservice.py Intermitten failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py Intermitten failure detected: /marvin/tests/smoke/test_routers_network_ops.py Intermitten failure detected: /marvin/tests/smoke/test_routers.py Intermitten failure detected: /marvin/tests/smoke/test_scale_vm.py Intermitten failure detected: /marvin/tests/smoke/test_secondary_storage.py Intermitten failure detected: /marvin/tests/smoke/test_service_offerings.py Intermitten failure detected: /marvin/tests/smoke/test_snapshots.py Intermitten failure detected: /marvin/tests/smoke/test_ssvm.py Intermitten failure detected: /marvin/tests/smoke/test_templates.py Intermitten failure detected: /marvin/tests/smoke/test_usage.py Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py Intermitten failure detected: /marvin/tests/smoke/test_vm_snapshots.py Intermitten failure detected: /marvin/tests/smoke/test_volumes.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_router_nics.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py Intermitten failure detected: /marvin/tests/smoke/test_host_maintenance.py Smoke tests completed. 44 look OK, 23 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_reboot_router | `Error` | 1538.22 | test_network.py test_10_project_activation | `Error` | 2684.95 | test_projects.py ContextSuite context=TestResetVmOnReboot>:setup | `Error` | 0.00 | test_reset_vm_on_reboot.py ContextSuite context=TestRouterDHCPHosts>:setup | `Error` | 0.00 | test_router_dhcphosts.py ContextSuite context=TestRouterDHCPOpts>:setup | `Error` | 0.00 | test_router_dhcphosts.py ContextSuite context=TestRouterDns>:setup | `Error` | 0.00 | test_router_dns.py ContextSuite context=TestRouterDnsService>:setup | `Error` | 0.00 | test_router_dnsservice.py ContextSuite context=TestRouterIpTablesPolicies>:setup | `Error` | 0.00 | test_routers_iptables_default_policy.py ContextSuite context=TestVPCIpTablesPolicies>:setup | `Error` | 0.00 | test_routers_iptables_default_policy.py test_01_isolate_network_FW_PF_default_routes_egress_true | `Error` | 0.24 | test_routers_network_ops.py test_02_isolate_network_FW_PF_default_routes_egress_false | `Error` | 0.25 | test_routers_network_ops.py ContextSuite context=TestRedundantIsolateNetworks>:setup | `Error` | 1.58 | test_routers_network_ops.py ContextSuite context=TestRouterServices>:setup | `Error` | 0.00 | test_routers.py ContextSuite context=TestScaleVm>:setup | `Error` | 0.00 | test_scale_vm.py test_01_sys_vm_start | `Failure` | 0.26 | test_secondary_storage.py test_02_sys_template_ready | `Failure` | 0.21 | test_secondary_storage.py ContextSuite context=TestCpuCapServiceOfferings>:teardown | `Error` | 0.00 | test_service_offerings.py ContextSuite context=TestServiceOfferings>:setup | `Error` | 0.47 | test_service_offerings.py ContextSuite context=TestSnapshotRootDisk>:setup | `Error` | 0.00 | test_snapshots.py test_01_list_sec_storage_vm | `Failure` | 0.03 | test_ssvm.py test_02_list_cpvm_vm | `Failure` | 0.02 | test_ssvm.py test_03_ssvm_internals | `Failure` | 0.02 | test_ssvm.py test_04_cpvm_internals | `Failure` | 0.02 | test_ssvm.py test_05_stop_ssvm | `Failure` | 0.03 | test_ssvm.py test_06_stop_cpvm | `Failure` | 0.02 | test_ssvm.py test_07_reboot_ssvm | `Failure` | 0.02 | test_ssvm.py test_08_reboot_cpvm | `Failure` | 0.02 | test_ssvm.py test_09_destroy_ssvm | `Failure` | 0.02 | test_ssvm.py test_10_destroy_cpvm | `Failure` | 0.02 | test_ssvm.py test_02_create_template_with_checksum_sha1 | `Error` | 65.39 | test_templates.py test_03_create_template_with_checksum_sha256 | `Error` | 65.50 | test_templates.py
[GitHub] blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#issuecomment-376589438 @rhtyd a Trillian-Jenkins matrix job (centos6 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#issuecomment-376713942 Trillian test result (tid-2432) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 25160 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2508-t2432-kvm-centos7.zip Intermitten failure detected: /marvin/tests/smoke/test_volumes.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py Smoke tests completed. 65 look OK, 2 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_04_rvpc_network_garbage_collector_nics | `Failure` | 462.96 | test_vpc_redundant.py test_hostha_enable_ha_when_host_in_maintenance | `Error` | 3.61 | test_hostha_kvm.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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] rhtyd commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
rhtyd commented on a change in pull request #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#discussion_r181008868 ## File path: api/src/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java ## @@ -57,6 +57,9 @@ @Parameter(name = ApiConstants.CLEANUP, type = CommandType.BOOLEAN, required = false, description = "If cleanup old network elements") private Boolean cleanup; +@Parameter(name = ApiConstants.MAKEREDUNDANTE, type = CommandType.BOOLEAN, required = false, description = "Turn the network into a network with redundant routers.", since = "4.11.1") Review comment: Thanks for spotting @nitin-maharana, will fix the typo 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 issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
rhtyd commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#issuecomment-376589266 @blueorangutan test matrix 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] blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart
blueorangutan commented on issue #2508: CLOUDSTACK-9114: Reduce VR downtime during network restart URL: https://github.com/apache/cloudstack/pull/2508#issuecomment-376708510 Trillian test result (tid-2433) Environment: vmware-65 (x2), Advanced Networking with Mgmt server 7 Total time taken: 23516 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2508-t2433-vmware-65.zip Intermitten failure detected: /marvin/tests/smoke/test_service_offerings.py Intermitten failure detected: /marvin/tests/smoke/test_ssvm.py Intermitten failure detected: /marvin/tests/smoke/test_templates.py Intermitten failure detected: /marvin/tests/smoke/test_usage.py Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py Intermitten failure detected: /marvin/tests/smoke/test_vm_snapshots.py Intermitten failure detected: /marvin/tests/smoke/test_volumes.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_router_nics.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py Intermitten failure detected: /marvin/tests/smoke/test_host_maintenance.py Smoke tests completed. 56 look OK, 11 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- ContextSuite context=TestCpuCapServiceOfferings>:teardown | `Error` | 0.00 | test_service_offerings.py test_01_list_sec_storage_vm | `Failure` | 0.03 | test_ssvm.py test_02_list_cpvm_vm | `Failure` | 0.03 | test_ssvm.py test_03_ssvm_internals | `Failure` | 0.03 | test_ssvm.py test_04_cpvm_internals | `Failure` | 0.03 | test_ssvm.py test_05_stop_ssvm | `Failure` | 0.03 | test_ssvm.py test_06_stop_cpvm | `Failure` | 0.02 | test_ssvm.py test_07_reboot_ssvm | `Failure` | 0.02 | test_ssvm.py test_08_reboot_cpvm | `Failure` | 0.03 | test_ssvm.py test_09_destroy_ssvm | `Failure` | 0.03 | test_ssvm.py test_10_destroy_cpvm | `Failure` | 0.03 | test_ssvm.py test_02_create_template_with_checksum_sha1 | `Error` | 65.35 | test_templates.py test_03_create_template_with_checksum_sha256 | `Error` | 65.34 | test_templates.py test_04_create_template_with_checksum_md5 | `Error` | 65.59 | test_templates.py test_05_create_template_with_no_checksum | `Error` | 65.50 | test_templates.py ContextSuite context=TestTemplates>:setup | `Error` | 5.64 | test_templates.py ContextSuite context=TestISOUsage>:setup | `Error` | 0.00 | test_usage.py ContextSuite context=TestLBRuleUsage>:setup | `Error` | 0.00 | test_usage.py ContextSuite context=TestNatRuleUsage>:setup | `Error` | 0.00 | test_usage.py ContextSuite context=TestPublicIPUsage>:setup | `Error` | 0.00 | test_usage.py ContextSuite context=TestSnapshotUsage>:setup | `Error` | 0.00 | test_usage.py ContextSuite context=TestVmUsage>:setup | `Error` | 0.00 | test_usage.py ContextSuite context=TestVolumeUsage>:setup | `Error` | 0.00 | test_usage.py ContextSuite context=TestVpnUsage>:setup | `Error` | 0.00 | test_usage.py test_01_VPC_nics_after_destroy | `Error` | 2.63 | test_vpc_router_nics.py test_02_VPC_default_routes | `Error` | 1.61 | test_vpc_router_nics.py ContextSuite context=TestDeployVM>:setup | `Error` | 0.00 | test_vm_life_cycle.py ContextSuite context=TestVMLifeCycle>:setup | `Error` | 0.00 | test_vm_life_cycle.py test_change_service_offering_for_vm_with_snapshots | `Error` | 4.26 | test_vm_snapshots.py ContextSuite context=TestVmSnapshot>:setup | `Error` | 12.29 | test_vm_snapshots.py test_01_redundant_vpc_site2site_vpn | `Failure` | 3.28 | test_vpc_vpn.py test_01_vpc_site2site_vpn_multiple_options | `Failure` | 2.29 | test_vpc_vpn.py test_01_vpc_remote_access_vpn | `Failure` | 1.21 | test_vpc_vpn.py test_01_vpc_site2site_vpn | `Failure` | 2.30 | test_vpc_vpn.py ContextSuite context=TestCreateVolume>:setup | `Error` | 0.00 | test_volumes.py ContextSuite context=TestVolumes>:setup | `Error` | 0.00 | test_volumes.py test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL | `Error` | 3.68 | test_vpc_redundant.py test_02_redundant_VPC_default_routes | `Error` | 3.71 | test_vpc_redundant.py test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers | `Error` | 2.68 | test_vpc_redundant.py test_04_rvpc_network_garbage_collector_nics | `Error` | 3.72 | test_vpc_redundant.py test_05_rvpc_multi_tiers | `Error` | 3.69 | test_vpc_redundant.py test_02_cancel_host_maintenace_with_migration_jobs | `Error` | 3.28 | test_host_maintenance.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: us...@infra.apache.org With regar
[cloudstack] branch master updated: install: Fix URL error from installation instructions (#2564)
This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 0e8fbdb install: Fix URL error from installation instructions (#2564) 0e8fbdb is described below commit 0e8fbdb35f366e73766b8970b0f08a2bea761ad0 Author: Jorge Maldonado Ventura AuthorDate: Thu Apr 12 10:21:00 2018 +0200 install: Fix URL error from installation instructions (#2564) --- INSTALL.md | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 626df91..8a87c8a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -59,7 +59,7 @@ Following these steps, jenv and pyenv will use .java-version and .python-version You may get the source code from the repository hosted on Apache: -$ git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git +$ git clone https://gitbox.apache.org/repos/asf/cloudstack.git Or, you may fork the repository from the official Apache CloudStack mirror on [Github](https://github.com/apache/cloudstack) @@ -97,13 +97,13 @@ field should be left blank which is defaulted to the ROOT domain. ## Building with non-redistributable plugins -CloudStack supports several plugins that depend on libraries with distribution restrictions. -Because of this they are not included in the default build. Enable these additional plugins +CloudStack supports several plugins that depend on libraries with distribution restrictions. +Because of this they are not included in the default build. Enable these additional plugins activate their respective profiles. For convenience adding -Dnoredist will enable all plugins -that depend on libraries with distribution restrictions. The build procedure expects that the -required libraries are present in the maven repository. +that depend on libraries with distribution restrictions. The build procedure expects that the +required libraries are present in the maven repository. -The following procedure can be used to add the libraries to the local maven repository. Details +The following procedure can be used to add the libraries to the local maven repository. Details on obtaining the required libraries can be found in this file. Note that this will vary between releases of CloudStack -- To stop receiving notification emails like this one, please contact ro...@apache.org.
[GitHub] rhtyd closed pull request #2564: [Docs] Fix URL error from installation instructions
rhtyd closed pull request #2564: [Docs] Fix URL error from installation instructions URL: https://github.com/apache/cloudstack/pull/2564 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/INSTALL.md b/INSTALL.md index 626df91dc56..8a87c8ad0e4 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -59,7 +59,7 @@ Following these steps, jenv and pyenv will use .java-version and .python-version You may get the source code from the repository hosted on Apache: -$ git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git +$ git clone https://gitbox.apache.org/repos/asf/cloudstack.git Or, you may fork the repository from the official Apache CloudStack mirror on [Github](https://github.com/apache/cloudstack) @@ -97,13 +97,13 @@ field should be left blank which is defaulted to the ROOT domain. ## Building with non-redistributable plugins -CloudStack supports several plugins that depend on libraries with distribution restrictions. -Because of this they are not included in the default build. Enable these additional plugins +CloudStack supports several plugins that depend on libraries with distribution restrictions. +Because of this they are not included in the default build. Enable these additional plugins activate their respective profiles. For convenience adding -Dnoredist will enable all plugins -that depend on libraries with distribution restrictions. The build procedure expects that the -required libraries are present in the maven repository. +that depend on libraries with distribution restrictions. The build procedure expects that the +required libraries are present in the maven repository. -The following procedure can be used to add the libraries to the local maven repository. Details +The following procedure can be used to add the libraries to the local maven repository. Details on obtaining the required libraries can be found in this file. Note that this will vary between releases of CloudStack 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] DaanHoogland commented on a change in pull request #2564: [Docs] Fix URL error from installation instructions
DaanHoogland commented on a change in pull request #2564: [Docs] Fix URL error from installation instructions URL: https://github.com/apache/cloudstack/pull/2564#discussion_r180998926 ## File path: INSTALL.md ## @@ -59,7 +59,7 @@ Following these steps, jenv and pyenv will use .java-version and .python-version You may get the source code from the repository hosted on Apache: -$ git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git +$ git clone https://gitbox.apache.org/repos/asf/cloudstack.git Review comment: thanks for catching this 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] blueorangutan commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage
blueorangutan commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage URL: https://github.com/apache/cloudstack/pull/2502#issuecomment-380717583 @mike-tutkowski 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] mike-tutkowski opened a new pull request #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage
mike-tutkowski opened a new pull request #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage URL: https://github.com/apache/cloudstack/pull/2502 https://issues.apache.org/jira/browse/CLOUDSTACK-10352 ## Description Allow on XenServer for a volume on non-managed storage to be online migrated to managed storage. ## 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) - [x] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) ## How Has This Been Tested? Previously if you tried to online migrate a volume on XenServer from non-managed storage to managed storage, the operation failed. Now the operation succeeds. ## Checklist: - [x] I have read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document. - [x] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. @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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] DaanHoogland commented on a change in pull request #2559: Upgrade path 4.11 through 4.11.1 to 4.12
DaanHoogland commented on a change in pull request #2559: Upgrade path 4.11 through 4.11.1 to 4.12 URL: https://github.com/apache/cloudstack/pull/2559#discussion_r180997112 ## File path: engine/schema/src/test/java/com/cloud/upgrade/DatabaseUpgradeCheckerTest.java ## @@ -74,6 +77,30 @@ public void testCalculateUpgradePath490to4910() { } +@Test +public void testCalculateUpgradePath410to412() { + +final CloudStackVersion dbVersion = CloudStackVersion.parse("4.10.0.0"); +assertNotNull(dbVersion); + +final CloudStackVersion currentVersion = CloudStackVersion.parse("4.12.0.0"); +assertNotNull(currentVersion); + +final DatabaseUpgradeChecker checker = new DatabaseUpgradeChecker(); +final DbUpgrade[] upgrades = checker.calculateUpgradePath(dbVersion, currentVersion); + +assertNotNull(upgrades); +assertTrue(upgrades.length >= 1); +assertTrue(upgrades[0] instanceof Upgrade41000to41100); +assertTrue(upgrades[1] instanceof Upgrade41100to41110); +assertTrue(upgrades[2] instanceof Upgrade41110to41200); + +assertTrue(Arrays.equals(new String[] { "4.11.0.0", "4.11.1.0"}, Review comment: it seem redundant to what is happening in other checks and in pther tests. Why do you think it is needed @nitin-maharana ? 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] blueorangutan commented on issue #2553: Update inconsistent debugging info in catch block
blueorangutan commented on issue #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#issuecomment-380716222 @DaanHoogland 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] DaanHoogland commented on issue #2553: Update inconsistent debugging info in catch block
DaanHoogland commented on issue #2553: Update inconsistent debugging info in catch block URL: https://github.com/apache/cloudstack/pull/2553#issuecomment-380716111 @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: us...@infra.apache.org With regards, Apache Git Services
[cloudstack] branch 4.11 updated: Add "Fixes: number" to PR template for auto-closing issues (#2557)
This is an automated email from the ASF dual-hosted git repository. dahn pushed a commit to branch 4.11 in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/4.11 by this push: new 5d05da2 Add "Fixes: number" to PR template for auto-closing issues (#2557) 5d05da2 is described below commit 5d05da21effad48e210303b4dae5385b6ed85d2c Author: Khosrow Moossavi AuthorDate: Thu Apr 12 04:07:00 2018 -0400 Add "Fixes: number" to PR template for auto-closing issues (#2557) --- PULL_REQUEST_TEMPLATE.md | 7 +++ 1 file changed, 7 insertions(+) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 8a5a30f..a21832c 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -12,6 +12,13 @@ - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) +## GitHub Issue/PRs + + + + + + ## Screenshots (if appropriate): ## How Has This Been Tested? -- To stop receiving notification emails like this one, please contact d...@apache.org.
[GitHub] DaanHoogland closed pull request #2557: Add "Fixes: number" to PR template for auto-closing issues
DaanHoogland closed pull request #2557: Add "Fixes: number" to PR template for auto-closing issues URL: https://github.com/apache/cloudstack/pull/2557 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/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 8a5a30fdb54..a21832ce16c 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -12,6 +12,13 @@ - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) +## GitHub Issue/PRs + + + + + + ## Screenshots (if appropriate): ## How Has This Been Tested? 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] blueorangutan commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage
blueorangutan commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage URL: https://github.com/apache/cloudstack/pull/2502#issuecomment-380715425 @mike-tutkowski 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] blueorangutan commented on issue #2390: [CLOUDSTACK-10214] Unable to remove local primary storage
blueorangutan commented on issue #2390: [CLOUDSTACK-10214] Unable to remove local primary storage URL: https://github.com/apache/cloudstack/pull/2390#issuecomment-380715348 Trillian test result (tid-2489) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 87341 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr2390-t2489-kvm-centos7.zip Intermitten failure detected: /marvin/tests/smoke/test_certauthority_root.py Intermitten failure detected: /marvin/tests/smoke/test_routers.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py Smoke tests completed. 65 look OK, 2 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_04_restart_network_wo_cleanup | `Failure` | 4.03 | test_routers.py test_05_rvpc_multi_tiers | `Failure` | 319.70 | test_vpc_redundant.py test_05_rvpc_multi_tiers | `Error` | 342.76 | test_vpc_redundant.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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] DaanHoogland closed pull request #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage
DaanHoogland closed pull request #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage URL: https://github.com/apache/cloudstack/pull/2502 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/core/src/main/java/com/cloud/agent/api/storage/MigrateVolumeCommand.java b/core/src/main/java/com/cloud/agent/api/storage/MigrateVolumeCommand.java index 77430c39808..e5838451dd0 100644 --- a/core/src/main/java/com/cloud/agent/api/storage/MigrateVolumeCommand.java +++ b/core/src/main/java/com/cloud/agent/api/storage/MigrateVolumeCommand.java @@ -97,10 +97,18 @@ public DataTO getDestData() { return destData; } +public void setSrcDetails(Map details) { +srcDetails = details; +} + public Map getSrcDetails() { return srcDetails; } +public void setDestDetails(Map details) { +destDetails = details; +} + public Map getDestDetails() { return destDetails; } diff --git a/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java b/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java index 8749589f12c..6021a439178 100644 --- a/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java +++ b/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java @@ -25,9 +25,12 @@ import com.cloud.storage.StoragePool; public interface PrimaryDataStoreDriver extends DataStoreDriver { +enum QualityOfServiceState { MIGRATION, NO_MIGRATION } + String BASIC_CREATE = "basicCreate"; String BASIC_DELETE = "basicDelete"; String BASIC_DELETE_FAILURE = "basicDeleteFailure"; +String BASIC_DELETE_BY_FOLDER = "basicDeleteByFolder"; String BASIC_GRANT_ACCESS = "basicGrantAccess"; String BASIC_REVOKE_ACCESS = "basicRevokeAccess"; String BASIC_IQN = "basicIqn"; @@ -67,4 +70,6 @@ void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback callback); void revertSnapshot(SnapshotInfo snapshotOnImageStore, SnapshotInfo snapshotOnPrimaryStore, AsyncCompletionCallback callback); + +void handleQualityOfServiceForVolumeMigration(VolumeInfo volumeInfo, QualityOfServiceState qualityOfServiceState); } diff --git a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java index 30cff850c88..e08c3063b40 100644 --- a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java +++ b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java @@ -49,6 +49,7 @@ import com.cloud.storage.SnapshotVO; import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.StorageManager; +import com.cloud.storage.StoragePool; import com.cloud.storage.VMTemplateVO; import com.cloud.storage.VolumeDetailVO; import com.cloud.storage.Volume; @@ -84,8 +85,10 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector; import org.apache.cloudstack.engine.subsystem.api.storage.HostScope; import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver; import org.apache.cloudstack.engine.subsystem.api.storage.Scope; import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.StorageAction; import org.apache.cloudstack.engine.subsystem.api.storage.StorageCacheManager; import org.apache.cloudstack.engine.subsystem.api.storage.StrategyPriority; import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; @@ -288,7 +291,7 @@ public void copyAsync(DataObject srcData, DataObject destData, Host destHost, As VolumeInfo srcVolumeInfo = (VolumeInfo)srcData; TemplateInfo destTemplateInfo = (TemplateInfo)destData; -handleCreateTemplateFromVolume(srcVolumeInfo, destTemplateInfo, callback); +handleCreateTemplateFromManagedVolume(srcVolumeInfo, destTemplateInfo, callback); } else { handleError(OPERATION_NOT_SUPPORTED, callback); @@ -302,7 +305,7 @@ private void handleCopyAsyncForSnapshot(SnapshotInfo srcSnapshotInfo, DataObject if (canHandleSrc && (destData instanceof TemplateInfo || destData instanceof SnapshotInfo) && (destData.getDataStore().getRol
[GitHub] DaanHoogland commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage
DaanHoogland commented on issue #2502: [CLOUDSTACK-10352] XenServer: Support online migration of a virtual disk from non-managed to managed storage URL: https://github.com/apache/cloudstack/pull/2502#issuecomment-380715225 want to see some ci passing 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] jorgesumle opened a new pull request #2564: [Docs] Fix URL error from installation instructions
jorgesumle opened a new pull request #2564: [Docs] Fix URL error from installation instructions URL: https://github.com/apache/cloudstack/pull/2564 ## Description - Fix URL error - Remove trailing whitespaces from modified file ## Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] 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? Watching the fix in the `INSTALL.md` file online. ## Checklist: - [ ] I have read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md) document. - [x] My code follows the code style of this project. - [x] My change requires a change to the documentation. - [x] I have updated the documentation accordingly. Testing - [ ] I have added tests to cover my changes. - [ ] All relevant new and existing integration tests have passed. - [ ] A full integration testsuite with all test that can run on my environment has passed. 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
[cloudstack] branch master updated: [CLOUDSTACK-10230] User should not be able to use removed “Guest OS type” (#2404)
This is an automated email from the ASF dual-hosted git repository. dahn pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 91d9821 [CLOUDSTACK-10230] User should not be able to use removed “Guest OS type” (#2404) 91d9821 is described below commit 91d98211496a482e6882acd6528f9b8dbeefe3bf Author: Rafael Weingärtner AuthorDate: Thu Apr 12 04:48:59 2018 -0300 [CLOUDSTACK-10230] User should not be able to use removed “Guest OS type” (#2404) * [CLOUDSTACK-10230] User is able to change to “Guest OS type” that has been removed Users are able to change the OS type of VMs to “Guest OS type” that has been removed. This becomes a security issue when we try to force users to use HVM VMs (Meltdown/Spectre thing). A removed “guest os type” should not be usable by any users in the cloud. --- .../main/java/com/cloud/vm/UserVmManagerImpl.java | 666 ++--- .../test/java/com/cloud/vm/UserVmManagerTest.java | 251 .../test/com/cloud/vm/UserVmManagerImplTest.java | 224 +++ 3 files changed, 646 insertions(+), 495 deletions(-) diff --git a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java index f2f764b..df81dd3 100644 --- a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java @@ -39,10 +39,6 @@ import java.util.stream.Collectors; import javax.inject.Inject; import javax.naming.ConfigurationException; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; - import org.apache.cloudstack.acl.ControlledEntity.ACLType; import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.affinity.AffinityGroupService; @@ -80,7 +76,6 @@ import org.apache.cloudstack.engine.service.api.OrchestrationService; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore; -import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService; @@ -89,7 +84,6 @@ import org.apache.cloudstack.framework.async.AsyncCallFuture; import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.framework.config.Configurable; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; -import org.apache.cloudstack.framework.jobs.AsyncJobManager; import org.apache.cloudstack.managed.context.ManagedContextRunnable; import org.apache.cloudstack.storage.command.DeleteCommand; import org.apache.cloudstack.storage.command.DettachCommand; @@ -97,6 +91,10 @@ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.collections.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -125,7 +123,6 @@ import com.cloud.agent.api.to.VirtualMachineTO; import com.cloud.agent.manager.Commands; import com.cloud.alert.AlertManager; import com.cloud.api.ApiDBUtils; -import com.cloud.api.query.dao.UserVmJoinDao; import com.cloud.capacity.Capacity; import com.cloud.capacity.CapacityManager; import com.cloud.configuration.Config; @@ -136,14 +133,14 @@ import com.cloud.dc.DataCenter.NetworkType; import com.cloud.dc.DataCenterVO; import com.cloud.dc.DedicatedResourceVO; import com.cloud.dc.HostPodVO; +import com.cloud.dc.Vlan; +import com.cloud.dc.Vlan.VlanType; +import com.cloud.dc.VlanVO; import com.cloud.dc.dao.ClusterDao; import com.cloud.dc.dao.DataCenterDao; import com.cloud.dc.dao.DedicatedResourceDao; import com.cloud.dc.dao.HostPodDao; import com.cloud.dc.dao.VlanDao; -import com.cloud.dc.Vlan; -import com.cloud.dc.Vlan.VlanType; -import com.cloud.dc.VlanVO; import com.cloud.deploy.DataCenterDeployment; import com.cloud.deploy.DeployDestination; import com.cloud.deploy.DeploymentPlanner; @@ -211,9 +208,7 @@ import com.cloud.network.rules.dao.PortForwardingRulesDao; import com.cloud.network.security.SecurityGroup; import com.cloud.network.security.SecurityGroupManager; import com.cloud.network.security.dao.SecurityGroupDao; -import com.cloud.network.security.dao.SecurityGroupVMMapDao; import com.cloud
[GitHub] DaanHoogland closed pull request #2404: [CLOUDSTACK-10230] User should not be able to use removed “Guest OS type”
DaanHoogland closed pull request #2404: [CLOUDSTACK-10230] User should not be able to use removed “Guest OS type” URL: https://github.com/apache/cloudstack/pull/2404 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/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java index f2f764b3dc7..df81dd3ff2b 100644 --- a/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/main/java/com/cloud/vm/UserVmManagerImpl.java @@ -39,10 +39,6 @@ import javax.inject.Inject; import javax.naming.ConfigurationException; -import org.apache.commons.codec.binary.Base64; -import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; - import org.apache.cloudstack.acl.ControlledEntity.ACLType; import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.affinity.AffinityGroupService; @@ -80,7 +76,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore; -import org.apache.cloudstack.engine.subsystem.api.storage.TemplateDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService; @@ -89,7 +84,6 @@ import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.framework.config.Configurable; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; -import org.apache.cloudstack.framework.jobs.AsyncJobManager; import org.apache.cloudstack.managed.context.ManagedContextRunnable; import org.apache.cloudstack.storage.command.DeleteCommand; import org.apache.cloudstack.storage.command.DettachCommand; @@ -97,6 +91,10 @@ import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.collections.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -125,7 +123,6 @@ import com.cloud.agent.manager.Commands; import com.cloud.alert.AlertManager; import com.cloud.api.ApiDBUtils; -import com.cloud.api.query.dao.UserVmJoinDao; import com.cloud.capacity.Capacity; import com.cloud.capacity.CapacityManager; import com.cloud.configuration.Config; @@ -136,14 +133,14 @@ import com.cloud.dc.DataCenterVO; import com.cloud.dc.DedicatedResourceVO; import com.cloud.dc.HostPodVO; +import com.cloud.dc.Vlan; +import com.cloud.dc.Vlan.VlanType; +import com.cloud.dc.VlanVO; import com.cloud.dc.dao.ClusterDao; import com.cloud.dc.dao.DataCenterDao; import com.cloud.dc.dao.DedicatedResourceDao; import com.cloud.dc.dao.HostPodDao; import com.cloud.dc.dao.VlanDao; -import com.cloud.dc.Vlan; -import com.cloud.dc.Vlan.VlanType; -import com.cloud.dc.VlanVO; import com.cloud.deploy.DataCenterDeployment; import com.cloud.deploy.DeployDestination; import com.cloud.deploy.DeploymentPlanner; @@ -211,9 +208,7 @@ import com.cloud.network.security.SecurityGroup; import com.cloud.network.security.SecurityGroupManager; import com.cloud.network.security.dao.SecurityGroupDao; -import com.cloud.network.security.dao.SecurityGroupVMMapDao; import com.cloud.network.vpc.VpcManager; -import com.cloud.network.vpc.dao.VpcDao; import com.cloud.offering.DiskOffering; import com.cloud.offering.NetworkOffering; import com.cloud.offering.NetworkOffering.Availability; @@ -222,10 +217,8 @@ import com.cloud.offerings.dao.NetworkOfferingDao; import com.cloud.org.Cluster; import com.cloud.org.Grouping; -import com.cloud.projects.ProjectManager; import com.cloud.resource.ResourceManager; import com.cloud.resource.ResourceState; -import com.cloud.server.ConfigurationServer; import com.cloud.server.ManagementService; import com.cloud.service.ServiceOfferingVO; import com.cloud.service.dao.ServiceOfferingDao; @@ -234,15 +227,15 @@ import com.cloud.storage.DiskOfferingVO; import com.cloud.storage.GuestOSCategoryVO; import com.cloud.storage.GuestOSVO; +import com.cloud.storage.Snapshot; import com.cloud.storage.SnapshotVO; import com.cloud.storage.Storage; -import com.cloud.storage.Snapshot; import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.Storage.StoragePoolType; import com.cloud.storage.Storage.TemplateType; -import com.cloud.storage.StorageManager; import com.cloud.s