[GitHub] [cloudstack] blueorangutan commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
blueorangutan commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#issuecomment-574505634 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-603 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3694: Ldap fixes
blueorangutan commented on issue #3694: Ldap fixes URL: https://github.com/apache/cloudstack/pull/3694#issuecomment-574525378 @borisstoyanov 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 to 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] [cloudstack] borisstoyanov commented on issue #3694: Ldap fixes
borisstoyanov commented on issue #3694: Ldap fixes URL: https://github.com/apache/cloudstack/pull/3694#issuecomment-574525178 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
blueorangutan commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#issuecomment-574493062 @shwstppr 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 to 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] [cloudstack] nvazquez commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
nvazquez commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#issuecomment-574501390 Thanks @DaanHoogland, comments addressed This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] nvazquez commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
nvazquez commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#issuecomment-574501459 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
blueorangutan commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#issuecomment-574501524 @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 to 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] [cloudstack] shwstppr commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
shwstppr commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#issuecomment-574492915 @blueorangutan test This is an automated message from the Apache Git Service. To respond to the message, please log on to 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-primate] branch master updated: image: register template action form (#92)
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-primate.git The following commit(s) were added to refs/heads/master by this push: new 406aa3f image: register template action form (#92) 406aa3f is described below commit 406aa3f2b83d2395430c83ef3ee4e059e2022b58 Author: Hoang Nguyen AuthorDate: Wed Jan 15 13:51:36 2020 +0700 image: register template action form (#92) This implements a customer register registration form. Signed-off-by: Rohit Yadav Co-authored-by: hoangnm Co-authored-by: Rohit Yadav --- src/components/view/ActionButton.vue | 4 +- src/components/view/ListView.vue | 3 + src/components/widgets/OsLogo.vue| 2 +- src/config/section/image.js | 4 +- src/locales/en.json | 12 +- src/views/image/RegisterIso.vue | 2 +- src/views/image/RegisterTemplate.vue | 798 +++ 7 files changed, 816 insertions(+), 9 deletions(-) diff --git a/src/components/view/ActionButton.vue b/src/components/view/ActionButton.vue index 13bc00c..fbd842a 100644 --- a/src/components/view/ActionButton.vue +++ b/src/components/view/ActionButton.vue @@ -32,7 +32,7 @@ v-if="action.api in $store.getters.apis && action.showBadge && ((!dataView && (action.listView || action.groupAction && selectedRowKeys.length > 0)) || (dataView && action.dataView)) && - ('show' in action ? action.show(resource, $store.getters.userInfo, $store.getters.apis) : true)"> + ('show' in action ? action.show(resource, $store.getters.userInfo) : true)"> + {{ text }} {{ text }} @@ -154,6 +155,7 @@ import { api } from '@/api' import Console from '@/components/widgets/Console' +import OsLogo from '@/components/widgets/OsLogo' import Status from '@/components/widgets/Status' import InfoCard from '@/components/view/InfoCard' @@ -161,6 +163,7 @@ export default { name: 'ListView', components: { Console, +OsLogo, Status, InfoCard }, diff --git a/src/components/widgets/OsLogo.vue b/src/components/widgets/OsLogo.vue index 7cc6dbc..8739cd1 100644 --- a/src/components/widgets/OsLogo.vue +++ b/src/components/widgets/OsLogo.vue @@ -21,7 +21,7 @@ {{ name }}- + diff --git a/src/config/section/image.js b/src/config/section/image.js index 38bfe2a..ffa7f6b 100644 --- a/src/config/section/image.js +++ b/src/config/section/image.js @@ -50,7 +50,8 @@ export default { icon: 'plus', label: 'Create template', listView: true, - args: ['url', 'name', 'displaytext', 'directdownload', 'zoneids', 'hypervisor', 'format', 'ostypeid', 'checksum', 'isextractable', 'passwordenabled', 'sshkeyenabled', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'isrouting', 'requireshvm'] + popup: true, + component: () => import('@/views/image/RegisterTemplate.vue') }, { api: 'getUploadParamsForTemplate', @@ -138,7 +139,6 @@ export default { label: 'Register ISO', listView: true, popup: true, - show: (record, user, apis) => { return 'registerIso' in apis }, component: () => import('@/views/image/RegisterIso.vue') }, { diff --git a/src/locales/en.json b/src/locales/en.json index a65f200..5a25940 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -290,7 +290,6 @@ "isCustomized": "Custom Disk Size", "isCustomizedIops": "Custom IOPS", "isDedicated": "Dedicate", -"isExtractable": "Extractable", "isFeatured": "Featured", "isForced": "Force Delete", "isManaged": "Managed", @@ -303,7 +302,7 @@ "isdedicated": "Dedicated", "isdefault": "Is Default", "isdynamicallyscalable": "Dynamically Scalable", -"isextractable": "extractable", +"isextractable": "Extractable", "isfeatured": "Featured", "iso": "ISO", "isolatedpvlanId": "Secondary Isolated VLAN ID", @@ -466,7 +465,7 @@ "label.add.vpc.offering": "Add VPC Offering", "label.add.vpn.customer.gateway": "Add VPN Customer Gateway", "label.add.zone": "Add Zone", -"label.all.zone": "All Zone", +"label.all.zone": "All Zones", "label.archive": "Archive", "label.archive.alerts": "Archive alerts", "label.archive.events": "Archive events", @@ -533,6 +532,8 @@ "label.enable.vpc.offering": "Enable VPC
[GitHub] [cloudstack] blueorangutan commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
blueorangutan commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#issuecomment-574487350 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-602 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3694: Ldap fixes
blueorangutan commented on issue #3694: Ldap fixes URL: https://github.com/apache/cloudstack/pull/3694#issuecomment-574531201 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-604 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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-primate] branch master updated: component: sort order in list view (#104)
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-primate.git The following commit(s) were added to refs/heads/master by this push: new db080cc component: sort order in list view (#104) db080cc is described below commit db080cc0c3749b38bc339aa510cf399cc1f5bcc0 Author: Ritchie Vincent AuthorDate: Wed Jan 15 07:24:19 2020 + component: sort order in list view (#104) Adds order column in zone/template/offerings list view tables. Signed-off-by: Rohit Yadav Co-authored-by: Rohit Yadav --- src/components/view/ListView.vue | 136 ++ src/config/section/image.js | 2 +- src/config/section/infra/zones.js | 2 +- src/config/section/offering.js| 6 +- src/locales/en.json | 1 + 5 files changed, 142 insertions(+), 5 deletions(-) diff --git a/src/components/view/ListView.vue b/src/components/view/ListView.vue index 0d594fc..3c93db5 100644 --- a/src/components/view/ListView.vue +++ b/src/components/view/ListView.vue @@ -117,6 +117,33 @@ {{ text }} + + +Move to top + + + +Move to bottom + + + +Move up one row + + + +Move down one row + + + + { +console.error(error) + }).finally(() => { +this.parentFetchData() +this.parentToggleLoading() + }) +}, +moveItemUp (record) { + const data = this.items + const index = data.findIndex(item => item.id === record.id) + if (index === 0) return + + data.splice(index - 1, 0, data.splice(index, 1)[0]) + + data.forEach((item, index) => { +this.handleUpdateOrder(item.id, index + 1) + }) +}, +moveItemDown (record) { + const data = this.items + const index = data.findIndex(item => item.id === record.id) + if (index === data.length - 1) return + + data.splice(index + 1, 0, data.splice(index, 1)[0]) + + data.forEach((item, index) => { +this.handleUpdateOrder(item.id, index + 1) + }) +}, +moveItemTop (record) { + const data = this.items + const index = data.findIndex(item => item.id === record.id) + if (index === 0) return + + data.unshift(data.splice(index, 1)[0]) + + data.forEach((item, index) => { +this.handleUpdateOrder(item.id, index + 1) + }) +}, +moveItemBottom (record) { + const data = this.items + const index = data.findIndex(item => item.id === record.id) + if (index === data.length - 1) return + + data.push(data.splice(index, 1)[0]) + + data.forEach((item, index) => { +this.handleUpdateOrder(item.id, index + 1) + }) } } } @@ -255,3 +367,27 @@ export default { background-color: #f9f9f9; } + + + .shift-btns { +display: flex; + } + .shift-btn { +display: flex; +align-items: center; +justify-content: center; +width: 20px; +height: 20px; +font-size: 12px; + +&:not(:last-child) { + margin-right: 5px; +} + +&--rotated { + font-size: 10px; + transform: rotate(90deg); +} + + } + diff --git a/src/config/section/image.js b/src/config/section/image.js index ffa7f6b..93e9482 100644 --- a/src/config/section/image.js +++ b/src/config/section/image.js @@ -27,7 +27,7 @@ export default { permission: ['listTemplates'], params: { templatefilter: 'executable' }, resourceType: 'Template', - columns: ['name', 'ostypename', 'status', 'hypervisor', 'account', 'domain'], + columns: ['name', 'ostypename', 'status', 'hypervisor', 'account', 'domain', 'order'], details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created'], related: [{ name: 'vm', diff --git a/src/config/section/infra/zones.js b/src/config/section/infra/zones.js index 7e26bc4..fe1b3d9 100644 --- a/src/config/section/infra/zones.js +++ b/src/config/section/infra/zones.js @@ -20,7 +20,7 @@ export default { title: 'Zones', icon: 'global', permission: ['listZonesMetrics', 'listZones'], - columns: ['name', 'state', 'networktype', 'clusters', 'cpuused', 'cpumaxdeviation', 'cpuallocated', 'cputotal', 'memoryused', 'memorymaxdeviation', 'memoryallocated', 'memorytotal'], + columns: ['name', 'state', 'networktype', 'clusters', 'cpuused', 'cpumaxdeviation', 'cpuallocated', 'cputotal', 'memoryused', 'memorymaxdeviation', 'memoryallocated', 'memorytotal', 'order'], details: ['name', 'id', 'allocationstate', 'networktype', 'guestcidraddress', 'localstorageenabled', 'securitygroupsenabled', 'dns1', 'dns2',
[GitHub] [cloudstack] blueorangutan commented on issue #3795: Agent lb on svm
blueorangutan commented on issue #3795: Agent lb on svm URL: https://github.com/apache/cloudstack/pull/3795#issuecomment-574189744 @andrijapanicsb 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 to 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] [cloudstack] andrijapanicsb commented on issue #3795: Agent lb on svm
andrijapanicsb commented on issue #3795: Agent lb on svm URL: https://github.com/apache/cloudstack/pull/3795#issuecomment-574189414 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] slavkap commented on a change in pull request #3724: Storage-based Snapshots for KVM VMs
slavkap commented on a change in pull request #3724: Storage-based Snapshots for KVM VMs URL: https://github.com/apache/cloudstack/pull/3724#discussion_r366356280 ## File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java ## @@ -1456,22 +1496,65 @@ public Answer createSnapshot(final CreateObjectCommand cmd) { final KVMPhysicalDisk disk = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), volume.getPath()); if (state == DomainInfo.DomainState.VIR_DOMAIN_RUNNING && !primaryPool.isExternalSnapshot()) { final String vmUuid = vm.getUUIDString(); -final Object[] args = new Object[] {snapshotName, vmUuid}; -final String snapshot = SnapshotXML.format(args); +boolean isKVMEnabled = cmd.getContextParam("kvmsnapshot") != null ? Boolean.parseBoolean(cmd.getContextParam("kvmsnapshot")) : false; +s_logger.debug(String.format("Snapshots on KVM is enabled %s", isKVMEnabled)); +if (isKVMEnabled) { +long size = 0; +OutputInterpreter.OneLineParser parser = new OutputInterpreter.OneLineParser(); +Script sc = new Script("virsh"); +sc.add(String.format("qemu-monitor-command %s '{ \"execute\" : \"query-block\" }'", vmName)); Review comment: Thanks @wido for the comments! We will check what will be needed for the patch, and we will start working on it. We will ask for help, if we get stuck somewhere. Could you please give me and example why "executing commands is just not reliable enough"? And if there are a problems with commands execution whether there will be the same with execution of virsh in helper scripts? This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3814: Add missing HA config keys (#3776)
blueorangutan commented on issue #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814#issuecomment-574193167 @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 to 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] [cloudstack] DaanHoogland commented on issue #3814: Add missing HA config keys (#3776)
DaanHoogland commented on issue #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814#issuecomment-574192902 @svenvogel it passed all tests on 4.13. it had merge conflict so i'll run tests again here. @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] ravening commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
ravening commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#issuecomment-574208972 > This requires VM-per-VM tracking/migration effort and is way outside of the scope of this work/PR. It is however an interesting idea for some future improvements. Yes of course this is not good to implement within cloudstack itself. That's why we have a separate application to do that where we are using the above algorithm This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] anuragaw commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router
anuragaw commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router URL: https://github.com/apache/cloudstack/pull/3350#issuecomment-574208807 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router
blueorangutan commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router URL: https://github.com/apache/cloudstack/pull/3350#issuecomment-574209048 @anuragaw 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 to 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] [cloudstack] blueorangutan commented on issue #3807: Enhancement: Allow creating network with duplicate name
blueorangutan commented on issue #3807: Enhancement: Allow creating network with duplicate name URL: https://github.com/apache/cloudstack/pull/3807#issuecomment-574199427 @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 to 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] [cloudstack] DaanHoogland commented on issue #3807: Enhancement: Allow creating network with duplicate name
DaanHoogland commented on issue #3807: Enhancement: Allow creating network with duplicate name URL: https://github.com/apache/cloudstack/pull/3807#issuecomment-574199200 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] andrijapanicsb commented on issue #3795: Agent lb on svm
andrijapanicsb commented on issue #3795: Agent lb on svm URL: https://github.com/apache/cloudstack/pull/3795#issuecomment-574204079 LGTM This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] andrijapanicsb commented on issue #3795: Agent lb on svm
andrijapanicsb commented on issue #3795: Agent lb on svm URL: https://github.com/apache/cloudstack/pull/3795#issuecomment-574203852 Tested manually by reproducing the issue on clean 4.13, confirming CPVM won't start with the exceptions below...: > 2020-01-14 14:02:44,379 DEBUG [c.c.a.ConsoleProxyAlertAdapter] (consoleproxy-1:ctx-a32cef4f) (logid:5d7a9f58) received console proxy alert 2020-01-14 14:02:44,380 DEBUG [c.c.a.ConsoleProxyAlertAdapter] (consoleproxy-1:ctx-a32cef4f) (logid:5d7a9f58) Console proxy creation failure, zone: ref-trl-451-x-M7-apanic 2020-01-14 14:02:44,381 WARN [c.c.a.AlertManagerImpl] (consoleproxy-1:ctx-a32cef4f) (logid:5d7a9f58) AlertType:: 10 | dataCenterId:: 1 | podId:: null | clusterId:: null | message:: Console proxy creation failure. zone: ref-trl-451-x-M7-apanic, error details: fromIndex = -1 2020-01-14 14:02:44,387 WARN [c.c.v.SystemVmLoadScanner] (consoleproxy-1:ctx-a32cef4f) (logid:5d7a9f58) Unexpected exception fromIndex = -1 java.lang.IndexOutOfBoundsException: fromIndex = -1 at java.util.SubList.(AbstractList.java:620) at java.util.RandomAccessSubList.(AbstractList.java:775) Upgrade to this one, and CPVM starts fine. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3807: Enhancement: Allow creating network with duplicate name
blueorangutan commented on issue #3807: Enhancement: Allow creating network with duplicate name URL: https://github.com/apache/cloudstack/pull/3807#issuecomment-574213063 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-597 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3814: Add missing HA config keys (#3776)
blueorangutan commented on issue #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814#issuecomment-574221846 @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 to 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] [cloudstack] DaanHoogland commented on issue #3814: Add missing HA config keys (#3776)
DaanHoogland commented on issue #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814#issuecomment-574221644 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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 ha-config-to-master updated (af98ff8 -> 11ca97e)
This is an automated email from the ASF dual-hosted git repository. dahn pushed a change to branch ha-config-to-master in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from af98ff8 Merge branch '4.13' into ha-config-to-master add 11ca97e merge conflict-bugs fixed No new revisions were added by this update. Summary of changes: .../main/java/com/cloud/ha/HighAvailabilityManagerImpl.java | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-)
[GitHub] [cloudstack] blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router
blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router URL: https://github.com/apache/cloudstack/pull/3575#issuecomment-574251288 @anuragaw 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 to 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] [cloudstack] blueorangutan commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router
blueorangutan commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router URL: https://github.com/apache/cloudstack/pull/3350#issuecomment-574219189 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-598 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3814: Add missing HA config keys (#3776)
blueorangutan commented on issue #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814#issuecomment-574232188 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-599 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] DaanHoogland commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
DaanHoogland commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#discussion_r366400352 ## File path: api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHotsUpdatedResponse.java ## @@ -0,0 +1,73 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package org.apache.cloudstack.api.response; + +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + +public class RollingMaintenanceHotsUpdatedResponse extends BaseResponse { Review comment: what's with the "Hots" in the name? I suppose it is meant to be Host? This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] DaanHoogland commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
DaanHoogland commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#discussion_r366407509 ## File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/rolling/maintenance/RollingMaintenanceServiceExecutor.java ## @@ -0,0 +1,137 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package com.cloud.hypervisor.kvm.resource.rolling.maintenance; + +import com.cloud.utils.Pair; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.script.OutputInterpreter; +import com.cloud.utils.script.Script; +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.stream.Stream; + +public class RollingMaintenanceServiceExecutor extends RollingMaintenanceExecutorBase implements RollingMaintenanceExecutor { + +private static final String servicePrefix = "cloudstack-rolling-maintenance"; +private static final String resultsFileSuffix = "rolling-maintenance-results"; +private static final String outputFileSuffix = "rolling-maintenance-output"; + +private static final Logger s_logger = Logger.getLogger(RollingMaintenanceServiceExecutor.class); + +public RollingMaintenanceServiceExecutor(String hooksDir) { +super(hooksDir); +} + +/** + * Generate and return escaped instance name to use on systemd service invokation + */ +private String generateInstanceName(String stage, String file, String payload) { +String instanceName = String.format("%s,%s,%s,%s,%s", stage, file, getTimeout(), +getResultsFilePath(), getOutputFilePath()); +if (StringUtils.isNotBlank(payload)) { +instanceName += "," + payload; +} +return Script.runSimpleBashScript(String.format("systemd-escape '%s'", instanceName)); +} + +private String invokeService(String action, String stage, String file, String payload) { +s_logger.debug("Invoking rolling maintenance service for stage: " + stage + " and file " + file + " with action: " + action); +final OutputInterpreter.AllLinesParser parser = new OutputInterpreter.AllLinesParser(); +Script command = new Script("/bin/systemctl", s_logger); +command.add(action); +String service = servicePrefix + "@" + generateInstanceName(stage, file, payload); +command.add(service); +String result = command.execute(parser); +int exitValue = command.getExitValue(); +s_logger.trace("Execution: " + command.toString() + " - exit code: " + exitValue + +": " + result + (StringUtils.isNotBlank(parser.getLines()) ? parser.getLines() : "")); +return StringUtils.isBlank(result) ? parser.getLines().replace("\n", "") : result; Review comment: maybe replace "\n" with " " instead of "", never know what gets concatenated. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] DaanHoogland commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
DaanHoogland commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#discussion_r366403546 ## File path: api/src/main/java/com/cloud/resource/RollingMaintenanceManager.java ## @@ -0,0 +1,127 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package com.cloud.resource; + +import com.cloud.host.Host; +import com.cloud.utils.Pair; +import com.cloud.utils.exception.CloudRuntimeException; +import org.apache.cloudstack.api.command.admin.resource.StartRollingMaintenanceCmd; +import org.apache.cloudstack.framework.config.ConfigKey; +import org.apache.cloudstack.framework.config.Configurable; +import org.apache.commons.lang3.tuple.Triple; + +import java.util.Date; +import java.util.List; + +public interface RollingMaintenanceManager extends Configurable { Review comment: I would this guy to be responsible of idempotent guarding and other kinds of checks (concurrency/re-entrancy) or maybe progress reporting. not needed?/implemented elsewhere? This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] DaanHoogland commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
DaanHoogland commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#discussion_r366415767 ## File path: server/src/main/java/com/cloud/resource/RollingMaintenanceManagerImpl.java ## @@ -0,0 +1,488 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package com.cloud.resource; + +import com.cloud.agent.AgentManager; +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.RollingMaintenanceAnswer; +import com.cloud.agent.api.RollingMaintenanceCommand; +import com.cloud.capacity.CapacityManager; +import com.cloud.dc.ClusterDetailsDao; +import com.cloud.dc.ClusterDetailsVO; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.dc.dao.HostPodDao; +import com.cloud.deploy.DeployDestination; +import com.cloud.event.ActionEvent; +import com.cloud.event.EventTypes; +import com.cloud.exception.AgentUnavailableException; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.OperationTimedoutException; +import com.cloud.host.Host; +import com.cloud.host.HostVO; +import com.cloud.host.Status; +import com.cloud.host.dao.HostDao; +import com.cloud.host.dao.HostTagsDao; +import com.cloud.hypervisor.Hypervisor; +import com.cloud.org.Cluster; +import com.cloud.org.Grouping; +import com.cloud.service.ServiceOfferingVO; +import com.cloud.service.dao.ServiceOfferingDao; +import com.cloud.utils.Pair; +import com.cloud.utils.component.ManagerBase; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.VirtualMachineProfileImpl; +import com.cloud.vm.dao.VMInstanceDao; +import org.apache.cloudstack.affinity.AffinityGroupProcessor; +import org.apache.cloudstack.api.command.admin.resource.StartRollingMaintenanceCmd; +import org.apache.cloudstack.framework.config.ConfigKey; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.tuple.ImmutableTriple; +import org.apache.commons.lang3.tuple.Triple; +import org.apache.log4j.Logger; + +import javax.inject.Inject; +import javax.naming.ConfigurationException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Date; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +public class RollingMaintenanceManagerImpl extends ManagerBase implements RollingMaintenanceManager { + +@Inject +private HostPodDao podDao; +@Inject +private ClusterDao clusterDao; +@Inject +private DataCenterDao dataCenterDao; +@Inject +private HostDao hostDao; +@Inject +private AgentManager agentManager; +@Inject +private ResourceManager resourceManager; +@Inject +private CapacityManager capacityManager; +@Inject +private VMInstanceDao vmInstanceDao; +@Inject +private ServiceOfferingDao serviceOfferingDao; +@Inject +private ClusterDetailsDao clusterDetailsDao; +@Inject +private HostTagsDao hostTagsDao; + +protected List _affinityProcessors; + +public void setAffinityGroupProcessors(List affinityProcessors) { +_affinityProcessors = affinityProcessors; +} + +public static final Logger s_logger = Logger.getLogger(RollingMaintenanceManagerImpl.class.getName()); + +private static final String unsopportedHypervisorErrorMsg = "Rolling maintenance is currently supported on KVM only"; + +private Pair> getResourceTypeAndIdPair(List podIds, List clusterIds, List zoneIds, List hostIds) { +Pair> pair = CollectionUtils.isNotEmpty(podIds) ? new Pair<>(ResourceType.Pod, podIds) : + CollectionUtils.isNotEmpty(clusterIds) ? new Pair<>(ResourceType.Cluster, clusterIds) : + CollectionUtils.isNotEmpty(zoneIds) ? new Pair<>(ResourceType.Zone, zoneIds) : + CollectionUtils.isNotEmpty(hostIds) ? new Pair<>(ResourceType.Host, hostIds) : null; +if (pair == null) { +throw new CloudRuntimeException("Parameters podId, clusterId, zoneId, hostId are
[GitHub] [cloudstack] DaanHoogland commented on issue #3814: Add missing HA config keys (#3776)
DaanHoogland commented on issue #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814#issuecomment-574250152 @blueorangutan test This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] svenvogel commented on issue #3814: Add missing HA config keys (#3776)
svenvogel commented on issue #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814#issuecomment-574189127 @DaanHoogland how it looks like? This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] DaanHoogland commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
DaanHoogland commented on issue #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#issuecomment-574248688 > > This requires VM-per-VM tracking/migration effort and is way outside of the scope of this work/PR. It is however an interesting idea for some future improvements. > > Yes of course this is not good to implement within cloudstack itself. That's why we have a separate application to do that where we are using the above algorithm I like the notion that not everything should be implemented in cloudstack. What do you mean "not good to implement in cloudstack"? Cloudstack is about orchestration and provisioning, so this should be a perfect task for cloudstack. If you mean "hard to implement" yes it would. we do not have a workflow engine in the system, which would be ideal for this. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] anuragaw commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router
anuragaw commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router URL: https://github.com/apache/cloudstack/pull/3575#issuecomment-574250949 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3814: Add missing HA config keys (#3776)
blueorangutan commented on issue #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814#issuecomment-574250357 @DaanHoogland 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 to 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 ha-config-to-master created (now af98ff8)
This is an automated email from the ASF dual-hosted git repository. dahn pushed a change to branch ha-config-to-master in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at af98ff8 Merge branch '4.13' into ha-config-to-master This branch includes the following new commits: new af98ff8 Merge branch '4.13' into ha-config-to-master The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[cloudstack] 01/01: Merge branch '4.13' into ha-config-to-master
This is an automated email from the ASF dual-hosted git repository. dahn pushed a commit to branch ha-config-to-master in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit af98ff812a8a3eee39ce79518cca92be669f6da7 Merge: cc093c6 54cc73a Author: Daan Hoogland AuthorDate: Tue Jan 14 14:37:40 2020 +0100 Merge branch '4.13' into ha-config-to-master .../java/com/cloud/ha/HighAvailabilityManager.java | 46 +- .../main/java/com/cloud/configuration/Config.java | 43 + .../configuration/ConfigurationManagerImpl.java| 174 ++--- .../com/cloud/ha/HighAvailabilityManagerImpl.java | 114 +++--- .../main/java/com/cloud/test/DatabaseConfig.java | 59 +++ 5 files changed, 219 insertions(+), 217 deletions(-) diff --cc server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java index 348a417,076f500..01df157 --- a/server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java +++ b/server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java @@@ -16,32 -16,9 +16,6 @@@ // under the License. package com.cloud.ha; - import java.util.ArrayList; - import java.util.Date; - import java.util.HashMap; - import java.util.List; - import java.util.Map; - import java.util.concurrent.Executors; - import java.util.concurrent.ScheduledExecutorService; - import java.util.concurrent.TimeUnit; - - import javax.inject.Inject; - import javax.naming.ConfigurationException; - - import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationService; - 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.managed.context.ManagedContext; - import org.apache.cloudstack.managed.context.ManagedContextRunnable; - import org.apache.cloudstack.management.ManagementServerHost; - import org.apache.log4j.Logger; - import org.apache.log4j.NDC; - --import com.cloud.agent.AgentManager; --import com.cloud.alert.AlertManager; --import com.cloud.cluster.ClusterManagerListener; - import com.cloud.configuration.Config; import com.cloud.dc.ClusterDetailsDao; import com.cloud.dc.DataCenterVO; import com.cloud.dc.HostPodVO; @@@ -103,14 -100,11 +97,16 @@@ import javax.naming.ConfigurationExcept * ha.retry.wait | time to wait before retrying the work item | seconds | 120 || || stop.retry.wait | time to wait * before retrying the stop | seconds | 120 || * } **/ - public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvailabilityManager, ClusterManagerListener, Configurable { + public class HighAvailabilityManagerImpl extends ManagerBase implements Configurable, HighAvailabilityManager, ClusterManagerListener { + + private static final int SECONDS_TO_MILLISECONDS_FACTOR = 1000; protected static final Logger s_logger = Logger.getLogger(HighAvailabilityManagerImpl.class); +private ConfigKey MaxRetries = new ConfigKey<>("Advanced", Integer.class, +"max.retries","5", +"Total number of attempts for trying migration of a VM.", +true, ConfigKey.Scope.Cluster); + WorkerThread[] _workers; boolean _stopped; long _timeToSleep; @@@ -1037,17 -988,23 +1015,37 @@@ return haWorks.size() > 0; } +@Override +public boolean hasPendingMigrationsWork(long vmId) { +List haWorks = _haDao.listPendingMigrationsForVm(vmId); +for (HaWorkVO work : haWorks) { +if (work.getTimesTried() <= _maxRetries) { +return true; +} else { +s_logger.warn("HAWork Job of migration type " + work + " found in database which has max " + +"retries more than " + _maxRetries + " but still not in Done, Cancelled, or Error State"); +} +} +return false; +} ++ + /** + * @return The name of the component that provided this configuration + * variable. This value is saved in the database so someone can easily + * identify who provides this variable. + **/ + @Override + public String getConfigComponentName() { + return HighAvailabilityManager.class.getSimpleName(); + } + + /** + * @return The list of config keys provided by this configuable. + */ + @Override + public ConfigKey[] getConfigKeys() { + return new ConfigKey[] {TimeBetweenCleanup, MaxRetries, TimeToSleep, TimeBetweenFailures, + StopRetryInterval, RestartRetryInterval, MigrateRetryInterval, InvestigateRetryInterval, + HAWorkers, ForceHA}; + } }
[GitHub] [cloudstack] DaanHoogland opened a new pull request #3814: Add missing HA config keys (#3776)
DaanHoogland opened a new pull request #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814 ## Description ## 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) - [ ] 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? This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3814: Add missing HA config keys (#3776)
blueorangutan commented on issue #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814#issuecomment-574201195 Packaging result: ✖centos6 ✖centos7 ✖debian. JID-596 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3795: Agent lb on svm
blueorangutan commented on issue #3795: Agent lb on svm URL: https://github.com/apache/cloudstack/pull/3795#issuecomment-574201190 Packaging result: ✔centos6 ✔centos7 ✔debian. JID-595 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] wido commented on a change in pull request #3724: Storage-based Snapshots for KVM VMs
wido commented on a change in pull request #3724: Storage-based Snapshots for KVM VMs URL: https://github.com/apache/cloudstack/pull/3724#discussion_r366370846 ## File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java ## @@ -1456,22 +1496,65 @@ public Answer createSnapshot(final CreateObjectCommand cmd) { final KVMPhysicalDisk disk = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), volume.getPath()); if (state == DomainInfo.DomainState.VIR_DOMAIN_RUNNING && !primaryPool.isExternalSnapshot()) { final String vmUuid = vm.getUUIDString(); -final Object[] args = new Object[] {snapshotName, vmUuid}; -final String snapshot = SnapshotXML.format(args); +boolean isKVMEnabled = cmd.getContextParam("kvmsnapshot") != null ? Boolean.parseBoolean(cmd.getContextParam("kvmsnapshot")) : false; +s_logger.debug(String.format("Snapshots on KVM is enabled %s", isKVMEnabled)); +if (isKVMEnabled) { +long size = 0; +OutputInterpreter.OneLineParser parser = new OutputInterpreter.OneLineParser(); +Script sc = new Script("virsh"); +sc.add(String.format("qemu-monitor-command %s '{ \"execute\" : \"query-block\" }'", vmName)); Review comment: All the calls to libvirt from the agent are done through the Java bindings. If we suddenly start to execute virsh from Java we work around all the existing code which is there to have an open connection with libvirt. In addition you can only check on exit status and not handle exceptions properly coming back from libvirt. If we are lacking features in libvirt-java those need to be added through the libvirt project. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] andrijapanicsb edited a comment on issue #3795: Agent lb on svm
andrijapanicsb edited a comment on issue #3795: Agent lb on svm URL: https://github.com/apache/cloudstack/pull/3795#issuecomment-574203852 Tested manually by reproducing the issue on clean 4.13, confirming CPVM won't start with the exceptions below...: > 2020-01-14 14:02:44,379 DEBUG [c.c.a.ConsoleProxyAlertAdapter] (consoleproxy-1:ctx-a32cef4f) (logid:5d7a9f58) received console proxy alert 2020-01-14 14:02:44,380 DEBUG [c.c.a.ConsoleProxyAlertAdapter] (consoleproxy-1:ctx-a32cef4f) (logid:5d7a9f58) Console proxy creation failure, zone: ref-trl-451-x-M7-apanic 2020-01-14 14:02:44,381 WARN [c.c.a.AlertManagerImpl] (consoleproxy-1:ctx-a32cef4f) (logid:5d7a9f58) AlertType:: 10 | dataCenterId:: 1 | podId:: null | clusterId:: null | message:: Console proxy creation failure. zone: ref-trl-451-x-M7-apanic, error details: fromIndex = -1 2020-01-14 14:02:44,387 WARN [c.c.v.SystemVmLoadScanner] (consoleproxy-1:ctx-a32cef4f) (logid:5d7a9f58) Unexpected exception fromIndex = -1 java.lang.IndexOutOfBoundsException: fromIndex = -1 at java.util.SubList.(AbstractList.java:620) at java.util.RandomAccessSubList.(AbstractList.java:775) Upgrade to this one, and CPVM starts fine (part of output below): > 2020-01-14 14:35:16,100 DEBUG [c.c.v.VirtualMachineManagerImpl] (Work-Job-Executor-1:ctx-a2d2a0b1 job-5/job-160 ctx-0562c679) (logid:8ae77e28) Successfully transitioned to start state for VM[ConsoleProxy|v-3-VM] reservation id = 44c9f85a-3c14-474f-93a6-8cfdd2fdc0d3 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] andrijapanicsb merged pull request #3795: Agent lb on svm
andrijapanicsb merged pull request #3795: Agent lb on svm URL: https://github.com/apache/cloudstack/pull/3795 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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.13 updated (54cc73a -> 6ebd02e)
This is an automated email from the ASF dual-hosted git repository. andrijapanic pushed a change to branch 4.13 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from 54cc73a Add missing HA config keys (#3776) add 6ebd02e Agent lb on svm (#3795) No new revisions were added by this update. Summary of changes: .../agent/lb/IndirectAgentLBServiceImpl.java | 62 +++--- 1 file changed, 54 insertions(+), 8 deletions(-)
[GitHub] [cloudstack] blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router
blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router URL: https://github.com/apache/cloudstack/pull/3575#issuecomment-574284834 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-601 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] anuragaw commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router
anuragaw commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router URL: https://github.com/apache/cloudstack/pull/3575#issuecomment-574288969 @blueorangutan test This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router
blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router URL: https://github.com/apache/cloudstack/pull/3575#issuecomment-574289086 @anuragaw 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 to 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] [cloudstack] andrijapanicsb commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router
andrijapanicsb commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router URL: https://github.com/apache/cloudstack/pull/3350#issuecomment-574329853 LGTM. Tested manually by @borisstoyanov and reviewed by me This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] anuragaw commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router
anuragaw commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router URL: https://github.com/apache/cloudstack/pull/3575#issuecomment-574275773 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router
blueorangutan commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router URL: https://github.com/apache/cloudstack/pull/3350#issuecomment-574276074 @anuragaw 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 to 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] [cloudstack] anuragaw commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router
anuragaw commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router URL: https://github.com/apache/cloudstack/pull/3350#issuecomment-574275885 @blueorangutan test This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router
blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router URL: https://github.com/apache/cloudstack/pull/3575#issuecomment-574276086 @anuragaw 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 to 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] [cloudstack] blueorangutan commented on issue #3732: [Vmware] Enable PVLAN support on L2 networks
blueorangutan commented on issue #3732: [Vmware] Enable PVLAN support on L2 networks URL: https://github.com/apache/cloudstack/pull/3732#issuecomment-574315134 Trillian test result (tid-766) Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7 Total time taken: 47759 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3732-t766-vmware-65u2.zip Intermittent failure detected: /marvin/tests/smoke/test_deploy_vm_root_resize.py Intermittent failure detected: /marvin/tests/smoke/test_ssvm.py Smoke tests completed. 77 look OK, 1 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_00_deploy_vm_root_resize | `Failure` | 247.49 | test_deploy_vm_root_resize.py This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router
blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router URL: https://github.com/apache/cloudstack/pull/3575#issuecomment-574261016 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-600 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3806: python/c++ formatting in java corrected
blueorangutan commented on issue #3806: python/c++ formatting in java corrected URL: https://github.com/apache/cloudstack/pull/3806#issuecomment-574316154 Trillian test result (tid-768) Environment: vmware-65u2 (x2), Advanced Networking with Mgmt server 7 Total time taken: 45954 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3806-t768-vmware-65u2.zip Intermittent failure detected: /marvin/tests/smoke/test_templates.py Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py Smoke tests completed. 78 look OK, 0 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
blueorangutan commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#issuecomment-574389283 Trillian test result (tid-770) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 30263 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3680-t770-kvm-centos7.zip Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_clusters.py Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_supported_versions.py Intermittent failure detected: /marvin/tests/smoke/test_pvlan.py Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py Smoke tests completed. 77 look OK, 3 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- ContextSuite context=TestKubernetesCluster>:setup | `Error` | 0.00 | test_kubernetes_clusters.py test_01_add_delete_kubernetes_supported_version | `Error` | 0.01 | test_kubernetes_supported_versions.py test_create_pvlan_network | `Error` | 0.03 | test_pvlan.py This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] weizhouapache commented on a change in pull request #3425: Better tracking host maintanence and handling of migration jobs
weizhouapache commented on a change in pull request #3425: Better tracking host maintanence and handling of migration jobs URL: https://github.com/apache/cloudstack/pull/3425#discussion_r366554730 ## File path: server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java ## @@ -101,9 +103,14 @@ * ha.retry.wait | time to wait before retrying the work item | seconds | 120 || || stop.retry.wait | time to wait * before retrying the stop | seconds | 120 || * } **/ -public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvailabilityManager, ClusterManagerListener { +public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvailabilityManager, ClusterManagerListener, Configurable { protected static final Logger s_logger = Logger.getLogger(HighAvailabilityManagerImpl.class); +private ConfigKey MaxRetries = new ConfigKey<>("Advanced", Integer.class, +"max.retries","5", Review comment: @anuragaw @rhtyd sorry I have some late comments as this PR has been merged. 1) max.retries is not used in the past so I suggest to rename it before 4.14 release. 2) this config has scope=Cluster but cluster-wide configuration is never used in code. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3808: reload dnsmasq instead of restart when adding new rules
blueorangutan commented on issue #3808: reload dnsmasq instead of restart when adding new rules URL: https://github.com/apache/cloudstack/pull/3808#issuecomment-574424096 Trillian test result (tid-769) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 49789 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3808-t769-kvm-centos7.zip Intermittent failure detected: /marvin/tests/smoke/test_internal_lb.py Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py Intermittent failure detected: /marvin/tests/smoke/test_routers_iptables_default_policy.py Intermittent failure detected: /marvin/tests/smoke/test_routers_network_ops.py Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py Intermittent failure detected: /marvin/tests/smoke/test_vpc_router_nics.py Intermittent failure detected: /marvin/tests/smoke/test_vpc_vpn.py Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py Smoke tests completed. 71 look OK, 7 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 | `Failure` | 306.83 | test_internal_lb.py test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 | `Failure` | 364.46 | test_internal_lb.py test_03_vpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 166.57 | test_internal_lb.py test_04_rvpc_internallb_haproxy_stats_on_all_interfaces | `Error` | 208.92 | test_internal_lb.py test_02_vpc_privategw_static_routes | `Failure` | 832.08 | test_privategw_acl.py test_03_vpc_privategw_restart_vpc_cleanup | `Failure` | 834.13 | test_privategw_acl.py test_01_single_VPC_iptables_policies | `Error` | 794.43 | test_routers_iptables_default_policy.py test_01_RVR_Network_FW_PF_SSH_default_routes_egress_true | `Failure` | 274.42 | test_routers_network_ops.py test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false | `Failure` | 273.40 | test_routers_network_ops.py test_02_redundant_VPC_default_routes | `Failure` | 970.13 | test_vpc_redundant.py test_05_rvpc_multi_tiers | `Failure` | 417.11 | test_vpc_redundant.py test_05_rvpc_multi_tiers | `Error` | 443.50 | test_vpc_redundant.py test_01_VPC_nics_after_destroy | `Failure` | 793.19 | test_vpc_router_nics.py test_02_VPC_default_routes | `Failure` | 793.00 | test_vpc_router_nics.py test_01_redundant_vpc_site2site_vpn | `Failure` | 407.08 | test_vpc_vpn.py test_01_vpc_site2site_vpn_multiple_options | `Error` | 287.54 | test_vpc_vpn.py test_01_vpc_site2site_vpn | `Error` | 328.60 | test_vpc_vpn.py This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] andrijapanicsb commented on issue #3808: reload dnsmasq instead of restart when adding new rules
andrijapanicsb commented on issue #3808: reload dnsmasq instead of restart when adding new rules URL: https://github.com/apache/cloudstack/pull/3808#issuecomment-574424926 @blueorangutan test This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3808: reload dnsmasq instead of restart when adding new rules
blueorangutan commented on issue #3808: reload dnsmasq instead of restart when adding new rules URL: https://github.com/apache/cloudstack/pull/3808#issuecomment-574425163 @andrijapanicsb 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 to 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] [cloudstack] blueorangutan commented on issue #3814: Add missing HA config keys (#3776)
blueorangutan commented on issue #3814: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3814#issuecomment-574443395 Trillian test result (tid-771) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 29028 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3814-t771-kvm-centos7.zip Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py Smoke tests completed. 78 look OK, 0 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] nvazquez commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
nvazquez commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#discussion_r366670739 ## File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/rolling/maintenance/RollingMaintenanceServiceExecutor.java ## @@ -0,0 +1,137 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package com.cloud.hypervisor.kvm.resource.rolling.maintenance; + +import com.cloud.utils.Pair; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.script.OutputInterpreter; +import com.cloud.utils.script.Script; +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.stream.Stream; + +public class RollingMaintenanceServiceExecutor extends RollingMaintenanceExecutorBase implements RollingMaintenanceExecutor { + +private static final String servicePrefix = "cloudstack-rolling-maintenance"; +private static final String resultsFileSuffix = "rolling-maintenance-results"; +private static final String outputFileSuffix = "rolling-maintenance-output"; + +private static final Logger s_logger = Logger.getLogger(RollingMaintenanceServiceExecutor.class); + +public RollingMaintenanceServiceExecutor(String hooksDir) { +super(hooksDir); +} + +/** + * Generate and return escaped instance name to use on systemd service invokation + */ +private String generateInstanceName(String stage, String file, String payload) { +String instanceName = String.format("%s,%s,%s,%s,%s", stage, file, getTimeout(), +getResultsFilePath(), getOutputFilePath()); +if (StringUtils.isNotBlank(payload)) { +instanceName += "," + payload; +} +return Script.runSimpleBashScript(String.format("systemd-escape '%s'", instanceName)); +} + +private String invokeService(String action, String stage, String file, String payload) { +s_logger.debug("Invoking rolling maintenance service for stage: " + stage + " and file " + file + " with action: " + action); +final OutputInterpreter.AllLinesParser parser = new OutputInterpreter.AllLinesParser(); +Script command = new Script("/bin/systemctl", s_logger); +command.add(action); +String service = servicePrefix + "@" + generateInstanceName(stage, file, payload); +command.add(service); +String result = command.execute(parser); +int exitValue = command.getExitValue(); +s_logger.trace("Execution: " + command.toString() + " - exit code: " + exitValue + +": " + result + (StringUtils.isNotBlank(parser.getLines()) ? parser.getLines() : "")); +return StringUtils.isBlank(result) ? parser.getLines().replace("\n", "") : result; Review comment: Thanks This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] nvazquez commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
nvazquez commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#discussion_r366670742 ## File path: api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHotsUpdatedResponse.java ## @@ -0,0 +1,73 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package org.apache.cloudstack.api.response; + +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + +public class RollingMaintenanceHotsUpdatedResponse extends BaseResponse { Review comment: Thanks, typo This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] nvazquez commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
nvazquez commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#discussion_r366670742 ## File path: api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHotsUpdatedResponse.java ## @@ -0,0 +1,73 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package org.apache.cloudstack.api.response; + +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + +public class RollingMaintenanceHotsUpdatedResponse extends BaseResponse { Review comment: Thanks, typo This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] nvazquez commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
nvazquez commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#discussion_r366670739 ## File path: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/rolling/maintenance/RollingMaintenanceServiceExecutor.java ## @@ -0,0 +1,137 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package com.cloud.hypervisor.kvm.resource.rolling.maintenance; + +import com.cloud.utils.Pair; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.script.OutputInterpreter; +import com.cloud.utils.script.Script; +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.stream.Stream; + +public class RollingMaintenanceServiceExecutor extends RollingMaintenanceExecutorBase implements RollingMaintenanceExecutor { + +private static final String servicePrefix = "cloudstack-rolling-maintenance"; +private static final String resultsFileSuffix = "rolling-maintenance-results"; +private static final String outputFileSuffix = "rolling-maintenance-output"; + +private static final Logger s_logger = Logger.getLogger(RollingMaintenanceServiceExecutor.class); + +public RollingMaintenanceServiceExecutor(String hooksDir) { +super(hooksDir); +} + +/** + * Generate and return escaped instance name to use on systemd service invokation + */ +private String generateInstanceName(String stage, String file, String payload) { +String instanceName = String.format("%s,%s,%s,%s,%s", stage, file, getTimeout(), +getResultsFilePath(), getOutputFilePath()); +if (StringUtils.isNotBlank(payload)) { +instanceName += "," + payload; +} +return Script.runSimpleBashScript(String.format("systemd-escape '%s'", instanceName)); +} + +private String invokeService(String action, String stage, String file, String payload) { +s_logger.debug("Invoking rolling maintenance service for stage: " + stage + " and file " + file + " with action: " + action); +final OutputInterpreter.AllLinesParser parser = new OutputInterpreter.AllLinesParser(); +Script command = new Script("/bin/systemctl", s_logger); +command.add(action); +String service = servicePrefix + "@" + generateInstanceName(stage, file, payload); +command.add(service); +String result = command.execute(parser); +int exitValue = command.getExitValue(); +s_logger.trace("Execution: " + command.toString() + " - exit code: " + exitValue + +": " + result + (StringUtils.isNotBlank(parser.getLines()) ? parser.getLines() : "")); +return StringUtils.isBlank(result) ? parser.getLines().replace("\n", "") : result; Review comment: Thanks This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] nvazquez commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance
nvazquez commented on a change in pull request #3610: [WIP DO NOT MERGE] KVM: Rolling maintenance URL: https://github.com/apache/cloudstack/pull/3610#discussion_r366676939 ## File path: api/src/main/java/com/cloud/resource/RollingMaintenanceManager.java ## @@ -0,0 +1,127 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package com.cloud.resource; + +import com.cloud.host.Host; +import com.cloud.utils.Pair; +import com.cloud.utils.exception.CloudRuntimeException; +import org.apache.cloudstack.api.command.admin.resource.StartRollingMaintenanceCmd; +import org.apache.cloudstack.framework.config.ConfigKey; +import org.apache.cloudstack.framework.config.Configurable; +import org.apache.commons.lang3.tuple.Triple; + +import java.util.Date; +import java.util.List; + +public interface RollingMaintenanceManager extends Configurable { Review comment: Would be nice to have but not adding it now as wasn't part of this feature scope. It however keeps track of the updated and skipped hosts but that information is retrieved when the process ends/fails This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router
blueorangutan commented on issue #3350: Get Diagnostics: Download logs and diagnostics data from SSVM, CPVM, Router URL: https://github.com/apache/cloudstack/pull/3350#issuecomment-574478070 Trillian test result (tid-772) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 34935 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3350-t772-kvm-centos7.zip Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py Smoke tests completed. 78 look OK, 0 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router
blueorangutan commented on issue #3575: [WIP DO NOT MERGE] Health check feature for virtual router URL: https://github.com/apache/cloudstack/pull/3575#issuecomment-574480416 Trillian test result (tid-773) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 33796 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3575-t773-kvm-centos7.zip Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py Intermittent failure detected: /marvin/tests/smoke/test_vpc_redundant.py Intermittent failure detected: /marvin/tests/smoke/test_host_maintenance.py Smoke tests completed. 78 look OK, 0 have error(s) Only failed tests results shown below: Test | Result | Time (s) | Test File --- | --- | --- | --- This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] shwstppr commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
shwstppr commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#issuecomment-574484024 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
blueorangutan commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#issuecomment-574484058 @shwstppr 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 to 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] [cloudstack] andrijapanicsb commented on issue #3810: Provided IP during VM deployment may not work in UI
andrijapanicsb commented on issue #3810: Provided IP during VM deployment may not work in UI URL: https://github.com/apache/cloudstack/issues/3810#issuecomment-574063715 Not an issue: ![image](https://user-images.githubusercontent.com/45762285/72327409-53b98580-36b1-11ea-8ffc-84e455f83f64.png) This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] andrijapanicsb closed issue #3810: Provided IP during VM deployment may not work in UI
andrijapanicsb closed issue #3810: Provided IP during VM deployment may not work in UI URL: https://github.com/apache/cloudstack/issues/3810 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] shwstppr commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
shwstppr commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#discussion_r366209535 ## File path: plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-master.yml ## @@ -0,0 +1,265 @@ +#cloud-config + +--- +ssh_authorized_keys: + {{ k8s.ssh.pub.key }} + +write-files: + - path: /etc/conf.d/nfs +permissions: '0644' +content: | + OPTS_RPC_MOUNTD="" + + - path: /etc/kubernetes/pki/cloudstack/ca.crt +permissions: '0644' +content: | + {{ k8s_master.ca.crt }} + + - path: /etc/kubernetes/pki/cloudstack/apiserver.crt +permissions: '0644' +content: | + {{ k8s_master.apiserver.crt }} + + - path: /etc/kubernetes/pki/cloudstack/apiserver.key +permissions: '0600' +content: | + {{ k8s_master.apiserver.key }} + + - path: /opt/bin/setup-kube-system +permissions: 0700 +owner: root:root +content: | + #!/bin/bash -e + + if [[ -f "/home/core/success" ]]; then + echo "Already provisioned!" + exit 0 + fi + + export PATH=$PATH:/opt/bin + + ISO_MOUNT_DIR=/mnt/k8sdisk + BINARIES_DIR=${ISO_MOUNT_DIR}/ + ATTEMPT_ONLINE_INSTALL=false + setup_complete=false + + OFFLINE_INSTALL_ATTEMPT_SLEEP=5 + MAX_OFFLINE_INSTALL_ATTEMPTS=36 + offline_attempts=1 + MAX_SETUP_CRUCIAL_CMD_ATTEMPTS=3 + crucial_cmd_attempts=1 + while true; do +if (( "$offline_attempts" > "$MAX_OFFLINE_INSTALL_ATTEMPTS" )); then + echo "Warning: Offline install timed out!" + break +fi +set +e +output=`blkid -o device -t TYPE=iso9660` +set -e +if [ "$output" != "" ]; then + while read -r line; do +if [ ! -d "${ISO_MOUNT_DIR}" ]; then + mkdir "${ISO_MOUNT_DIR}" +fi +retval=0 +set +e +mount -o ro "${line}" "${ISO_MOUNT_DIR}" +retval=$? +set -e +if [ $retval -eq 0 ]; then + if [ -d "$BINARIES_DIR" ]; then +break + else +umount "${line}" && rmdir "${ISO_MOUNT_DIR}" + fi +fi + done <<< "$output" +fi +if [ -d "$BINARIES_DIR" ]; then + break +fi +echo "Waiting for Binaries directory $BINARIES_DIR to be available, sleeping for $OFFLINE_INSTALL_ATTEMPT_SLEEP seconds, attempt: $offline_attempts" +sleep $OFFLINE_INSTALL_ATTEMPT_SLEEP +offline_attempts=$[$offline_attempts + 1] + done + + if [ -d "$BINARIES_DIR" ]; then +### Binaries available offline ### +echo "Installing binaries from ${BINARIES_DIR}" +mkdir -p /opt/cni/bin +tar -f "${BINARIES_DIR}/cni/cni-plugins-amd64.tgz" -C /opt/cni/bin -xz + +mkdir -p /opt/bin +tar -f "${BINARIES_DIR}/cri-tools/crictl-linux-amd64.tar.gz" -C /opt/bin -xz + +mkdir -p /opt/bin +cd /opt/bin +cp -a ${BINARIES_DIR}/k8s/{kubeadm,kubelet,kubectl} /opt/bin +chmod +x {kubeadm,kubelet,kubectl} + +sed "s:/usr/bin:/opt/bin:g" ${BINARIES_DIR}/kubelet.service > /etc/systemd/system/kubelet.service +mkdir -p /etc/systemd/system/kubelet.service.d +sed "s:/usr/bin:/opt/bin:g" ${BINARIES_DIR}/10-kubeadm.conf > /etc/systemd/system/kubelet.service.d/10-kubeadm.conf + +output=`ls ${BINARIES_DIR}/docker/` +if [ "$output" != "" ]; then + while read -r line; do +crucial_cmd_attempts=1 +while true; do + if (( "$crucial_cmd_attempts" > "$MAX_SETUP_CRUCIAL_CMD_ATTEMPTS" )); then +echo "Loading docker image ${BINARIES_DIR}/docker/$line failed!" +break; + fi + retval=0 + set +e + docker load < "${BINARIES_DIR}/docker/$line" + retval=$? + set -e + if [ $retval -eq 0 ]; then +break; + fi + crucial_cmd_attempts=$[$crucial_cmd_attempts + 1] +done + done <<< "$output" + setup_complete=true +fi +umount "${ISO_MOUNT_DIR}" && rmdir "${ISO_MOUNT_DIR}" + fi + if [ "$setup_complete" = false ] && [ "$ATTEMPT_ONLINE_INSTALL" = true ]; then +### Binaries not available offline ### +RELEASE="v1.16.3" +CNI_VERSION="v0.7.5" +CRICTL_VERSION="v1.16.0" +echo "Warning: ${BINARIES_DIR} not found. Will get binaries and docker images from Internet." +mkdir -p /opt/cni/bin +curl -L "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-amd64-${CNI_VERSION}.tgz; | tar -C /opt/cni/bin -xz + +mkdir -p /opt/bin +curl -L
[GitHub] [cloudstack] blueorangutan commented on issue #3601: [WIP] JDK11 support
blueorangutan commented on issue #3601: [WIP] JDK11 support URL: https://github.com/apache/cloudstack/pull/3601#issuecomment-574066934 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-587 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3553: [WIP] [DO NOT MERGE] CloudStack Backup & Recovery Framework
blueorangutan commented on issue #3553: [WIP] [DO NOT MERGE] CloudStack Backup & Recovery Framework URL: https://github.com/apache/cloudstack/pull/3553#issuecomment-574066933 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-588 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] Spaceman1984 commented on issue #3748: [WIP DO NOT MERGE] Systemvm template api
Spaceman1984 commented on issue #3748: [WIP DO NOT MERGE] Systemvm template api URL: https://github.com/apache/cloudstack/pull/3748#issuecomment-574066892 @blueorangutan package This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] shwstppr commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
shwstppr commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#discussion_r366210887 ## File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetescluster/KubernetesClusterManagerImpl.java ## @@ -0,0 +1,3061 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package com.cloud.kubernetescluster; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.lang.reflect.Field; +import java.math.BigInteger; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.MalformedURLException; +import java.net.Socket; +import java.net.URL; +import java.net.UnknownHostException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.acl.SecurityChecker; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.user.firewall.CreateFirewallRuleCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.CreateKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.DeleteKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.GetKubernetesClusterConfigCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.ListKubernetesClustersCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.ScaleKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.StartKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.StopKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.UpgradeKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.vm.StartVMCmd; +import org.apache.cloudstack.api.response.KubernetesClusterConfigResponse; +import org.apache.cloudstack.api.response.KubernetesClusterResponse; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.ca.CAManager; +import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.framework.ca.Certificate; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; +import org.apache.cloudstack.utils.security.CertUtils; +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.io.IOUtils; +import org.apache.log4j.Logger; + +import com.cloud.api.ApiDBUtils; +import com.cloud.api.query.dao.TemplateJoinDao; +import com.cloud.api.query.vo.TemplateJoinVO; +import com.cloud.capacity.CapacityManager; +import com.cloud.dc.ClusterDetailsDao; +import com.cloud.dc.ClusterDetailsVO; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.DataCenter; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.Pod; +import com.cloud.dc.Vlan; +import com.cloud.dc.VlanVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.dc.dao.VlanDao; +import
[GitHub] [cloudstack] shwstppr commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
shwstppr commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#discussion_r366210751 ## File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetescluster/KubernetesClusterManagerImpl.java ## @@ -0,0 +1,3061 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package com.cloud.kubernetescluster; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.lang.reflect.Field; +import java.math.BigInteger; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.MalformedURLException; +import java.net.Socket; +import java.net.URL; +import java.net.UnknownHostException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.acl.SecurityChecker; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.user.firewall.CreateFirewallRuleCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.CreateKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.DeleteKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.GetKubernetesClusterConfigCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.ListKubernetesClustersCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.ScaleKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.StartKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.StopKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.UpgradeKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.vm.StartVMCmd; +import org.apache.cloudstack.api.response.KubernetesClusterConfigResponse; +import org.apache.cloudstack.api.response.KubernetesClusterResponse; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.ca.CAManager; +import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.framework.ca.Certificate; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; +import org.apache.cloudstack.utils.security.CertUtils; +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.io.IOUtils; +import org.apache.log4j.Logger; + +import com.cloud.api.ApiDBUtils; +import com.cloud.api.query.dao.TemplateJoinDao; +import com.cloud.api.query.vo.TemplateJoinVO; +import com.cloud.capacity.CapacityManager; +import com.cloud.dc.ClusterDetailsDao; +import com.cloud.dc.ClusterDetailsVO; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.DataCenter; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.Pod; +import com.cloud.dc.Vlan; +import com.cloud.dc.VlanVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.dc.dao.VlanDao; +import
[GitHub] [cloudstack] shwstppr commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
shwstppr commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#discussion_r366210130 ## File path: server/src/main/java/com/cloud/network/IpAddressManagerImpl.java ## @@ -694,9 +694,23 @@ public PublicIp assignPublicIpAddressFromVlans(long dcId, Long podId, Account ow return fetchNewPublicIp(dcId, podId, vlanDbIds, owner, type, networkId, false, true, requestedIp, isSystem, null, null, false); } +@Override +public PublicIp getAvailablePublicIpAddressFromVlans(long dcId, Long podId, Account owner, VlanType type, List vlanDbIds, Long networkId, String requestedIp, boolean isSystem) +throws InsufficientAddressCapacityException { +return fetchNewPublicIp(dcId, podId, vlanDbIds, owner, type, networkId, false, false, false, requestedIp, isSystem, null, null, false); +} + +@DB +public PublicIp fetchNewPublicIp(final long dcId, final Long podId, final List vlanDbIds, final Account owner, final VlanType vlanUse, final Long guestNetworkId, + final boolean sourceNat, final boolean allocate, final String requestedIp, final boolean isSystem, final Long vpcId, final Boolean displayIp, final boolean forSystemVms) +throws InsufficientAddressCapacityException { +return fetchNewPublicIp(dcId, podId, vlanDbIds, owner, vlanUse, guestNetworkId, +sourceNat, true, allocate, requestedIp, isSystem, vpcId, displayIp, forSystemVms); +} + @DB public PublicIp fetchNewPublicIp(final long dcId, final Long podId, final List vlanDbIds, final Account owner, final VlanType vlanUse, final Long guestNetworkId, Review comment: @DaanHoogland factored out part of long method that was dealing with assigning and allocating DB entry This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] shwstppr commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
shwstppr commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#discussion_r366212502 ## File path: plugins/integrations/kubernetes-service/src/main/java/com/cloud/kubernetescluster/KubernetesClusterManagerImpl.java ## @@ -0,0 +1,3061 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// 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. +package com.cloud.kubernetescluster; + +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.lang.reflect.Field; +import java.math.BigInteger; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.MalformedURLException; +import java.net.Socket; +import java.net.URL; +import java.net.UnknownHostException; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.acl.SecurityChecker; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.user.firewall.CreateFirewallRuleCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.CreateKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.DeleteKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.GetKubernetesClusterConfigCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.ListKubernetesClustersCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.ScaleKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.StartKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.StopKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.kubernetescluster.UpgradeKubernetesClusterCmd; +import org.apache.cloudstack.api.command.user.vm.StartVMCmd; +import org.apache.cloudstack.api.response.KubernetesClusterConfigResponse; +import org.apache.cloudstack.api.response.KubernetesClusterResponse; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.ca.CAManager; +import org.apache.cloudstack.context.CallContext; +import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.framework.ca.Certificate; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.managed.context.ManagedContextRunnable; +import org.apache.cloudstack.utils.security.CertUtils; +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.io.IOUtils; +import org.apache.log4j.Logger; + +import com.cloud.api.ApiDBUtils; +import com.cloud.api.query.dao.TemplateJoinDao; +import com.cloud.api.query.vo.TemplateJoinVO; +import com.cloud.capacity.CapacityManager; +import com.cloud.dc.ClusterDetailsDao; +import com.cloud.dc.ClusterDetailsVO; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.DataCenter; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.Pod; +import com.cloud.dc.Vlan; +import com.cloud.dc.VlanVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.dc.dao.VlanDao; +import
[GitHub] [cloudstack] rhtyd commented on issue #3296: [master] noVNC Console Integration
rhtyd commented on issue #3296: [master] noVNC Console Integration URL: https://github.com/apache/cloudstack/pull/3296#issuecomment-574070564 Yes I think unfortunately we won't have time to stablise and include this for 4.14, there are also outstanding tasks on this PR such as to support/report the load on the CPVM. It's best to be attempted towards 4.15 that would ship with Primate and would be great if we can ship novnc with it. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] rhtyd commented on issue #3808: reload dnsmasq instead of restart when adding new rules
rhtyd commented on issue #3808: reload dnsmasq instead of restart when adding new rules URL: https://github.com/apache/cloudstack/pull/3808#issuecomment-574070120 I've tried this in the past, but then the issue was that dnsmasq doesn't read all the configs (changed files). @andrijapanicsb please test This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] shwstppr commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
shwstppr commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#issuecomment-574071752 @DaanHoogland I've addressed remaining comments regarding state transition and long method. Need your help on finding one remaining file with RAT license issue. SshHelper for generic Exception cannot be changed in this PR (will be too much of work) Will look into network, IP adress reported by @poussa This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] wido commented on issue #3195: Python 3 compatibility
wido commented on issue #3195: Python 3 compatibility URL: https://github.com/apache/cloudstack/issues/3195#issuecomment-574073496 @GabrielBrascher Has done work on this and he can comment on how far he got. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] pavanaravapalli commented on issue #3638: UEFI Support on CloudStack
pavanaravapalli commented on issue #3638: UEFI Support on CloudStack URL: https://github.com/apache/cloudstack/pull/3638#issuecomment-574073418 @andrijapanicsb thanks for pointing out. Conflicts resolved now. This is an automated message from the Apache Git Service. To respond to the message, please log on to 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.13 updated (54cc73a -> a574cb2)
This is an automated email from the ASF dual-hosted git repository. dahn pushed a change to branch 4.13 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from 54cc73a Add missing HA config keys (#3776) add 50fc045 Updating pom.xml version numbers for release 4.14.0.0-SNAPSHOT add 12f0ac6 Merge branch '4.13' into master add fbec3b3 Merge remote-tracking branch 'origin/4.13' add 8da0556 kvm/cloudstack-guest-tool: Tool to query Qemu Guest Agent (#3519) add c01ce7b2 Merge remote-tracking branch 'origin/4.13' add 89053c7 packaging: deprecate el6 and add 4.13-4.14 upgrade path (#3591) add 8170ec5 kvm: Logrotate should not touch agent.log (#3597) add 7f91964 refactoring: Remove duplicate code (by Frank/Nuage) (#3538) add 6cec7c7 allocator: in case of null guest OS don't fail prioritisation completely (#3607) add 899eab6 kvm/security_group: Make Security Group Python 3 compatible (#3589) add 666ec69 Merge remote-tracking branch 'origin/4.13' add 294813e Merge remote-tracking branch 'origin/4.13' add 9ee129a NioServer: retain links by address string to minimize resource leak (#3525) add 9258c7c Revert "9ee129ae6a08935645734ad520bec72bf5f22217" add 848860d security_group.py: fix NameError: name 'd' is not defined (#3641) add 2394fda Merge remote-tracking branch 'origin/4.13' add d3f199f Increase DHCP lease time to infinite (#3662) add 3b82aba .gitignore: ignore patches and unzipped logs (#3665) add afab9fb client: jetty session timeout set after server is started (#3658) add 4d7e95e kvm: Use 'ip' instead of 'brctl' (#3623) add b0e3fbe Merge remote-tracking branch 'origin/4.13' add 524b995 IoT/ARM64 support: allow cloudstack-agent on Raspberry Pi 4 (armv8) to use kvm acceleration (#3644) add a9b4da6 server: reduce verbosity of Async Job Manager log messages (#3616) add 7f5096a storage: don't select an SSVM that is removed (#3668) add 96d98de Merge remote-tracking branch 'origin/4.13' add c8681f5 ui: fix migrate host form no host popup (#3682) add c863cc2 add class cleanup method (#3632) add 4cce43f Add support for vSphere Web SDK 6.7 installation in install-non-oss.sh (#3650) add fc9a525 New BuildRequires for CentOS 7: python-setuptools (#3630) add 80abb5a Fix VR creation issue while creating VM on shared network using PVLAN (#3653) add 114df3d Forward merge apache/4.13 to master add 24db4d8 security_group.py: check cidr unstrictly to accept cidrs like 1.1.1.1/24 (#3701) add e1ccbfb debian: fix symlink issue post install/upgrade (#3695) add 3220705 setup: env config for dual zone simulator (#3696) add a65a931 ui: increase width of name field in UI (#3703) add e93f6bf utils: use iproute to get default network interface (#3704) add b8676ae Merge release branch 4.13 to master add 2427114 a conditional to prevent creation of a field (#3723) add f30b5ce Fix resource count of expunged volume (#3669) add 828405d Merge branch '4.13' add e56fa31 ssh: Add support for ecdsa and ed25519 public keys (#3740) add 6f3694c server: save SSH.PublicKey into user_vm_details regardless of password management (#3745) add 7a86ca7 ui: show memory usage in VM statistics (#3474) add 29e1bbc server: rethrow takeVMSnapshot() exception instead of returning null (#3546) add 93aad24 storage: Handle RBD snapshot deletion (#3615) add 0d92b92 Fix OS category for some OS-es added in 4.13 (#3746) add da62cec README: that time of the year! (#3769) add 2e8c069 Load Average for KVM (#3738) add 16527f1 Add missing HA config keys (#3737) add a0efbf9 Fix virtual template size for managed storage for KVM / refactor cloud-install-sys-tmplt (#3371) add e319c8b Revert "Fix virtual template size for managed storage for KVM / refactor cloud-install-sys-tmplt (#3371)" (#3771) add cf6e616 Revert "Add missing HA config keys (#3737)" (#3774) add 4b43c26 Better tracking host maintanence and handling of migration jobs (#3425) add 45503e1 Revert "Revert "Fix virtual template size for managed storage for KVM / refactor cloud-install-sys-tmplt (#3371)" (#3771)" (#3772) add 0606039 Honour promiscuous mode from networkOffering (#3765) (#3781) add 482d0fd 4.13 (#3782) add 06e1212 Merge release branch 4.13 to master add 482e7eb New feature: Acquire specific public IP for network (#3775) add 4fa7fad Merge release branch 4.13 to master add d55a2af Bug fix: Dont display empty item in free ip list (#3790) add 809561a Merge release branch 4.13 to master add 74f5632 Merge release branch 4.13 to master add d868cd1 Simulator: Better VR Redundant Status Behaviour (#3313) add 8a55c93 Extract systemvm.iso using bsdtar (#3536) add 6e19c17 Merge release branch 4.13
[GitHub] [cloudstack] blueorangutan commented on issue #3748: [WIP DO NOT MERGE] Systemvm template api
blueorangutan commented on issue #3748: [WIP DO NOT MERGE] Systemvm template api URL: https://github.com/apache/cloudstack/pull/3748#issuecomment-574075087 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-589 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] wido commented on issue #3624: Redfish support for Host HA (Out of Band)
wido commented on issue #3624: Redfish support for Host HA (Out of Band) URL: https://github.com/apache/cloudstack/issues/3624#issuecomment-574074758 Work is in progress here. @GabrielBrascher has been writing a lot of code: https://github.com/PCextreme/cloudstack/commits/redfish-oob-driver This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3808: reload dnsmasq instead of restart when adding new rules
blueorangutan commented on issue #3808: reload dnsmasq instead of restart when adding new rules URL: https://github.com/apache/cloudstack/pull/3808#issuecomment-574076210 @andrijapanicsb 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 to 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] [cloudstack] andrijapanicsb commented on issue #3808: reload dnsmasq instead of restart when adding new rules
andrijapanicsb commented on issue #3808: reload dnsmasq instead of restart when adding new rules URL: https://github.com/apache/cloudstack/pull/3808#issuecomment-574076092 @blueorangutan test This is an automated message from the Apache Git Service. To respond to the message, please log on to 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.13 updated: Add missing HA config keys (#3776)
This is an automated email from the ASF dual-hosted git repository. dahn pushed a commit to branch 4.13 in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/4.13 by this push: new 54cc73a Add missing HA config keys (#3776) 54cc73a is described below commit 54cc73af08f66e2ddd0de1fc717addd95dc24b37 Author: mdominka <5072+mdomi...@users.noreply.github.com> AuthorDate: Tue Jan 14 09:35:34 2020 +0100 Add missing HA config keys (#3776) --- .../java/com/cloud/ha/HighAvailabilityManager.java | 46 +- .../main/java/com/cloud/configuration/Config.java | 43 + .../configuration/ConfigurationManagerImpl.java| 174 ++--- .../com/cloud/ha/HighAvailabilityManagerImpl.java | 109 ++--- .../main/java/com/cloud/test/DatabaseConfig.java | 59 +++ 5 files changed, 219 insertions(+), 212 deletions(-) diff --git a/engine/components-api/src/main/java/com/cloud/ha/HighAvailabilityManager.java b/engine/components-api/src/main/java/com/cloud/ha/HighAvailabilityManager.java index ecfb6f6..0894a0b 100644 --- a/engine/components-api/src/main/java/com/cloud/ha/HighAvailabilityManager.java +++ b/engine/components-api/src/main/java/com/cloud/ha/HighAvailabilityManager.java @@ -16,18 +16,62 @@ // under the License. package com.cloud.ha; -import java.util.List; +import static org.apache.cloudstack.framework.config.ConfigKey.Scope.Cluster; import com.cloud.deploy.DeploymentPlanner; import com.cloud.host.HostVO; import com.cloud.host.Status; import com.cloud.utils.component.Manager; import com.cloud.vm.VMInstanceVO; +import org.apache.cloudstack.framework.config.ConfigKey; + +import java.util.List; /** * HighAvailabilityManager checks to make sure the VMs are running fine. */ public interface HighAvailabilityManager extends Manager { + +ConfigKey ForceHA = new ConfigKey<>("Advanced", Boolean.class, "force.ha", "false", +"Force High-Availability to happen even if the VM says no.", true, Cluster); + +ConfigKey HAWorkers = new ConfigKey<>("Advanced", Integer.class, "ha.workers", "5", +"The number of High-Availability worker threads.", true, Cluster); + +ConfigKey InvestigateRetryInterval = new ConfigKey<>("Advanced", Integer.class, "investigate.retry.interval", +"60", "The time (in seconds) between VM pings when the agent is disconnected.", true, Cluster); + +ConfigKey MigrateRetryInterval = new ConfigKey<>("Advanced", Integer.class, "migrate.retry.interval", +"120", "The time (in seconds) between migration retries.", true, Cluster); + +ConfigKey RestartRetryInterval = new ConfigKey<>("Advanced", Integer.class, "restart.retry.interval", +"600", "The time (in seconds) between retries to restart a VM.", true, Cluster); + +ConfigKey StopRetryInterval = new ConfigKey<>("Advanced", Integer.class, "stop.retry.interval", +"600", "The time in seconds between retries to stop or destroy a VM.", true, Cluster); + +ConfigKey TimeBetweenCleanup = new ConfigKey<>("Advanced", Long.class, +"time.between.cleanup", "86400", "The time in seconds to wait before the" ++ " cleanup thread runs for the different HA-Worker-Threads. The cleanup thread finds all the work items " ++ "that were successful and is now ready to be purged from the the database (table: op_ha_work).", +true, Cluster); + +ConfigKey MaxRetries = new ConfigKey<>("Advanced", Integer.class, "max.retries", +"5", "The number of times to try a restart for the different Work-Types: " ++ "Migrating - VMs off of a host, Destroy - a VM, Stop - a VM for storage pool migration purposes," ++ " CheckStop - checks if a VM has been stopped, ForceStop - force a VM to stop even if the " ++ "states don't allow it, Destroy - a VM and HA - restart a VM.", true, Cluster); + +ConfigKey TimeToSleep = new ConfigKey<>("Advanced", Long.class, "time.to.sleep", +"60", "The time in seconds to sleep before checking the database (table: op_ha_work) " ++ "for new working types (Migration, Stop, CheckStop, ForceStop, Destroy and HA), if no work items are found.", +true, Cluster); + +ConfigKey TimeBetweenFailures = new ConfigKey<>("Advanced", Long.class, +"time.between.failures", "3600", "The time in seconds before try to cleanup all the VMs" ++ " which are registered for the HA event that were successful and are now ready to be purged.", +true, Cluster); + public enum WorkType { Migration, // Migrating VMs off of a host. Stop, // Stops a VM for storage pool migration purposes. This should be obsolete now. diff --git a/server/src/main/java/com/cloud/configuration/Config.java b/server/src/main/java/com/cloud/configuration/Config.java index 1aad66d..3daf720 100644 --- a/server/src/main/java/com/cloud/configuration/Config.java +++
[GitHub] [cloudstack] DaanHoogland merged pull request #3776: Add missing HA config keys
DaanHoogland merged pull request #3776: Add missing HA config keys URL: https://github.com/apache/cloudstack/pull/3776 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] blueorangutan commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
blueorangutan commented on issue #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#issuecomment-574063412 Packaging result: ✖centos6 ✔centos7 ✔debian. JID-586 This is an automated message from the Apache Git Service. To respond to the message, please log on to 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] [cloudstack] poussa commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service
poussa commented on a change in pull request #3680: [WIP: DO NOT MERGE] CloudStack Kubernetes Service URL: https://github.com/apache/cloudstack/pull/3680#discussion_r366208602 ## File path: plugins/integrations/kubernetes-service/src/main/resources/conf/k8s-master.yml ## @@ -0,0 +1,265 @@ +#cloud-config + +--- +ssh_authorized_keys: + {{ k8s.ssh.pub.key }} + +write-files: + - path: /etc/conf.d/nfs +permissions: '0644' +content: | + OPTS_RPC_MOUNTD="" + + - path: /etc/kubernetes/pki/cloudstack/ca.crt +permissions: '0644' +content: | + {{ k8s_master.ca.crt }} + + - path: /etc/kubernetes/pki/cloudstack/apiserver.crt +permissions: '0644' +content: | + {{ k8s_master.apiserver.crt }} + + - path: /etc/kubernetes/pki/cloudstack/apiserver.key +permissions: '0600' +content: | + {{ k8s_master.apiserver.key }} + + - path: /opt/bin/setup-kube-system +permissions: 0700 +owner: root:root +content: | + #!/bin/bash -e + + if [[ -f "/home/core/success" ]]; then + echo "Already provisioned!" + exit 0 + fi + + export PATH=$PATH:/opt/bin + + ISO_MOUNT_DIR=/mnt/k8sdisk + BINARIES_DIR=${ISO_MOUNT_DIR}/ + ATTEMPT_ONLINE_INSTALL=false + setup_complete=false + + OFFLINE_INSTALL_ATTEMPT_SLEEP=5 + MAX_OFFLINE_INSTALL_ATTEMPTS=36 + offline_attempts=1 + MAX_SETUP_CRUCIAL_CMD_ATTEMPTS=3 + crucial_cmd_attempts=1 + while true; do +if (( "$offline_attempts" > "$MAX_OFFLINE_INSTALL_ATTEMPTS" )); then + echo "Warning: Offline install timed out!" + break +fi +set +e +output=`blkid -o device -t TYPE=iso9660` +set -e +if [ "$output" != "" ]; then + while read -r line; do +if [ ! -d "${ISO_MOUNT_DIR}" ]; then + mkdir "${ISO_MOUNT_DIR}" +fi +retval=0 +set +e +mount -o ro "${line}" "${ISO_MOUNT_DIR}" +retval=$? +set -e +if [ $retval -eq 0 ]; then + if [ -d "$BINARIES_DIR" ]; then +break + else +umount "${line}" && rmdir "${ISO_MOUNT_DIR}" + fi +fi + done <<< "$output" +fi +if [ -d "$BINARIES_DIR" ]; then + break +fi +echo "Waiting for Binaries directory $BINARIES_DIR to be available, sleeping for $OFFLINE_INSTALL_ATTEMPT_SLEEP seconds, attempt: $offline_attempts" +sleep $OFFLINE_INSTALL_ATTEMPT_SLEEP +offline_attempts=$[$offline_attempts + 1] + done + + if [ -d "$BINARIES_DIR" ]; then +### Binaries available offline ### +echo "Installing binaries from ${BINARIES_DIR}" +mkdir -p /opt/cni/bin +tar -f "${BINARIES_DIR}/cni/cni-plugins-amd64.tgz" -C /opt/cni/bin -xz + +mkdir -p /opt/bin +tar -f "${BINARIES_DIR}/cri-tools/crictl-linux-amd64.tar.gz" -C /opt/bin -xz + +mkdir -p /opt/bin +cd /opt/bin +cp -a ${BINARIES_DIR}/k8s/{kubeadm,kubelet,kubectl} /opt/bin +chmod +x {kubeadm,kubelet,kubectl} + +sed "s:/usr/bin:/opt/bin:g" ${BINARIES_DIR}/kubelet.service > /etc/systemd/system/kubelet.service +mkdir -p /etc/systemd/system/kubelet.service.d +sed "s:/usr/bin:/opt/bin:g" ${BINARIES_DIR}/10-kubeadm.conf > /etc/systemd/system/kubelet.service.d/10-kubeadm.conf + +output=`ls ${BINARIES_DIR}/docker/` +if [ "$output" != "" ]; then + while read -r line; do +crucial_cmd_attempts=1 +while true; do + if (( "$crucial_cmd_attempts" > "$MAX_SETUP_CRUCIAL_CMD_ATTEMPTS" )); then +echo "Loading docker image ${BINARIES_DIR}/docker/$line failed!" +break; + fi + retval=0 + set +e + docker load < "${BINARIES_DIR}/docker/$line" + retval=$? + set -e + if [ $retval -eq 0 ]; then +break; + fi + crucial_cmd_attempts=$[$crucial_cmd_attempts + 1] +done + done <<< "$output" + setup_complete=true +fi +umount "${ISO_MOUNT_DIR}" && rmdir "${ISO_MOUNT_DIR}" + fi + if [ "$setup_complete" = false ] && [ "$ATTEMPT_ONLINE_INSTALL" = true ]; then +### Binaries not available offline ### +RELEASE="v1.16.3" +CNI_VERSION="v0.7.5" +CRICTL_VERSION="v1.16.0" +echo "Warning: ${BINARIES_DIR} not found. Will get binaries and docker images from Internet." +mkdir -p /opt/cni/bin +curl -L "https://github.com/containernetworking/plugins/releases/download/${CNI_VERSION}/cni-plugins-amd64-${CNI_VERSION}.tgz; | tar -C /opt/cni/bin -xz + +mkdir -p /opt/bin +curl -L
[GitHub] [cloudstack] DaanHoogland opened a new pull request #3811: Add missing HA config keys (#3776)
DaanHoogland opened a new pull request #3811: Add missing HA config keys (#3776) URL: https://github.com/apache/cloudstack/pull/3811 ## Description fwd-merge failed due to no visible conflict. creating this to try and fix ## 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) - [ ] 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? This is an automated message from the Apache Git Service. To respond to the message, please log on to 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