svn commit: r52361 - /dev/cloudstack/terraform-provider-0.4.0/ /release/cloudstack/releases/terraform-provider-0.4.0/
Author: gabriel Date: Wed Feb 2 11:09:00 2022 New Revision: 52361 Log: Publishing CloudStack Terraform Provider 0.4.0 release Added: release/cloudstack/releases/terraform-provider-0.4.0/ - copied from r52360, dev/cloudstack/terraform-provider-0.4.0/ Removed: dev/cloudstack/terraform-provider-0.4.0/
[cloudstack-www] branch remove-irc-reference updated (80da681 -> b6e7942)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch remove-irc-reference in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git. discard 80da681 Remove IRC reference as it is no longer used add b6e7942 Remove IRC reference as it is no longer used This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (80da681) \ N -- N -- N refs/heads/remove-irc-reference (b6e7942) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omit" are not gone; other references still refer to them. Any revisions marked "discard" are gone forever. No new revisions were added by this update. Summary of changes: source/contribute.html.markdown | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-)
[cloudstack-www] branch remove-irc-reference created (now 80da681)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch remove-irc-reference in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git. at 80da681 Remove IRC reference as it is no longer used This branch includes the following new commits: new 80da681 Remove IRC reference as it is no longer used 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-www] 01/01: Remove IRC reference as it is no longer used
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch remove-irc-reference in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git commit 80da681fd0e739348bf53a74ab6232a718367bb0 Author: Gabriel Brascher AuthorDate: Mon Mar 29 16:31:45 2021 -0300 Remove IRC reference as it is no longer used --- source/contribute.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/contribute.html.markdown b/source/contribute.html.markdown index d15d710..afaf8b7 100644 --- a/source/contribute.html.markdown +++ b/source/contribute.html.markdown @@ -26,7 +26,7 @@ If you just want to report a bug, that's easily done in our [github project issu ## Where To Ask For Help -Need some help getting started? Feel free to ask on the [mailing list](/mailing-lists.html) or find us on one of the following IRC channels on irc.freenode.net: +Need some help getting started? Feel free to ask on the [mailing list](/mailing-lists.html): * \#cloudstack - General Apache CloudStack conversation and end user support * \#cloudstack-dev - Development discussions
[cloudstack] branch marvin3 updated (e421f37 -> fe27c61)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch marvin3 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from e421f37 explicit install python2 add fe27c61 Remove unnecessary mysql-connector-python installation with hardcoded version No new revisions were added by this update. Summary of changes: debian/cloudstack-marvin.postinst | 1 - 1 file changed, 1 deletion(-)
[cloudstack] branch marvin3 updated (c014192 -> d45e3c2)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch marvin3 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from c014192 double python install add d45e3c2 Fix issue at cloudstack-marvin.postinst by making it 'python3 -m pip install' No new revisions were added by this update. Summary of changes: debian/cloudstack-marvin.postinst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
[cloudstack] branch python3-vr updated (12b2a2f -> eb2ae84)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from 12b2a2f ip to net address conversions add eb2ae84 pip3 install pycodestyle No new revisions were added by this update. Summary of changes: systemvm/test/runtests.sh | 4 tools/travis/before_install.sh | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-)
[cloudstack] 09/12: read files in vr as list(byte[])
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit e7ba52ab4b5d1641de53cd5e5faa0fa2564cc032 Author: Daan Hoogland AuthorDate: Tue Mar 9 17:51:01 2021 +0100 read files in vr as list(byte[]) --- systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py b/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py index 1679970..31112ff 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py @@ -87,11 +87,11 @@ class CsNetfilters(object): def get_all_rules(self): for i in CsHelper.execute("iptables-save"): -if i.startswith('*'): # Table +if i.startswith(b'*'): # Table self.table.add(i[1:]) -if i.startswith(':'): # Chain +if i.startswith(b':'): # Chain self.chain.add(self.table.last(), i[1:].split(' ')[0]) -if i.startswith('-A'): # Rule +if i.startswith(b'-A'): # Rule self.chain.add_rule(i.split()[1]) rule = CsNetfilter() rule.parse(i)
[cloudstack] 01/12: Make Virtual Router '.py' scripts Python3 compatible
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit ab0118064494a57d58845a3289ec326778372c53 Author: Gabriel Brascher AuthorDate: Fri Jul 24 09:02:58 2020 -0300 Make Virtual Router '.py' scripts Python3 compatible --- systemvm/debian/opt/cloud/bin/configure.py | 69 +++--- systemvm/debian/opt/cloud/bin/cs/CsAddress.py | 32 +- systemvm/debian/opt/cloud/bin/cs/CsApp.py | 5 +- systemvm/debian/opt/cloud/bin/cs/CsConfig.py | 4 +- systemvm/debian/opt/cloud/bin/cs/CsDatabag.py | 2 +- systemvm/debian/opt/cloud/bin/cs/CsDhcp.py | 8 +-- systemvm/debian/opt/cloud/bin/cs/CsFile.py | 4 +- systemvm/debian/opt/cloud/bin/cs/CsGuestNetwork.py | 4 +- systemvm/debian/opt/cloud/bin/cs/CsHelper.py | 6 +- systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py | 10 ++-- systemvm/debian/opt/cloud/bin/cs/CsMonitor.py | 8 +-- systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py| 20 +++ systemvm/debian/opt/cloud/bin/cs/CsProcess.py | 11 ++-- systemvm/debian/opt/cloud/bin/cs/CsRedundant.py| 22 +++ systemvm/debian/opt/cloud/bin/cs/CsRoute.py| 6 +- systemvm/debian/opt/cloud/bin/cs/CsRule.py | 4 +- systemvm/debian/opt/cloud/bin/cs/CsStaticRoutes.py | 6 +- systemvm/debian/opt/cloud/bin/cs_dhcp.py | 4 +- systemvm/debian/opt/cloud/bin/cs_firewallrules.py | 4 +- .../debian/opt/cloud/bin/cs_forwardingrules.py | 8 +-- systemvm/debian/opt/cloud/bin/cs_guestnetwork.py | 4 +- systemvm/debian/opt/cloud/bin/cs_ip.py | 12 ++-- systemvm/debian/opt/cloud/bin/cs_monitorservice.py | 2 +- systemvm/debian/opt/cloud/bin/cs_network_acl.py| 2 +- .../debian/opt/cloud/bin/cs_remoteaccessvpn.py | 2 +- systemvm/debian/opt/cloud/bin/cs_site2sitevpn.py | 2 +- systemvm/debian/opt/cloud/bin/cs_vmp.py| 2 +- systemvm/debian/opt/cloud/bin/cs_vpnusers.py | 10 ++-- systemvm/debian/opt/cloud/bin/diagnostics.py | 2 +- .../debian/opt/cloud/bin/get_diagnostics_files.py | 4 +- systemvm/debian/opt/cloud/bin/merge.py | 6 +- systemvm/debian/opt/cloud/bin/passwd_server_ip.py | 16 ++--- systemvm/debian/opt/cloud/bin/update_config.py | 4 +- systemvm/debian/opt/cloud/bin/vmdata.py| 22 +++ .../debian/root/health_checks/cpu_usage_check.py | 16 ++--- systemvm/debian/root/health_checks/dhcp_check.py | 10 ++-- .../debian/root/health_checks/disk_space_check.py | 10 ++-- systemvm/debian/root/health_checks/dns_check.py| 10 ++-- .../debian/root/health_checks/gateways_check.py| 12 ++-- .../debian/root/health_checks/haproxy_check.py | 26 .../debian/root/health_checks/iptables_check.py| 10 ++-- .../root/health_checks/memory_usage_check.py | 18 +++--- .../root/health_checks/router_version_check.py | 25 .../debian/root/health_checks/utility/__init__.py | 4 +- systemvm/debian/root/monitorServices.py| 12 ++-- systemvm/test/runtests.sh | 7 +++ 46 files changed, 250 insertions(+), 237 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/configure.py b/systemvm/debian/opt/cloud/bin/configure.py index be67f40..5378180 100755 --- a/systemvm/debian/opt/cloud/bin/configure.py +++ b/systemvm/debian/opt/cloud/bin/configure.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # -- coding: utf-8 -- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file @@ -21,8 +21,9 @@ import logging import os import re import sys -import urllib -import urllib2 +from urllib.request import * +from urllib.parse import * +from urllib.error import * import time from collections import OrderedDict @@ -77,10 +78,10 @@ class CsPassword(CsDataBag): if proc.find(): url = "http://%s:8080/; % server_ip payload = {"ip": vm_ip, "password": password, "token": token} -data = urllib.urlencode(payload) -request = urllib2.Request(url, data=data, headers={"DomU_Request": "save_password"}) +data = urllib.parse.urlencode(payload) +request = urllib.request.Request(url, data=data, headers={"DomU_Request": "save_password"}) try: -resp = urllib2.urlopen(request, data) +resp = urlopen(request, data) logging.debug("Update password server result: http:%s, content:%s" % (resp.code, resp.read())) except Exception as e: logging.error("Failed to update password server due to: %s" % e) @@ -135,15 +136,15 @@ class CsAcl(CsDa
[cloudstack] 02/12: Fix pycodestyle 'errors'
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 1a9402d568a80afbd96cff53344e96f634d824a3 Author: Gabriel Brascher AuthorDate: Mon Aug 10 11:30:49 2020 -0300 Fix pycodestyle 'errors' --- systemvm/debian/root/health_checks/memory_usage_check.py | 6 +++--- systemvm/debian/root/health_checks/router_version_check.py | 10 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/systemvm/debian/root/health_checks/memory_usage_check.py b/systemvm/debian/root/health_checks/memory_usage_check.py index 20b5653..08b73df 100644 --- a/systemvm/debian/root/health_checks/memory_usage_check.py +++ b/systemvm/debian/root/health_checks/memory_usage_check.py @@ -28,7 +28,7 @@ def main(): data = entries[0] if "maxMemoryUsage" not in data: -print("Missing maxMemoryUsage in health_checks_data " + \ +print("Missing maxMemoryUsage in health_checks_data " + "systemThresholds, skipping") exit(0) @@ -39,10 +39,10 @@ def main(): if pout.wait() == 0: currentUsage = float(pout.communicate()[0].strip()) if currentUsage > maxMemoryUsage: -print("Memory Usage " + str(currentUsage) + \ +print("Memory Usage " + str(currentUsage) + "% has crossed threshold of " + str(maxMemoryUsage) + "%") exit(1) -print("Memory Usage within limits with current at " + \ +print("Memory Usage within limits with current at " + str(currentUsage) + "%") exit(0) else: diff --git a/systemvm/debian/root/health_checks/router_version_check.py b/systemvm/debian/root/health_checks/router_version_check.py index b65aca4..3ab33fe 100644 --- a/systemvm/debian/root/health_checks/router_version_check.py +++ b/systemvm/debian/root/health_checks/router_version_check.py @@ -53,10 +53,10 @@ def main(): releaseFile = "/etc/cloudstack-release" found = getFirstLine(releaseFile) if found is None: -print("Release version not yet setup at " + releaseFile +\ +print("Release version not yet setup at " + releaseFile + ", skipping.") elif expected != found: -print("Template Version mismatch. Expected: " + \ +print("Template Version mismatch. Expected: " + expected + ", found: " + found) templateVersionMatches = False @@ -65,11 +65,11 @@ def main(): sigFile = "/var/cache/cloud/cloud-scripts-signature" found = getFirstLine(sigFile) if found is None: -print("Scripts signature is not yet setup at " + sigFile +\ +print("Scripts signature is not yet setup at " + sigFile + ", skipping") if expected != found: -print("Scripts Version mismatch. Expected: " + \ - expected + ", found: " + found) +print("Scripts Version mismatch. Expected: " + expected + + ", found: " + found) scriptVersionMatches = False if templateVersionMatches and scriptVersionMatches:
[cloudstack] 11/12: byte as separator on byte[]
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit a9043dccaa0cf98d28a882f36a8bceb7a211f548 Author: Daan Hoogland AuthorDate: Wed Mar 10 16:12:26 2021 +0100 byte as separator on byte[] --- systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py b/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py index 31112ff..931b932 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py @@ -90,7 +90,7 @@ class CsNetfilters(object): if i.startswith(b'*'): # Table self.table.add(i[1:]) if i.startswith(b':'): # Chain -self.chain.add(self.table.last(), i[1:].split(' ')[0]) +self.chain.add(self.table.last(), i[1:].split(b' ')[0]) if i.startswith(b'-A'): # Rule self.chain.add_rule(i.split()[1]) rule = CsNetfilter()
[cloudstack] 12/12: ip to net address conversions
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 12b2a2f4f35afdf60def6b4418975d96685ab464 Author: Daan Hoogland AuthorDate: Wed Mar 10 17:01:35 2021 +0100 ip to net address conversions --- systemvm/debian/opt/cloud/bin/cs/CsAddress.py | 4 +++- systemvm/debian/opt/cloud/bin/cs/CsHelper.py | 2 +- systemvm/debian/opt/cloud/bin/cs_ip.py| 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py index 8f688d7..512734c 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsAddress.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsAddress.py @@ -149,7 +149,9 @@ class CsInterface: def ip_in_subnet(self, ip): ipo = ip_address(ip) -net = ip_network("%s/%s" % (self.get_ip(), self.get_size())) +# we are using an ip as netaddress so strict must be False +net = ip_network("%s/%s" % (self.get_ip(), self.get_size()), + strict=False) return ipo in net def get_gateway_cidr(self): diff --git a/systemvm/debian/opt/cloud/bin/cs/CsHelper.py b/systemvm/debian/opt/cloud/bin/cs/CsHelper.py index c818c39..1809170 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsHelper.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsHelper.py @@ -119,7 +119,7 @@ def get_device_info(): to = {} to['ip'] = vals[1] to['dev'] = vals[-1] -to['network'] = ip_network(to['ip']) +to['network'] = ip_network(to['ip'], strict=False) to['dnsmasq'] = False list.append(to) return list diff --git a/systemvm/debian/opt/cloud/bin/cs_ip.py b/systemvm/debian/opt/cloud/bin/cs_ip.py index 5a9f275..cb6541b 100755 --- a/systemvm/debian/opt/cloud/bin/cs_ip.py +++ b/systemvm/debian/opt/cloud/bin/cs_ip.py @@ -42,7 +42,9 @@ def merge(dbag, ip): nic_dev_id = address['nic_dev_id'] dbag[dev].remove(address) -ipo = ip_network(ip['public_ip'] + '/' + ip['netmask']) +# we are passing and must allow for host bits so strict is False +ipo = ip_network(ip['public_ip'] + '/' + ip['netmask'], + strict=False) if 'nic_dev_id' in ip: nic_dev_id = ip['nic_dev_id'] if 'vif_mac_address' in ip:
[cloudstack] 06/12: replace mock with unittest.mock
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit de248a629bcea8ff6bab4b5fb8186c2cc51d2244 Author: Daan Hoogland AuthorDate: Thu Feb 25 10:20:54 2021 +0100 replace mock with unittest.mock --- systemvm/test/TestCsDhcp.py | 2 +- systemvm/test/TestCsHelper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/systemvm/test/TestCsDhcp.py b/systemvm/test/TestCsDhcp.py index 339fc6a..8a176fe 100644 --- a/systemvm/test/TestCsDhcp.py +++ b/systemvm/test/TestCsDhcp.py @@ -16,7 +16,7 @@ # under the License. import unittest -import mock +from unittest import mock from cs.CsDhcp import CsDhcp from cs import CsHelper import merge diff --git a/systemvm/test/TestCsHelper.py b/systemvm/test/TestCsHelper.py index c3be13c..515a9a1 100644 --- a/systemvm/test/TestCsHelper.py +++ b/systemvm/test/TestCsHelper.py @@ -16,7 +16,7 @@ # under the License. import unittest -import mock +from unittest import mock from cs import CsHelper import merge
[cloudstack] branch python3-vr created (now 12b2a2f)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at 12b2a2f ip to net address conversions This branch includes the following new commits: new ab01180 Make Virtual Router '.py' scripts Python3 compatible new 1a9402d Fix pycodestyle 'errors' new 6b2330b Fix conflict with master new 3a7a4f6 Change Pylint to Pylint3 new 4604d47 Fix indentation issues and use python3 when running pycodestyle checker new de248a6 replace mock with unittest.mock new e3c8b34 pylint issues new 20288b2 str f'ormat' new e7ba52a read files in vr as list(byte[]) new f151e7b write as byte[] new a9043dc byte as separator on byte[] new 12b2a2f ip to net address conversions The 12 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] 10/12: write as byte[]
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit f151e7b543b6cb959f34c7ff75a330d80deeb524 Author: Daan Hoogland AuthorDate: Tue Mar 9 17:54:05 2021 +0100 write as byte[] --- systemvm/debian/opt/cloud/bin/get_diagnostics_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/get_diagnostics_files.py b/systemvm/debian/opt/cloud/bin/get_diagnostics_files.py index 3b3e9d1..8790821 100755 --- a/systemvm/debian/opt/cloud/bin/get_diagnostics_files.py +++ b/systemvm/debian/opt/cloud/bin/get_diagnostics_files.py @@ -129,9 +129,9 @@ def generate_retrieved_files_txt(zip_file, files_found, files_not_found): try: with open(output_file, 'wb', 0) as man: for i in files_found: -man.write(i + '\n') +man.write(i + b'\n') for j in files_not_found: -man.write(j + 'File Not Found!!\n') +man.write(j + b' File Not Found!!\n') zip_file.write(output_file, output_file) finally: cleanup_cmd = "rm -f %s" % output_file
[cloudstack] 04/12: Change Pylint to Pylint3
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 3a7a4f672d69dda6d8646597817a29974a197e7c Author: Gabriel Brascher AuthorDate: Sat Sep 26 01:23:50 2020 -0300 Change Pylint to Pylint3 --- systemvm/test/runtests.sh | 4 tools/travis/before_install.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/systemvm/test/runtests.sh b/systemvm/test/runtests.sh old mode 100644 new mode 100755 index b4fb5a1..9646b54 --- a/systemvm/test/runtests.sh +++ b/systemvm/test/runtests.sh @@ -40,6 +40,10 @@ pyenv versions pylint3 --disable=R,C,W *.py pylint3 --disable=R,C,W `find ../debian -name \*.py` + +pylint3 --disable=R,C,W *.py +pylint3 --disable=R,C,W `find ../debian -name \*.py` + if [ $? -gt 0 ] then echo "pylint failed, please check your code" diff --git a/tools/travis/before_install.sh b/tools/travis/before_install.sh index f2ecd97..6b3a12f 100755 --- a/tools/travis/before_install.sh +++ b/tools/travis/before_install.sh @@ -81,7 +81,7 @@ if [[ $? -ne 0 ]]; then echo -e "\napt-get packages failed to install" fi -sudo apt-get -q -y -V install freeipmi-common libfreeipmi16 libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython-dev libssl-dev libffi-dev python-openssl build-essential --no-install-recommends > /dev/null +sudo apt-get -q -y -V install freeipmi-common libfreeipmi16 libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython-dev libssl-dev libffi-dev pylint3 python-openssl build-essential --no-install-recommends > /dev/null echo -e "\nIPMI version" ipmitool -V
[cloudstack] 07/12: pylint issues
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit e3c8b34954fa52ef878e3001aa0a6eb9cec3737a Author: Daan Hoogland AuthorDate: Thu Feb 25 15:04:15 2021 +0100 pylint issues --- systemvm/debian/opt/cloud/bin/baremetal-vr.py | 8 systemvm/debian/opt/cloud/bin/cs_ip.py | 2 +- systemvm/debian/opt/cloud/bin/filesystem_writable_check.py | 6 +++--- systemvm/debian/opt/cloud/bin/merge.py | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/baremetal-vr.py b/systemvm/debian/opt/cloud/bin/baremetal-vr.py index 1547d82..4bb3d2b 100755 --- a/systemvm/debian/opt/cloud/bin/baremetal-vr.py +++ b/systemvm/debian/opt/cloud/bin/baremetal-vr.py @@ -16,7 +16,7 @@ #under the License. import subprocess -import urllib +import urllib.request, urllib.parse, urllib.error import hmac import hashlib import base64 @@ -131,10 +131,10 @@ class Server(object): "mac": mac } -request = zip(reqs.keys(), reqs.values()) +request = list(zip(list(reqs.keys()), list(reqs.values( request.sort(key=lambda x: str.lower(x[0])) -hashStr = "&".join(["=".join([str.lower(r[0]), str.lower(urllib.quote_plus(str(r[1]))).replace("+", "%20").replace('=', '%3d')]) for r in request]) -sig = urllib.quote_plus(base64.encodestring(hmac.new(secretkey, hashStr, hashlib.sha1).digest()).strip()) +hashStr = "&".join(["=".join([str.lower(r[0]), str.lower(urllib.parse.quote_plus(str(r[1]))).replace("+", "%20").replace('=', '%3d')]) for r in request]) +sig = urllib.parse.quote_plus(base64.encodebytes(hmac.new(secretkey, hashStr, hashlib.sha1).digest()).strip()) return sig def notify_provisioning_done(self, mac): diff --git a/systemvm/debian/opt/cloud/bin/cs_ip.py b/systemvm/debian/opt/cloud/bin/cs_ip.py index fe78c03..5a9f275 100755 --- a/systemvm/debian/opt/cloud/bin/cs_ip.py +++ b/systemvm/debian/opt/cloud/bin/cs_ip.py @@ -54,7 +54,7 @@ def merge(dbag, ip): ip['broadcast'] = str(ipo.broadcast_address) ip['cidr'] = str(ipo.network_address) + '/' + str(ipo.prefixlen) ip['size'] = str(ipo.prefixlen) -ip['network'] = str(ipo.ip_network) +ip['network'] = str(ipo.compressed) if 'nw_type' not in list(ip.keys()): ip['nw_type'] = 'public' else: diff --git a/systemvm/debian/opt/cloud/bin/filesystem_writable_check.py b/systemvm/debian/opt/cloud/bin/filesystem_writable_check.py index eac7d9c..4b2e2cb 100644 --- a/systemvm/debian/opt/cloud/bin/filesystem_writable_check.py +++ b/systemvm/debian/opt/cloud/bin/filesystem_writable_check.py @@ -28,17 +28,17 @@ def check_filesystem(): readOnly1 = bool(stat1.f_flag & ST_RDONLY) if (readOnly1): -print "Read-only file system : monitor results (/root) file system is mounted as read-only" +print("Read-only file system : monitor results (/root) file system is mounted as read-only") exit(1) stat2 = os.statvfs('/var/cache/cloud') readOnly2 = bool(stat2.f_flag & ST_RDONLY) if (readOnly2): -print "Read-only file system : config info (/var/cache/cloud) file system is mounted as read-only" +print("Read-only file system : config info (/var/cache/cloud) file system is mounted as read-only") exit(1) -print "file system is writable" +print("file system is writable") exit(0) diff --git a/systemvm/debian/opt/cloud/bin/merge.py b/systemvm/debian/opt/cloud/bin/merge.py index 607dca7..60318e5 100755 --- a/systemvm/debian/opt/cloud/bin/merge.py +++ b/systemvm/debian/opt/cloud/bin/merge.py @@ -97,7 +97,7 @@ class updateDataBag: self.db.setKey("forwardingrules") else: self.db.setKey(self.qFile.type) -dbag = self.db.load() +self.db.load() logging.info("Command of type %s received", self.qFile.type) if self.qFile.type == 'ips':
[cloudstack] 05/12: Fix indentation issues and use python3 when running pycodestyle checker
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 4604d472ceaa4e10961f76bd3b917fb73a9223c0 Author: Gabriel Brascher AuthorDate: Thu Feb 25 03:49:27 2021 -0300 Fix indentation issues and use python3 when running pycodestyle checker Conflicts were found & fixed: modified: systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py modified: systemvm/debian/root/health_checks/router_version_check.py modified: systemvm/test/runtests.sh --- systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py| 2 +- systemvm/debian/root/health_checks/router_version_check.py | 4 ++-- systemvm/test/runtests.sh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py b/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py index e39595d..1679970 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py @@ -28,7 +28,7 @@ class CsChain(object): self.count = {} def add(self, table, chain): - if table not in list(self.chain.keys()): +if table not in list(self.chain.keys()): self.chain.setdefault(table, []).append(chain) else: self.chain[table].append(chain) diff --git a/systemvm/debian/root/health_checks/router_version_check.py b/systemvm/debian/root/health_checks/router_version_check.py index 3ab33fe..1ec37e9 100644 --- a/systemvm/debian/root/health_checks/router_version_check.py +++ b/systemvm/debian/root/health_checks/router_version_check.py @@ -68,8 +68,8 @@ def main(): print("Scripts signature is not yet setup at " + sigFile + ", skipping") if expected != found: -print("Scripts Version mismatch. Expected: " + expected + - ", found: " + found) +print("Scripts Version mismatch. Expected: " + + expected + ", found: " + found) scriptVersionMatches = False if templateVersionMatches and scriptVersionMatches: diff --git a/systemvm/test/runtests.sh b/systemvm/test/runtests.sh index 9646b54..3f113f5 100755 --- a/systemvm/test/runtests.sh +++ b/systemvm/test/runtests.sh @@ -22,8 +22,8 @@ export PYTHONPATH="../debian/opt/cloud/bin/" export PYTHONDONTWRITEBYTECODE=False echo "Running pycodestyle to check systemvm/python code for errors" -pycodestyle --max-line-length=179 *py -pycodestyle --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py,passwd_server_ip.py `find ../debian -name \*.py` +python3 -m pycodestyle --max-line-length=179 *py +python3 -m pycodestyle --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py,passwd_server_ip.py `find ../debian -name \*.py` if [ $? -gt 0 ] then echo "pycodestyle failed, please check your code"
[cloudstack] 03/12: Fix conflict with master
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 6b2330bbda0c61478c66b3c08c07d62f9ffdd831 Author: Gabriel Brascher AuthorDate: Thu Sep 24 06:09:53 2020 -0300 Fix conflict with master Also: port cloud-grab-dependent-library-versions to python3 --- python/bindir/cloud-grab-dependent-library-versions | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/bindir/cloud-grab-dependent-library-versions b/python/bindir/cloud-grab-dependent-library-versions index cdb5053..ca6d4a9 100755 --- a/python/bindir/cloud-grab-dependent-library-versions +++ b/python/bindir/cloud-grab-dependent-library-versions @@ -6,9 +6,9 @@ # 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 @@ -38,7 +38,7 @@ def getDependentLibraryInfo(): start = True continue if not start: continue - + (key, value) = l.split(':', 2) key = key.strip() value = value.strip() @@ -70,7 +70,7 @@ def arrangeOutPut(libraryMap): entry = "%-40s:%s"%(l, 'UNKNOWN') msg.append(entry) print('\n'.join(msg)) - + if __name__ == '__main__': pythonDepLibraries = ['python', 'python3'] relver = runCmd(['rpm', '-q', 'centos-release'])
[cloudstack] 08/12: str f'ormat'
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch python3-vr in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 20288b2e3a77ed0346bfb35066dac3090f31969b Author: Daan Hoogland AuthorDate: Thu Feb 25 15:50:17 2021 +0100 str f'ormat' --- systemvm/debian/opt/cloud/bin/cs/CsRedundant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsRedundant.py b/systemvm/debian/opt/cloud/bin/cs/CsRedundant.py index 7caf9ee..f9f7931 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsRedundant.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsRedundant.py @@ -225,7 +225,7 @@ class CsRedundant(object): except socket.error as e: error_code = e.args[0] error_string = e.args[1] -print("Process already running (%d:%s). Exiting" % (error_code, error_string)) +print(f"Process already running ({error_code}:{error_string}). Exiting") logging.info("Master is already running, waiting") sleep(time_between)
[cloudstack] branch marvin3 updated (b6fb287 -> 8371d90)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch marvin3 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from b6fb287 Upgrade pip add 8371d90 Revert python version change from 3.8 to 3.9 No new revisions were added by this update. Summary of changes: .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[cloudstack] branch marvin3 updated (14efd3a -> b6fb287)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch marvin3 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from 14efd3a Change python version due to cryptography add b6fb287 Upgrade pip No new revisions were added by this update. Summary of changes: tools/travis/before_install.sh | 6 ++ 1 file changed, 6 insertions(+)
[cloudstack] branch marvin3 updated (5b21896 -> 14efd3a)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch marvin3 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from 5b21896 setuptools upgrade add 14efd3a Change python version due to cryptography No new revisions were added by this update. Summary of changes: .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[cloudstack] branch marvin3 updated (3288157 -> 0b462d5)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch marvin3 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from 3288157 Make Virtual Router '.py' scripts Python3 compatible add 0b462d5 Fix indentation issues and use python3 when running pycodestyle checker No new revisions were added by this update. Summary of changes: systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py| 2 +- systemvm/debian/root/health_checks/memory_usage_check.py | 6 +++--- systemvm/debian/root/health_checks/router_version_check.py | 8 systemvm/test/runtests.sh | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-)
[cloudstack] branch marvin3 updated (50fca5c -> 3288157)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch marvin3 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from 50fca5c reformat because of indentation problems add 3288157 Make Virtual Router '.py' scripts Python3 compatible No new revisions were added by this update. Summary of changes: systemvm/debian/opt/cloud/bin/configure.py | 69 +++--- systemvm/debian/opt/cloud/bin/cs/CsAddress.py | 32 +- systemvm/debian/opt/cloud/bin/cs/CsApp.py | 5 +- systemvm/debian/opt/cloud/bin/cs/CsConfig.py | 4 +- systemvm/debian/opt/cloud/bin/cs/CsDatabag.py | 2 +- systemvm/debian/opt/cloud/bin/cs/CsDhcp.py | 8 +-- systemvm/debian/opt/cloud/bin/cs/CsFile.py | 4 +- systemvm/debian/opt/cloud/bin/cs/CsGuestNetwork.py | 4 +- systemvm/debian/opt/cloud/bin/cs/CsHelper.py | 6 +- systemvm/debian/opt/cloud/bin/cs/CsLoadBalancer.py | 10 ++-- systemvm/debian/opt/cloud/bin/cs/CsMonitor.py | 8 +-- systemvm/debian/opt/cloud/bin/cs/CsNetfilter.py| 20 +++ systemvm/debian/opt/cloud/bin/cs/CsProcess.py | 11 ++-- systemvm/debian/opt/cloud/bin/cs/CsRedundant.py| 22 +++ systemvm/debian/opt/cloud/bin/cs/CsRoute.py| 6 +- systemvm/debian/opt/cloud/bin/cs/CsRule.py | 4 +- systemvm/debian/opt/cloud/bin/cs/CsStaticRoutes.py | 6 +- systemvm/debian/opt/cloud/bin/cs_dhcp.py | 4 +- systemvm/debian/opt/cloud/bin/cs_firewallrules.py | 4 +- .../debian/opt/cloud/bin/cs_forwardingrules.py | 8 +-- systemvm/debian/opt/cloud/bin/cs_guestnetwork.py | 4 +- systemvm/debian/opt/cloud/bin/cs_ip.py | 12 ++-- systemvm/debian/opt/cloud/bin/cs_monitorservice.py | 2 +- systemvm/debian/opt/cloud/bin/cs_network_acl.py| 2 +- .../debian/opt/cloud/bin/cs_remoteaccessvpn.py | 2 +- systemvm/debian/opt/cloud/bin/cs_site2sitevpn.py | 2 +- systemvm/debian/opt/cloud/bin/cs_vmp.py| 2 +- systemvm/debian/opt/cloud/bin/cs_vpnusers.py | 10 ++-- systemvm/debian/opt/cloud/bin/diagnostics.py | 2 +- .../debian/opt/cloud/bin/get_diagnostics_files.py | 4 +- systemvm/debian/opt/cloud/bin/merge.py | 6 +- systemvm/debian/opt/cloud/bin/passwd_server_ip.py | 16 ++--- systemvm/debian/opt/cloud/bin/update_config.py | 4 +- systemvm/debian/opt/cloud/bin/vmdata.py| 22 +++ .../debian/root/health_checks/cpu_usage_check.py | 16 ++--- systemvm/debian/root/health_checks/dhcp_check.py | 10 ++-- .../debian/root/health_checks/disk_space_check.py | 10 ++-- systemvm/debian/root/health_checks/dns_check.py| 10 ++-- .../debian/root/health_checks/gateways_check.py| 12 ++-- .../debian/root/health_checks/haproxy_check.py | 26 .../debian/root/health_checks/iptables_check.py| 10 ++-- .../root/health_checks/memory_usage_check.py | 18 +++--- .../root/health_checks/router_version_check.py | 25 .../debian/root/health_checks/utility/__init__.py | 4 +- systemvm/debian/root/monitorServices.py| 12 ++-- systemvm/test/runtests.sh | 4 +- 46 files changed, 245 insertions(+), 239 deletions(-)
[cloudstack] branch snapshot-deletion-issues updated (a0bc85b -> 7121967)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch snapshot-deletion-issues in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from a0bc85b rename options strings to *_OPTION add 7121967 Fix typo on deleteSnapshotOnSecondaryStorage and enhance log message No new revisions were added by this update. Summary of changes: .../apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java | 4 ++-- .../java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java| 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
[cloudstack] 06/06: checkstyle trailing spaces
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch snapshot-deletion-issues in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 814af6a1829b5835e240cc2b50aa9bde20ce2637 Author: GabrielBrascher AuthorDate: Mon Mar 16 08:31:45 2020 -0300 checkstyle trailing spaces --- .../java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java index 2bd55ad..f9f96d9 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java @@ -127,7 +127,7 @@ public class KVMStorageProcessor implements StorageProcessor { private String _createTmplPath; private String _manageSnapshotPath; private int _cmdsTimeout; - + private static final String MANAGE_SNAPSTHOT_CREATE = "-c"; private static final String MANAGE_SNAPSTHOT_DESTROY = "-d"; private static final String NAME = "-n"; @@ -1546,7 +1546,7 @@ public class KVMStorageProcessor implements StorageProcessor { s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet(CEPH_MON_HOST)); return r; } - + @Override public Answer deleteVolume(final DeleteCommand cmd) { final VolumeObjectTO vol = (VolumeObjectTO)cmd.getData();
[cloudstack] 04/06: Remove "dummy" boolean return statement
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch snapshot-deletion-issues in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit e109949e3a9e386b810c28132de6de420f5d6a03 Author: GabrielBrascher AuthorDate: Wed Nov 27 12:24:29 2019 -0200 Remove "dummy" boolean return statement --- .../apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java| 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java index a819384..b2ff46c 100644 --- a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java +++ b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java @@ -340,8 +340,7 @@ public class DefaultSnapshotStrategy extends SnapshotStrategyBase { if (snapshotOnPrimary != null) { long volumeId = snapshotOnPrimary.getVolumeId(); VolumeVO volumeVO = volumeDao.findById(volumeId); -boolean isVolumeOnPrimary = volumeVO != null && volumeVO.getRemoved() == null; -return isVolumeOnPrimary; +return volumeVO != null && volumeVO.getRemoved() == null; } return false; }
[cloudstack] 02/06: Remove legacy '@Component', it is not necessary in this bean/class.
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch snapshot-deletion-issues in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 8191b4da4815af8a3a13adcdd9f4692faf24d284 Author: GabrielBrascher AuthorDate: Mon Oct 21 14:24:00 2019 -0300 Remove legacy '@Component', it is not necessary in this bean/class. --- .../org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java index 2651162..3e8e473 100644 --- a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java +++ b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java @@ -21,7 +21,6 @@ import java.util.List; import javax.inject.Inject; import org.apache.log4j.Logger; -import org.springframework.stereotype.Component; import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; @@ -70,7 +69,6 @@ import com.cloud.utils.db.DB; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.fsm.NoTransitionException; -@Component public class DefaultSnapshotStrategy extends SnapshotStrategyBase { private static final Logger s_logger = Logger.getLogger(DefaultSnapshotStrategy.class);
[cloudstack] branch snapshot-deletion-issues created (now 814af6a)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch snapshot-deletion-issues in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at 814af6a checkstyle trailing spaces This branch includes the following new commits: new afd060b Fixes snapshot deletion new 8191b4d Remove legacy '@Component', it is not necessary in this bean/class. new bc9387f Fix log message missing %d and remove snapshot on DB new e109949 Remove "dummy" boolean return statement new d31ecb8 Manage snapshot deletion for KVM + NFS (primary storage) new 814af6a checkstyle trailing spaces The 6 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/06: Fixes snapshot deletion
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch snapshot-deletion-issues in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit afd060b54f48744caf4836e4a6334dc1711b2b17 Author: GabrielBrascher AuthorDate: Thu Oct 17 17:16:48 2019 -0300 Fixes snapshot deletion --- .../src/test/resources/fakeDriverTestContext.xml | 2 +- .../src/test/resources/storageContext.xml | 2 +- ...tStrategy.java => DefaultSnapshotStrategy.java} | 114 +++-- ...ing-engine-storage-snapshot-storage-context.xml | 4 +- 4 files changed, 66 insertions(+), 56 deletions(-) diff --git a/engine/storage/integration-test/src/test/resources/fakeDriverTestContext.xml b/engine/storage/integration-test/src/test/resources/fakeDriverTestContext.xml index 944196d..b8a2274 100644 --- a/engine/storage/integration-test/src/test/resources/fakeDriverTestContext.xml +++ b/engine/storage/integration-test/src/test/resources/fakeDriverTestContext.xml @@ -49,7 +49,7 @@ - + diff --git a/engine/storage/integration-test/src/test/resources/storageContext.xml b/engine/storage/integration-test/src/test/resources/storageContext.xml index abf0876..f65e2ac 100644 --- a/engine/storage/integration-test/src/test/resources/storageContext.xml +++ b/engine/storage/integration-test/src/test/resources/storageContext.xml @@ -50,7 +50,7 @@ - + diff --git a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java similarity index 84% rename from engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java rename to engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java index 3ab2129..2651162 100644 --- a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java +++ b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java @@ -34,7 +34,6 @@ import org.apache.cloudstack.engine.subsystem.api.storage.StrategyPriority; import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.framework.jobs.AsyncJob; -import org.apache.cloudstack.framework.jobs.dao.SyncQueueItemDao; import org.apache.cloudstack.storage.command.CreateObjectAnswer; import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreDao; import org.apache.cloudstack.storage.datastore.db.SnapshotDataStoreVO; @@ -72,8 +71,8 @@ import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.fsm.NoTransitionException; @Component -public class XenserverSnapshotStrategy extends SnapshotStrategyBase { -private static final Logger s_logger = Logger.getLogger(XenserverSnapshotStrategy.class); +public class DefaultSnapshotStrategy extends SnapshotStrategyBase { +private static final Logger s_logger = Logger.getLogger(DefaultSnapshotStrategy.class); @Inject SnapshotService snapshotSvr; @@ -90,12 +89,8 @@ public class XenserverSnapshotStrategy extends SnapshotStrategyBase { @Inject SnapshotDataFactory snapshotDataFactory; @Inject -private SnapshotDao _snapshotDao; -@Inject private SnapshotDetailsDao _snapshotDetailsDao; @Inject -private SyncQueueItemDao _syncQueueItemDao; -@Inject VolumeDetailsDao _volumeDetailsDaoImpl; @Override @@ -269,63 +264,78 @@ public class XenserverSnapshotStrategy extends SnapshotStrategyBase { throw new InvalidParameterValueException("Can't delete snapshotshot " + snapshotId + " due to it is in " + snapshotVO.getState() + " Status"); } -// first mark the snapshot as destroyed, so that ui can't see it, but we -// may not destroy the snapshot on the storage, as other snapshots may -// depend on it. SnapshotInfo snapshotOnImage = snapshotDataFactory.getSnapshot(snapshotId, DataStoreRole.Image); -if (snapshotOnImage == null) { -s_logger.debug("Can't find snapshot on backup storage, delete it in db"); -snapshotDao.remove(snapshotId); -return true; -} - -SnapshotObject obj = (SnapshotObject)snapshotOnImage; -try { -obj.processEvent(Snapshot.Event.DestroyRequested); -List volumesFromSnapshot; -volumesFromSnapshot = _volumeDetailsDaoImpl.findDetails("SNAPSHOT_ID", String.valueOf(snapshotId), null); -if (volumesFromSnapshot.size() > 0) { -try { -obj.processEvent(Snapshot.Event.OperationFai
[cloudstack] 03/06: Fix log message missing %d and remove snapshot on DB
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch snapshot-deletion-issues in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit bc9387fb91918e02cc1296a3c82f563795bf89ea Author: GabrielBrascher AuthorDate: Mon Nov 25 17:21:09 2019 -0200 Fix log message missing %d and remove snapshot on DB --- .../storage/snapshot/DefaultSnapshotStrategy.java | 28 +++--- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java index 3e8e473..a819384 100644 --- a/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java +++ b/engine/storage/snapshot/src/main/java/org/apache/cloudstack/storage/snapshot/DefaultSnapshotStrategy.java @@ -266,7 +266,7 @@ public class DefaultSnapshotStrategy extends SnapshotStrategyBase { boolean deletedOnSecondary = false; if (snapshotOnImage == null) { -s_logger.debug(String.format("Can't find snapshot [snapshot id: %d] on backup storage")); +s_logger.debug(String.format("Can't find snapshot [snapshot id: %d] on backup storage", snapshotId)); } else { SnapshotObject obj = (SnapshotObject)snapshotOnImage; try { @@ -321,19 +321,29 @@ public class DefaultSnapshotStrategy extends SnapshotStrategyBase { * In case of failure, it will throw one of the following exceptions: CloudRuntimeException, InterruptedException, or ExecutionException. */ private boolean deleteSnapshotOnPrimary(Long snapshotId) { -boolean result = false; +SnapshotDataStoreVO snapshotOnPrimary = snapshotStoreDao.findBySnapshot(snapshotId, DataStoreRole.Primary); +SnapshotInfo snapshotOnPrimaryInfo = snapshotDataFactory.getSnapshot(snapshotId, DataStoreRole.Primary); +if (isSnapshotOnPrimaryStorage(snapshotId) && snapshotSvr.deleteSnapshot(snapshotOnPrimaryInfo)) { +snapshotOnPrimary.setState(State.Destroyed); +snapshotStoreDao.update(snapshotOnPrimary.getId(), snapshotOnPrimary); +snapshotDao.remove(snapshotId); +return true; +} +return false; +} + +/** + * Returns true if the snapshot volume is on primary storage. + */ +private boolean isSnapshotOnPrimaryStorage(long snapshotId) { SnapshotDataStoreVO snapshotOnPrimary = snapshotStoreDao.findBySnapshot(snapshotId, DataStoreRole.Primary); if (snapshotOnPrimary != null) { -SnapshotInfo snapshotOnPrimaryInfo = snapshotDataFactory.getSnapshot(snapshotId, DataStoreRole.Primary); long volumeId = snapshotOnPrimary.getVolumeId(); VolumeVO volumeVO = volumeDao.findById(volumeId); -if (((PrimaryDataStoreImpl)snapshotOnPrimaryInfo.getDataStore()).getPoolType() == StoragePoolType.RBD && volumeVO != null) { -result = snapshotSvr.deleteSnapshot(snapshotOnPrimaryInfo); -} -snapshotOnPrimary.setState(State.Destroyed); -snapshotStoreDao.update(snapshotOnPrimary.getId(), snapshotOnPrimary); +boolean isVolumeOnPrimary = volumeVO != null && volumeVO.getRemoved() == null; +return isVolumeOnPrimary; } -return result; +return false; } @Override
[cloudstack] 05/06: Manage snapshot deletion for KVM + NFS (primary storage)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch snapshot-deletion-issues in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit d31ecb8cfccf13096f8d6013e804b598cbfe0b38 Author: GabrielBrascher AuthorDate: Fri Mar 13 01:33:54 2020 -0300 Manage snapshot deletion for KVM + NFS (primary storage) --- .../kvm/storage/KVMStorageProcessor.java | 62 +- 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java index 9a2fd27..2bd55ad 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java @@ -127,6 +127,14 @@ public class KVMStorageProcessor implements StorageProcessor { private String _createTmplPath; private String _manageSnapshotPath; private int _cmdsTimeout; + +private static final String MANAGE_SNAPSTHOT_CREATE = "-c"; +private static final String MANAGE_SNAPSTHOT_DESTROY = "-d"; +private static final String NAME = "-n"; +private static final String CEPH_MON_HOST = "mon_host"; +private static final String CEPH_AUTH_KEY = "key"; +private static final String CEPH_CLIENT_MOUNT_TIMEOUT = "client_mount_timeout"; +private static final String CEPH_DEFAULT_MOUNT_TIMEOUT = "30"; public KVMStorageProcessor(final KVMStoragePoolManager storagePoolMgr, final LibvirtComputingResource resource) { this.storagePoolMgr = storagePoolMgr; @@ -563,7 +571,7 @@ public class KVMStorageProcessor implements StorageProcessor { final Script command = new Script(_createTmplPath, wait, s_logger); command.add("-f", disk.getPath()); command.add("-t", tmpltPath); -command.add("-n", templateName + ".qcow2"); +command.add(NAME, templateName + ".qcow2"); final String result = command.execute(); @@ -949,7 +957,7 @@ public class KVMStorageProcessor implements StorageProcessor { } else { final Script command = new Script(_manageSnapshotPath, cmd.getWaitInMillSeconds(), s_logger); command.add("-b", snapshotDisk.getPath()); -command.add("-n", snapshotName); +command.add(NAME, snapshotName); command.add("-p", snapshotDestPath); if (isCreatedFromVmSnapshot) { descName = UUID.randomUUID().toString(); @@ -1010,14 +1018,7 @@ public class KVMStorageProcessor implements StorageProcessor { } } else { if (primaryPool.getType() != StoragePoolType.RBD) { -final Script command = new Script(_manageSnapshotPath, _cmdsTimeout, s_logger); -command.add("-d", snapshotDisk.getPath()); -command.add("-n", snapshotName); -final String result = command.execute(); -if (result != null) { -s_logger.debug("Failed to delete snapshot on primary: " + result); -// return new CopyCmdAnswer("Failed to backup snapshot: " + result); -} + deleteSnapshotViaManageSnapshotScript(snapshotName, snapshotDisk); } } } catch (final Exception ex) { @@ -1035,6 +1036,16 @@ public class KVMStorageProcessor implements StorageProcessor { } } +private void deleteSnapshotViaManageSnapshotScript(final String snapshotName, KVMPhysicalDisk snapshotDisk) { +final Script command = new Script(_manageSnapshotPath, _cmdsTimeout, s_logger); +command.add(MANAGE_SNAPSTHOT_DESTROY, snapshotDisk.getPath()); +command.add(NAME, snapshotName); +final String result = command.execute(); +if (result != null) { +s_logger.debug("Failed to delete snapshot on primary: " + result); +} +} + protected synchronized String attachOrDetachISO(final Connect conn, final String vmName, String isoPath, final boolean isAttach) throws LibvirtException, URISyntaxException, InternalErrorException { String isoXml = null; @@ -1489,12 +1500,7 @@ public class KVMStorageProcessor implements StorageProcessor { */ if (primaryPool.getType() == Storag
[cloudstack] 01/01: Prevent overflow + add small code enhancements
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch statscollector-potential-issues in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 9e6bc8c570a9afd9484612d381b202a24983a527 Author: GabrielBrascher AuthorDate: Mon Mar 9 09:28:08 2020 -0300 Prevent overflow + add small code enhancements --- .../main/java/com/cloud/server/StatsCollector.java | 29 +++--- .../java/com/cloud/server/StatsCollectorTest.java | 6 - 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/server/src/main/java/com/cloud/server/StatsCollector.java b/server/src/main/java/com/cloud/server/StatsCollector.java index 4ec32b6..01d81dd 100644 --- a/server/src/main/java/com/cloud/server/StatsCollector.java +++ b/server/src/main/java/com/cloud/server/StatsCollector.java @@ -192,6 +192,10 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc private static final String DISK_WRITE_IOPS_FIELD = "disk_write_iops"; private static final String DISK_WRITE_KBS_FIELD = "disk_write_kbs"; +private static final int HOURLY_TIME = 60; +private static final int DAILY_TIME = HOURLY_TIME * 24; +private static final Long ONE_MINUTE_IN_MILLISCONDS = 6L; + private static final String DEFAULT_DATABASE_NAME = "cloudstack"; private static final String INFLUXDB_HOST_MEASUREMENT = "host_stats"; private static final String INFLUXDB_VM_MEASUREMENT = "vm_stats"; @@ -328,11 +332,11 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc protected void init(Map configs) { _executor = Executors.newScheduledThreadPool(6, new NamedThreadFactory("StatsCollector")); -hostStatsInterval = NumbersUtil.parseLong(configs.get("host.stats.interval"), 6L); -hostAndVmStatsInterval = NumbersUtil.parseLong(configs.get("vm.stats.interval"), 6L); -storageStatsInterval = NumbersUtil.parseLong(configs.get("storage.stats.interval"), 6L); -volumeStatsInterval = NumbersUtil.parseLong(configs.get("volume.stats.interval"), 60L); -autoScaleStatsInterval = NumbersUtil.parseLong(configs.get("autoscale.stats.interval"), 6L); +hostStatsInterval = NumbersUtil.parseLong(configs.get("host.stats.interval"), ONE_MINUTE_IN_MILLISCONDS); +hostAndVmStatsInterval = NumbersUtil.parseLong(configs.get("vm.stats.interval"), ONE_MINUTE_IN_MILLISCONDS); +storageStatsInterval = NumbersUtil.parseLong(configs.get("storage.stats.interval"), ONE_MINUTE_IN_MILLISCONDS); +volumeStatsInterval = NumbersUtil.parseLong(configs.get("volume.stats.interval"), ONE_MINUTE_IN_MILLISCONDS); +autoScaleStatsInterval = NumbersUtil.parseLong(configs.get("autoscale.stats.interval"), ONE_MINUTE_IN_MILLISCONDS); String statsUri = statsOutputUri.value(); if (StringUtils.isNotBlank(statsUri)) { @@ -427,8 +431,6 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc Calendar cal = Calendar.getInstance(usageTimezone); cal.setTime(new Date()); long endDate = 0; -int HOURLY_TIME = 60; -final int DAILY_TIME = 60 * 24; if (_usageAggregationRange == DAILY_TIME) { cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); @@ -454,9 +456,9 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc s_logger.warn("Usage stats job aggregation range is to small, using the minimum value of " + UsageUtils.USAGE_AGGREGATION_RANGE_MIN); _usageAggregationRange = UsageUtils.USAGE_AGGREGATION_RANGE_MIN; } -_diskStatsUpdateExecutor.scheduleAtFixedRate(new VmDiskStatsUpdaterTask(), (endDate - System.currentTimeMillis()), (_usageAggregationRange * 60 * 1000), -TimeUnit.MILLISECONDS); - + +long period = _usageAggregationRange * ONE_MINUTE_IN_MILLISCONDS; +_diskStatsUpdateExecutor.scheduleAtFixedRate(new VmDiskStatsUpdaterTask(), (endDate - System.currentTimeMillis()), period, TimeUnit.MILLISECONDS); } /** @@ -1209,7 +1211,7 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc for (AutoScaleVmGroupPolicyMapVO asVmgPmap : listMap) { AutoScalePolicyVO policyVO = _asPolicyDao.findById(asVmgPmap.getPolicyId()); if (policyVO != null) { -Integer quitetime = policyVO.getQuietTime(); +int quitetime = policyVO.getQuietTime(); Date quitetimeDate = policyVO.getLastQuiteTime(); long last_quitetime = 0L; if (quitetimeDate != null
[cloudstack] branch statscollector-potential-issues created (now 9e6bc8c)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch statscollector-potential-issues in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at 9e6bc8c Prevent overflow + add small code enhancements This branch includes the following new commits: new 9e6bc8c Prevent overflow + add small code enhancements 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] branch master updated (da62cec -> 2e8c069)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from da62cec README: that time of the year! (#3769) add 2e8c069 Load Average for KVM (#3738) No new revisions were added by this update. Summary of changes: api/src/main/java/com/cloud/host/HostStats.java | 2 +- .../main/java/org/apache/cloudstack/api/ApiConstants.java| 1 + .../org/apache/cloudstack/api/response/HostResponse.java | 12 ++-- .../main/java/com/cloud/agent/api/GetHostStatsAnswer.java| 5 + core/src/main/java/com/cloud/agent/api/HostStatsEntry.java | 11 +++ .../resource/wrapper/LibvirtGetHostStatsCommandWrapper.java | 3 ++- .../main/java/org/apache/cloudstack/utils/linux/CPUStat.java | 12 .../org/apache/cloudstack/metrics/MetricsServiceImpl.java| 1 + .../org/apache/cloudstack/response/HostMetricsResponse.java | 10 ++ .../main/java/com/cloud/api/query/dao/HostJoinDaoImpl.java | 1 + 10 files changed, 50 insertions(+), 8 deletions(-)
[cloudstack] 01/01: Fix typo: the past tense of shutdown is shutdown, not shutdowned
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch typo-fix-shutdowned in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 5db61c08c13a5d7619192a7ac8fda810562b5e1b Author: GabrielBrascher AuthorDate: Mon Dec 9 23:02:26 2019 -0200 Fix typo: the past tense of shutdown is shutdown, not shutdowned --- api/src/main/java/com/cloud/vm/VirtualMachine.java | 2 +- .../apache/cloudstack/engine/orchestration/NetworkOrchestrator.java| 2 +- engine/schema/src/main/resources/META-INF/db/schema-41300to41400.sql | 3 +++ .../apache/cloudstack/network/contrail/model/VirtualMachineModel.java | 2 +- .../src/main/java/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java | 2 +- .../src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java | 2 +- ui/scripts/instances.js| 2 +- ui/scripts/metrics.js | 2 +- 8 files changed, 10 insertions(+), 7 deletions(-) diff --git a/api/src/main/java/com/cloud/vm/VirtualMachine.java b/api/src/main/java/com/cloud/vm/VirtualMachine.java index a46edd7..d234c48 100644 --- a/api/src/main/java/com/cloud/vm/VirtualMachine.java +++ b/api/src/main/java/com/cloud/vm/VirtualMachine.java @@ -52,7 +52,7 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Partition, Migrating(true, "VM is being migrated. host id holds to from host"), Error(false, "VM is in error"), Unknown(false, "VM state is unknown."), -Shutdowned(false, "VM is shutdowned from inside"); +Shutdown(false, "VM state is shutdown from inside"); private final boolean _transitional; String _description; diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index 9e49148..3514a0e 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -2970,7 +2970,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra for (final VirtualRouter router : routers) { if (router.getState() == VirtualMachine.State.Stopped || router.getState() == VirtualMachine.State.Error || -router.getState() == VirtualMachine.State.Shutdowned || +router.getState() == VirtualMachine.State.Shutdown || router.getState() == VirtualMachine.State.Unknown) { s_logger.debug("Destroying old router " + router); _routerService.destroyRouter(router.getId(), context.getAccount(), context.getCaller().getId()); diff --git a/engine/schema/src/main/resources/META-INF/db/schema-41300to41400.sql b/engine/schema/src/main/resources/META-INF/db/schema-41300to41400.sql index 43e282d..eb6e6bd 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-41300to41400.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-41300to41400.sql @@ -21,3 +21,6 @@ -- KVM: enable storage data motion on KVM hypervisor_capabilities UPDATE `cloud`.`hypervisor_capabilities` SET `storage_motion_supported` = 1 WHERE `hypervisor_capabilities`.`hypervisor_type` = 'KVM'; + +-- #3659 Fix typo: the past tense of shutdown is shutdown, not shutdowned +UPDATE `cloud`.`vm_instance` SET state='Shutdown' WHERE state='Shutdowned'; \ No newline at end of file diff --git a/plugins/network-elements/juniper-contrail/src/main/java/org/apache/cloudstack/network/contrail/model/VirtualMachineModel.java b/plugins/network-elements/juniper-contrail/src/main/java/org/apache/cloudstack/network/contrail/model/VirtualMachineModel.java index 4b64c80..c44fcac 100644 --- a/plugins/network-elements/juniper-contrail/src/main/java/org/apache/cloudstack/network/contrail/model/VirtualMachineModel.java +++ b/plugins/network-elements/juniper-contrail/src/main/java/org/apache/cloudstack/network/contrail/model/VirtualMachineModel.java @@ -224,7 +224,7 @@ public class VirtualMachineModel extends ModelObjectBase { case Migrating: case Starting: case Running: -case Shutdowned: +case Shutdown: case Stopped: case Stopping: return true; diff --git a/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java index 83a53aa..18bd7aa 100644 --- a/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java +++ b/server/src/main/java/com/cloud/consoleproxy/ConsoleProxyManagerImpl.j
[cloudstack] branch typo-fix-shutdowned created (now 5db61c0)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch typo-fix-shutdowned in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at 5db61c0 Fix typo: the past tense of shutdown is shutdown, not shutdowned This branch includes the following new commits: new 5db61c0 Fix typo: the past tense of shutdown is shutdown, not shutdowned 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] branch 2to3 created (now 2394fda)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch 2to3 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at 2394fda Merge remote-tracking branch 'origin/4.13' No new revisions were added by this update.
[cloudstack] branch cloud0-cidr-412 deleted (was 359a81b)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. was 359a81b Minor fixes and expansion of Unit Tests This change permanently discards the following revisions: discard 359a81b Minor fixes and expansion of Unit Tests discard c6359f2 Resolved merge conflict. discard 2d7af0c Revert "Send control.cidr parameter from Management Server to KVM Agent on connect" discard 10dff01 Move some logic to NetUtils and add Tests for this discard d70cfb2 Send control.cidr parameter from Management Server to KVM Agent on connect discard ec84f62 Only parse values if control.cidr set in agent properties discard 2c730de Have the control cidr being honered by the mgmt server when creating a network discard cd59621 Add UnitTests to BridgeVifDriver and NetUtils discard f2d38da kvm/bridge: Allow Link Local Cidr (cloud0 interface) to be configured
[cloudstack] 06/09: Move some logic to NetUtils and add Tests for this
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 10dff010ab50359a4ffa6997e72be54bc2ba5066 Author: Wido den Hollander AuthorDate: Tue Jul 16 12:32:52 2019 +0200 Move some logic to NetUtils and add Tests for this Signed-off-by: Wido den Hollander --- .../com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java | 14 +++--- utils/src/main/java/com/cloud/utils/net/NetUtils.java | 10 ++ utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java | 5 - 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java index c229154..8466514 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java @@ -52,9 +52,9 @@ public class BridgeVifDriver extends VifDriverBase { private String _modifyVlanPath; private String _modifyVxlanPath; private String _controlCidr = NetUtils.getLinkLocalCIDR(); -private String _linkLocalGateway = NetUtils.getLinkLocalGateway(); -private String _linkLocalNetmask = NetUtils.getLinkLocalNetMask(); -private String _linkLocalAddress = _linkLocalGateway + "/" + _linkLocalNetmask; +private String _linkLocalGateway; +private String _linkLocalNetmask; +private String _linkLocalAddress; private String bridgeNameSchema; private Long libvirtVersion; @@ -78,12 +78,12 @@ public class BridgeVifDriver extends VifDriverBase { String controlCidr = (String)params.get("control.cidr"); if (StringUtils.isNotBlank(controlCidr)) { _controlCidr = controlCidr; -SubnetUtils subnetUtils = new SubnetUtils(_controlCidr); -_linkLocalGateway = subnetUtils.getInfo().getLowAddress(); -_linkLocalNetmask = subnetUtils.getInfo().getNetmask(); -_linkLocalAddress = _linkLocalGateway + "/" + _linkLocalNetmask; } +_linkLocalGateway = NetUtils.getLinkLocalGatewayFromCIDR(_controlCidr); +_linkLocalNetmask = NetUtils.getLinkLocalNetmaskFromCIDR(_controlCidr); +_linkLocalAddress = _linkLocalGateway + "/" + _linkLocalNetmask; + String value = (String)params.get("scripts.timeout"); _timeout = NumbersUtil.parseInt(value, 30 * 60) * 1000; diff --git a/utils/src/main/java/com/cloud/utils/net/NetUtils.java b/utils/src/main/java/com/cloud/utils/net/NetUtils.java index e9d15e2..653e446 100644 --- a/utils/src/main/java/com/cloud/utils/net/NetUtils.java +++ b/utils/src/main/java/com/cloud/utils/net/NetUtils.java @@ -967,6 +967,16 @@ public class NetUtils { return "169.254.0.0/16"; } +public static String getLinkLocalGatewayFromCIDR(final String cidr) { +SubnetUtils subnetUtils = new SubnetUtils(cidr); +return subnetUtils.getInfo().getLowAddress(); +} + +public static String getLinkLocalNetmaskFromCIDR(final String cidr) { +SubnetUtils subnetUtils = new SubnetUtils(cidr); +return subnetUtils.getInfo().getNetmask(); +} + public static String[] getLinkLocalIPRange(final String cidr) { final SubnetUtils subnetUtils = new SubnetUtils(cidr); final String[] addresses = subnetUtils.getInfo().getAllAddresses(); diff --git a/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java b/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java index 4d20df72..afb0b6d 100644 --- a/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java +++ b/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java @@ -712,9 +712,12 @@ public class NetUtilsTest { @Test public void testLinkLocal() { +final String cidr = NetUtils.getLinkLocalCIDR(); assertEquals("255.255.0.0", NetUtils.getLinkLocalNetMask()); assertEquals("169.254.0.1", NetUtils.getLinkLocalGateway()); -assertEquals("169.254.0.0/16", NetUtils.getLinkLocalCIDR()); +assertEquals("169.254.0.0/16", cidr); +assertEquals("169.254.0.1", NetUtils.getLinkLocalGatewayFromCIDR(cidr)); +assertEquals("255.255.0.0", NetUtils.getLinkLocalNetmaskFromCIDR(cidr)); String[] range = NetUtils.getLinkLocalIPRange("169.254.0.0/16"); assertEquals("169.254.0.2", range[0]);
[cloudstack] 02/09: Add UnitTests to BridgeVifDriver and NetUtils
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit cd5962180893c8f85786ac580429c82bcd3aa3be Author: Wido den Hollander AuthorDate: Fri Jul 12 11:11:27 2019 +0200 Add UnitTests to BridgeVifDriver and NetUtils Signed-off-by: Wido den Hollander --- .../com/cloud/hypervisor/kvm/resource/BridgeVifDriverTest.java | 6 ++ utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java | 7 +++ 2 files changed, 13 insertions(+) diff --git a/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriverTest.java b/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriverTest.java index ad0f92b..ac45102 100644 --- a/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriverTest.java +++ b/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriverTest.java @@ -55,4 +55,10 @@ public class BridgeVifDriverTest { Assert.assertTrue(driver.isValidProtocolAndVnetId("123", "vlan")); Assert.assertTrue(driver.isValidProtocolAndVnetId("456", "vxlan")); } + +@Test +public void testVxNetBridgeName() { +Assert.assertEquals("brvx-500", driver.generateVxnetBrName(null, 500)); +Assert.assertEquals("brvx-1", driver.generateVxnetBrName(null, 1)); +} } \ No newline at end of file diff --git a/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java b/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java index 173704a..1496462 100644 --- a/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java +++ b/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java @@ -709,4 +709,11 @@ public class NetUtilsTest { assertFalse(NetUtils.isIPv6EUI64("2001:db8::100:1")); assertFalse(NetUtils.isIPv6EUI64("2a01:4f9:2a:185f::2")); } + +@Test +public void testLinkLocal() { +assertEquals("255.255.255.0", NetUtils.getLinkLocalNetMask()); +assertEquals("169.254.0.1", NetUtils.getLinkLocalGateway()); +assertEquals("169.254.0.0/16", NetUtils.getLinkLocalCIDR()); +} }
[cloudstack] 04/09: Only parse values if control.cidr set in agent properties
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit ec84f623ee81e04a254098c92d866b74f51e9898 Author: Wido den Hollander AuthorDate: Mon Jul 15 16:01:19 2019 +0200 Only parse values if control.cidr set in agent properties Signed-off-by: Wido den Hollander --- .../java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java index dc29594..c229154 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java @@ -78,13 +78,12 @@ public class BridgeVifDriver extends VifDriverBase { String controlCidr = (String)params.get("control.cidr"); if (StringUtils.isNotBlank(controlCidr)) { _controlCidr = controlCidr; +SubnetUtils subnetUtils = new SubnetUtils(_controlCidr); +_linkLocalGateway = subnetUtils.getInfo().getLowAddress(); +_linkLocalNetmask = subnetUtils.getInfo().getNetmask(); +_linkLocalAddress = _linkLocalGateway + "/" + _linkLocalNetmask; } -SubnetUtils subnetUtils = new SubnetUtils(_controlCidr); -_linkLocalGateway = subnetUtils.getInfo().getLowAddress(); -_linkLocalNetmask = subnetUtils.getInfo().getNetmask(); -_linkLocalAddress = _linkLocalGateway + "/" + _linkLocalNetmask; - String value = (String)params.get("scripts.timeout"); _timeout = NumbersUtil.parseInt(value, 30 * 60) * 1000;
[cloudstack] 05/09: Send control.cidr parameter from Management Server to KVM Agent on connect
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit d70cfb279a2b6781a85ad49b898fe191fc41e086 Author: Wido den Hollander AuthorDate: Tue Jul 16 12:25:20 2019 +0200 Send control.cidr parameter from Management Server to KVM Agent on connect Signed-off-by: Wido den Hollander --- .../src/main/java/com/cloud/agent/manager/AgentManagerImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java b/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java index 6091131..07d16bf 100644 --- a/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java +++ b/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java @@ -38,6 +38,7 @@ import java.util.concurrent.locks.ReentrantLock; import javax.inject.Inject; import javax.naming.ConfigurationException; +import com.cloud.configuration.Config; import org.apache.cloudstack.agent.lb.IndirectAgentLB; import org.apache.cloudstack.ca.CAManager; import org.apache.cloudstack.framework.config.ConfigKey; @@ -1750,6 +1751,7 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl if (((StartupRoutingCommand)cmd).getHypervisorType() == HypervisorType.KVM || ((StartupRoutingCommand)cmd).getHypervisorType() == HypervisorType.LXC) { Map params = new HashMap(); params.put("router.aggregation.command.each.timeout", _configDao.getValue("router.aggregation.command.each.timeout")); +params.put(Config.ControlCidr.key(), _configDao.getValue(Config.ControlCidr.key())); try { SetHostParamsCommand cmds = new SetHostParamsCommand(params);
[cloudstack] 03/09: Have the control cidr being honered by the mgmt server when creating a network
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 2c730de2ad23ae124f8bad634ee1ba3e83e5999c Author: Wido den Hollander AuthorDate: Mon Jul 15 15:44:05 2019 +0200 Have the control cidr being honered by the mgmt server when creating a network Signed-off-by: Wido den Hollander --- .../hypervisor/kvm/resource/BridgeVifDriver.java | 37 -- .../kvm/resource/BridgeVifDriverTest.java | 5 --- .../configuration/ConfigurationManagerImpl.java| 16 +- .../com/cloud/network/guru/ControlNetworkGuru.java | 6 ++-- .../com/cloud/server/ConfigurationServerImpl.java | 8 ++--- .../main/java/com/cloud/test/IPRangeConfig.java| 2 +- .../main/java/com/cloud/utils/net/NetUtils.java| 18 --- .../java/com/cloud/utils/net/NetUtilsTest.java | 12 ++- 8 files changed, 38 insertions(+), 66 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java index 0aef2c5..dc29594 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java @@ -29,6 +29,7 @@ import java.util.regex.Pattern; import javax.naming.ConfigurationException; import com.cloud.utils.StringUtils; +import org.apache.commons.net.util.SubnetUtils; import org.apache.log4j.Logger; import org.libvirt.LibvirtException; @@ -50,10 +51,10 @@ public class BridgeVifDriver extends VifDriverBase { private final Object _vnetBridgeMonitor = new Object(); private String _modifyVlanPath; private String _modifyVxlanPath; -private String _linkLocalCidr = "169.254.0.0/16"; -private String _linkLocalAddress = "169.254.0.1/16"; +private String _controlCidr = NetUtils.getLinkLocalCIDR(); private String _linkLocalGateway = NetUtils.getLinkLocalGateway(); private String _linkLocalNetmask = NetUtils.getLinkLocalNetMask(); +private String _linkLocalAddress = _linkLocalGateway + "/" + _linkLocalNetmask; private String bridgeNameSchema; private Long libvirtVersion; @@ -74,25 +75,15 @@ public class BridgeVifDriver extends VifDriverBase { bridgeNameSchema = (String)params.get("network.bridge.name.schema"); -String linkLocalCidr = (String)params.get("network.linklocal.cidr"); -if (StringUtils.isNotBlank(linkLocalCidr)) { -_linkLocalCidr = linkLocalCidr; +String controlCidr = (String)params.get("control.cidr"); +if (StringUtils.isNotBlank(controlCidr)) { +_controlCidr = controlCidr; } -String linkLocalAddress = (String)params.get("network.linklocal.address"); -if (StringUtils.isNotBlank(linkLocalAddress)) { -_linkLocalAddress = linkLocalAddress; -} - -String linkLocalGateway = (String)params.get("network.linklocal.gateway"); -if (StringUtils.isNotBlank(linkLocalGateway)) { -_linkLocalGateway = linkLocalGateway; -} - -String linkLocalNetmask = (String)params.get("network.linklocal.netmask"); -if (StringUtils.isNotBlank(linkLocalNetmask)) { -_linkLocalNetmask = _linkLocalNetmask; -} +SubnetUtils subnetUtils = new SubnetUtils(_controlCidr); +_linkLocalGateway = subnetUtils.getInfo().getLowAddress(); +_linkLocalNetmask = subnetUtils.getInfo().getNetmask(); +_linkLocalAddress = _linkLocalGateway + "/" + _linkLocalNetmask; String value = (String)params.get("scripts.timeout"); _timeout = NumbersUtil.parseInt(value, 30 * 60) * 1000; @@ -409,7 +400,7 @@ public class BridgeVifDriver extends VifDriverBase { private void deleteExistingLinkLocalRouteTable(String linkLocalBr) { Script command = new Script("/bin/bash", _timeout); command.add("-c"); -command.add("ip route | grep " + _linkLocalCidr); +command.add("ip route | grep " + _controlCidr); OutputInterpreter.AllLinesParser parser = new OutputInterpreter.AllLinesParser(); String result = command.execute(parser); boolean foundLinkLocalBr = false; @@ -422,15 +413,15 @@ public class BridgeVifDriver extends VifDriverBase { } final String device = tokens[2]; if (!Strings.isNullOrEmpty(device) && !device.equalsIgnoreCase(linkLocalBr)) { -Script.runSimpleBashScript("ip route del " + _linkLocalCidr + " dev " + tokens[2
[cloudstack] 08/09: Resolved merge conflict.
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit c6359f229c004013247bedef162480e8aa3307ac Author: Wido den Hollander AuthorDate: Tue Jul 16 14:26:00 2019 +0200 Resolved merge conflict. --- .../hypervisor/kvm/resource/BridgeVifDriver.java | 27 +- .../hypervisor/kvm/resource/IvsVifDriver.java | 296 - .../hypervisor/kvm/resource/OvsVifDriver.java | 24 +- .../main/java/com/cloud/utils/net/NetUtils.java| 4 + .../java/com/cloud/utils/net/NetUtilsTest.java | 1 + 5 files changed, 32 insertions(+), 320 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java index 8466514..007a545 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java @@ -29,18 +29,16 @@ import java.util.regex.Pattern; import javax.naming.ConfigurationException; import com.cloud.utils.StringUtils; -import org.apache.commons.net.util.SubnetUtils; +import com.cloud.utils.net.NetUtils; +import com.cloud.utils.script.OutputInterpreter; +import com.google.common.base.Strings; import org.apache.log4j.Logger; import org.libvirt.LibvirtException; -import com.google.common.base.Strings; - import com.cloud.agent.api.to.NicTO; import com.cloud.exception.InternalErrorException; import com.cloud.network.Networks; import com.cloud.utils.NumbersUtil; -import com.cloud.utils.net.NetUtils; -import com.cloud.utils.script.OutputInterpreter; import com.cloud.utils.script.Script; public class BridgeVifDriver extends VifDriverBase { @@ -51,11 +49,8 @@ public class BridgeVifDriver extends VifDriverBase { private final Object _vnetBridgeMonitor = new Object(); private String _modifyVlanPath; private String _modifyVxlanPath; -private String _controlCidr = NetUtils.getLinkLocalCIDR(); -private String _linkLocalGateway; -private String _linkLocalNetmask; -private String _linkLocalAddress; private String bridgeNameSchema; +private String _controlCidr = NetUtils.getLinkLocalCIDR(); private Long libvirtVersion; @Override @@ -80,10 +75,6 @@ public class BridgeVifDriver extends VifDriverBase { _controlCidr = controlCidr; } -_linkLocalGateway = NetUtils.getLinkLocalGatewayFromCIDR(_controlCidr); -_linkLocalNetmask = NetUtils.getLinkLocalNetmaskFromCIDR(_controlCidr); -_linkLocalAddress = _linkLocalGateway + "/" + _linkLocalNetmask; - String value = (String)params.get("scripts.timeout"); _timeout = NumbersUtil.parseInt(value, 30 * 60) * 1000; @@ -418,9 +409,10 @@ public class BridgeVifDriver extends VifDriverBase { } } } + if (!foundLinkLocalBr) { -Script.runSimpleBashScript("ip address add " + _linkLocalAddress + " dev " + linkLocalBr + ";" + "ip route add " + _controlCidr + " dev " + linkLocalBr + " src " + -_linkLocalGateway); +Script.runSimpleBashScript("ip address add " + NetUtils.getLinkLocalAddressFromCIDR(_controlCidr) + " dev " + linkLocalBr); +Script.runSimpleBashScript("ip route add " + _controlCidr + " dev " + linkLocalBr + " src " + NetUtils.getLinkLocalGatewayFromCIDR(_controlCidr)); } } @@ -428,11 +420,12 @@ public class BridgeVifDriver extends VifDriverBase { createControlNetwork(_bridges.get("linklocal")); } -@Override public void createControlNetwork(String privBrName) { deleteExistingLinkLocalRouteTable(privBrName); if (!isExistingBridge(privBrName)) { -Script.runSimpleBashScript("brctl addbr " + privBrName + "; ip link set " + privBrName + " up; ip address add " + _linkLocalAddress + " dev " + privBrName, _timeout); +Script.runSimpleBashScript("ip link add name " + privBrName + " type bridge"); +Script.runSimpleBashScript("ip link set " + privBrName + " up"); +Script.runSimpleBashScript("ip address add " + NetUtils.getLinkLocalAddressFromCIDR(_controlCidr) + " dev " + privBrName); } } diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/IvsVifDriver.java deleted file mode 100644 index 4ba0114..000 --- a/plugins/hyper
[cloudstack] branch cloud0-cidr-412 created (now 359a81b)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at 359a81b Minor fixes and expansion of Unit Tests This branch includes the following new commits: new f2d38da kvm/bridge: Allow Link Local Cidr (cloud0 interface) to be configured new cd59621 Add UnitTests to BridgeVifDriver and NetUtils new 2c730de Have the control cidr being honered by the mgmt server when creating a network new ec84f62 Only parse values if control.cidr set in agent properties new d70cfb2 Send control.cidr parameter from Management Server to KVM Agent on connect new 10dff01 Move some logic to NetUtils and add Tests for this new 2d7af0c Revert "Send control.cidr parameter from Management Server to KVM Agent on connect" new c6359f2 Resolved merge conflict. new 359a81b Minor fixes and expansion of Unit Tests The 9 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] 09/09: Minor fixes and expansion of Unit Tests
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 359a81bcb321dd6a386b123840819c8e314fc5e6 Author: Wido den Hollander AuthorDate: Tue Jul 16 14:37:07 2019 +0200 Minor fixes and expansion of Unit Tests Signed-off-by: Wido den Hollander --- .../java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java| 1 + .../main/java/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java | 1 + utils/src/main/java/com/cloud/utils/net/NetUtils.java | 7 +-- utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java | 3 ++- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java index 007a545..2dcc9d3 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java @@ -420,6 +420,7 @@ public class BridgeVifDriver extends VifDriverBase { createControlNetwork(_bridges.get("linklocal")); } +@Override public void createControlNetwork(String privBrName) { deleteExistingLinkLocalRouteTable(privBrName); if (!isExistingBridge(privBrName)) { diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java index b4932b0..59a904b 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/OvsVifDriver.java @@ -275,6 +275,7 @@ public class OvsVifDriver extends VifDriverBase { } } +@Override public void createControlNetwork(String privBrName) { deleteExitingLinkLocalRouteTable(privBrName); if (!isExistingBridge(privBrName)) { diff --git a/utils/src/main/java/com/cloud/utils/net/NetUtils.java b/utils/src/main/java/com/cloud/utils/net/NetUtils.java index 8f096e0..79417d4 100644 --- a/utils/src/main/java/com/cloud/utils/net/NetUtils.java +++ b/utils/src/main/java/com/cloud/utils/net/NetUtils.java @@ -972,13 +972,8 @@ public class NetUtils { return subnetUtils.getInfo().getLowAddress(); } -public static String getLinkLocalNetmaskFromCIDR(final String cidr) { -SubnetUtils subnetUtils = new SubnetUtils(cidr); -return subnetUtils.getInfo().getNetmask(); -} - public static String getLinkLocalAddressFromCIDR(final String cidr) { -return getLinkLocalGatewayFromCIDR(cidr) + "/" + getLinkLocalNetmaskFromCIDR(cidr); +return getLinkLocalGatewayFromCIDR(cidr) + "/" + cidr2Netmask(cidr); } public static String[] getLinkLocalIPRange(final String cidr) { diff --git a/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java b/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java index cb9a228..c570d0d 100644 --- a/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java +++ b/utils/src/test/java/com/cloud/utils/net/NetUtilsTest.java @@ -717,8 +717,8 @@ public class NetUtilsTest { assertEquals("169.254.0.1", NetUtils.getLinkLocalGateway()); assertEquals("169.254.0.0/16", cidr); assertEquals("169.254.0.1", NetUtils.getLinkLocalGatewayFromCIDR(cidr)); -assertEquals("255.255.0.0", NetUtils.getLinkLocalNetmaskFromCIDR(cidr)); assertEquals("169.254.0.1/255.255.0.0", NetUtils.getLinkLocalAddressFromCIDR(cidr)); +assertEquals("169.254.240.1/255.255.240.0", NetUtils.getLinkLocalAddressFromCIDR("169.254.240.0/20")); String[] range = NetUtils.getLinkLocalIPRange("169.254.0.0/16"); assertEquals("169.254.0.2", range[0]); @@ -729,5 +729,6 @@ public class NetUtilsTest { public void testCidrNetmask() { assertEquals("255.255.255.0", NetUtils.cidr2Netmask("192.168.0.0/24")); assertEquals("255.255.0.0", NetUtils.cidr2Netmask("169.254.0.0/16")); +assertEquals("255.255.240.0", NetUtils.cidr2Netmask("169.254.240.0/20")); } }
[cloudstack] 01/09: kvm/bridge: Allow Link Local Cidr (cloud0 interface) to be configured
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit f2d38daee1f4cf9820b1e939d80afdb74f50bbe3 Author: Wido den Hollander AuthorDate: Fri Jul 12 10:54:41 2019 +0200 kvm/bridge: Allow Link Local Cidr (cloud0 interface) to be configured There are certain scenarios where the 169.254.0.0/16 subnet is used for different purposes then CloudStack on a hypervisor. Once of such scenarios is a BGP+EVPN+VXLAN setup using BGP Unnumbered where the 169.254.0.1 address is used by Frr/Zebra BGP routing to send traffic to the neighboring router. The following settings can be changed in the agent.properties (default values added): network.linklocal.cidr=169.254.0.0/16 network.linklink.address=169.254.0.1/16 network.linklocal.gateway=169.254.0.1 network.linklocal.netmask=255.255.255.0 Make sure the global setting 'control.cidr' matches the values defined in the agent.propeties! Signed-off-by: Wido den Hollander --- .../hypervisor/kvm/resource/BridgeVifDriver.java | 35 ++ 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java index ebaf23f..0aef2c5 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java @@ -28,6 +28,7 @@ import java.util.regex.Pattern; import javax.naming.ConfigurationException; +import com.cloud.utils.StringUtils; import org.apache.log4j.Logger; import org.libvirt.LibvirtException; @@ -49,6 +50,10 @@ public class BridgeVifDriver extends VifDriverBase { private final Object _vnetBridgeMonitor = new Object(); private String _modifyVlanPath; private String _modifyVxlanPath; +private String _linkLocalCidr = "169.254.0.0/16"; +private String _linkLocalAddress = "169.254.0.1/16"; +private String _linkLocalGateway = NetUtils.getLinkLocalGateway(); +private String _linkLocalNetmask = NetUtils.getLinkLocalNetMask(); private String bridgeNameSchema; private Long libvirtVersion; @@ -69,6 +74,26 @@ public class BridgeVifDriver extends VifDriverBase { bridgeNameSchema = (String)params.get("network.bridge.name.schema"); +String linkLocalCidr = (String)params.get("network.linklocal.cidr"); +if (StringUtils.isNotBlank(linkLocalCidr)) { +_linkLocalCidr = linkLocalCidr; +} + +String linkLocalAddress = (String)params.get("network.linklocal.address"); +if (StringUtils.isNotBlank(linkLocalAddress)) { +_linkLocalAddress = linkLocalAddress; +} + +String linkLocalGateway = (String)params.get("network.linklocal.gateway"); +if (StringUtils.isNotBlank(linkLocalGateway)) { +_linkLocalGateway = linkLocalGateway; +} + +String linkLocalNetmask = (String)params.get("network.linklocal.netmask"); +if (StringUtils.isNotBlank(linkLocalNetmask)) { +_linkLocalNetmask = _linkLocalNetmask; +} + String value = (String)params.get("scripts.timeout"); _timeout = NumbersUtil.parseInt(value, 30 * 60) * 1000; @@ -384,7 +409,7 @@ public class BridgeVifDriver extends VifDriverBase { private void deleteExistingLinkLocalRouteTable(String linkLocalBr) { Script command = new Script("/bin/bash", _timeout); command.add("-c"); -command.add("ip route | grep " + NetUtils.getLinkLocalCIDR()); +command.add("ip route | grep " + _linkLocalCidr); OutputInterpreter.AllLinesParser parser = new OutputInterpreter.AllLinesParser(); String result = command.execute(parser); boolean foundLinkLocalBr = false; @@ -397,15 +422,15 @@ public class BridgeVifDriver extends VifDriverBase { } final String device = tokens[2]; if (!Strings.isNullOrEmpty(device) && !device.equalsIgnoreCase(linkLocalBr)) { -Script.runSimpleBashScript("ip route del " + NetUtils.getLinkLocalCIDR() + " dev " + tokens[2]); +Script.runSimpleBashScript("ip route del " + _linkLocalCidr + " dev " + tokens[2]); } else { foundLinkLocalBr = true; } } } if (!foundLinkLocalBr) { -Script.runSimpleBashScript("ip address add 169.254.0.1/16 dev " + linkLocalBr + ";&
[cloudstack] 07/09: Revert "Send control.cidr parameter from Management Server to KVM Agent on connect"
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch cloud0-cidr-412 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 2d7af0cc90d6a478e80fedc7dcb1c51a8cfa0572 Author: Wido den Hollander AuthorDate: Tue Jul 16 13:34:21 2019 +0200 Revert "Send control.cidr parameter from Management Server to KVM Agent on connect" This reverts commit 1caa791aa7cd8c2849bcd74ed03f34ab95f74826. --- .../src/main/java/com/cloud/agent/manager/AgentManagerImpl.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java b/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java index 07d16bf..6091131 100644 --- a/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java +++ b/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java @@ -38,7 +38,6 @@ import java.util.concurrent.locks.ReentrantLock; import javax.inject.Inject; import javax.naming.ConfigurationException; -import com.cloud.configuration.Config; import org.apache.cloudstack.agent.lb.IndirectAgentLB; import org.apache.cloudstack.ca.CAManager; import org.apache.cloudstack.framework.config.ConfigKey; @@ -1751,7 +1750,6 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl if (((StartupRoutingCommand)cmd).getHypervisorType() == HypervisorType.KVM || ((StartupRoutingCommand)cmd).getHypervisorType() == HypervisorType.LXC) { Map params = new HashMap(); params.put("router.aggregation.command.each.timeout", _configDao.getValue("router.aggregation.command.each.timeout")); -params.put(Config.ControlCidr.key(), _configDao.getValue(Config.ControlCidr.key())); try { SetHostParamsCommand cmds = new SetHostParamsCommand(params);
[cloudstack-www] branch master updated: updated events on startpage (#56)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git The following commit(s) were added to refs/heads/master by this push: new fa86199 updated events on startpage (#56) fa86199 is described below commit fa8619906a98e8d2683d9c4212d2ab7099a18af3 Author: sbrueseke AuthorDate: Fri Apr 5 14:48:14 2019 +0200 updated events on startpage (#56) * updated events on startpage * fixed links of events to open in new tap --- source/index.html.erb | 42 +- 1 file changed, 29 insertions(+), 13 deletions(-) diff --git a/source/index.html.erb b/source/index.html.erb index e11d308..1139679 100644 --- a/source/index.html.erb +++ b/source/index.html.erb @@ -135,31 +135,40 @@ Join Us https://www.meetup.com/german-CloudStack-user-group/; + href="https://www.meetup.com/de-DE/german-CloudStack-user-group/events/259269366/; target="_blank" > -CloudStack European User Group +April CloudStack Meetup (Germany) -, Frankfurt, 28th February +, Sankt Augustin (Bonn), 11th April https://www.eventbrite.co.uk/e/cloudstack-european-user-group-ceph-day-tickets-42670526694; +href="http://br.cloudstackcollab.org/; +target="_blank" > -Cloudstack and Ceph day +CloudStack Collaboration Conference Brazil -, London, 19th April +, Florianopolis, 26th April -https://apachecon.com/;>Apache EU Roadshow, -Berlin, 13-14 June - +https://www.eventbrite.co.uk/e/cloudstack-european-user-group-meetup-tickets-55911193886; +target="_blank" +> +CloudStack European User Group meetup + +, Sofia, 13th June + -http://cloudstackcollab.org/;> -CloudStack Collaboration Conference +http://us.cloudstackcollab.org/; +target="_blank" +> +CloudStack Collaboration Conference North America -, Montreal, 24th-29th September - +, Las Vegas, 9th - 11th September + View videos from previous CloudStack Collaboration Conferences: @@ -167,6 +176,13 @@ Join Us https://www.youtube.com/playlist?list=PLU2OcwpQkYCwcPxZMKX2BFoKE0Z7g1ENH; +target="_blank"> +CloudStack Collaboration Conference June 2018 in Montreal + + + +https://www.youtube.com/playlist?list=PLCfLScXpEyAS4YkJpeqDriP7JcU82Tx2r; target="_blank"> CloudStack Collaboration Conference June 2016 in Montreal
[cloudstack-www] branch asf-site updated: Fix 4.12.0.0 download link pointing to http://www.apache.org/dyn/closer.lua/cloudstack/releases/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/cloudstack-www.git The following commit(s) were added to refs/heads/asf-site by this push: new e2ad5be Fix 4.12.0.0 download link pointing to http://www.apache.org/dyn/closer.lua/cloudstack/releases/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 e2ad5be is described below commit e2ad5be188c8ce1223119e2b4ed02352dd661041 Author: GabrielBrascher AuthorDate: Wed Apr 3 14:05:07 2019 -0300 Fix 4.12.0.0 download link pointing to http://www.apache.org/dyn/closer.lua/cloudstack/releases/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 --- content/downloads.html| 4 +++- source/downloads.html.erb | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/content/downloads.html b/content/downloads.html index 0c53647..a649292 100644 --- a/content/downloads.html +++ b/content/downloads.html @@ -287,7 +287,7 @@ This is non-LTS release of CloudStack. -https://dist.apache.org/repos/dist/release/cloudstack/releases/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2;> +http://www.apache.org/dyn/closer.lua/cloudstack/releases/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2;> Get the 4.12.0.0 Source @@ -466,6 +466,8 @@ Additionally, you can verify the MD5 or SHA512 signatures on the files. You can find links to all the releases of Apache CloudStack on the archives page. + + Copyright © 2017 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. "Apache", "CloudStack", "Apache CloudStack", the Apache CloudStack logo, the Apache CloudStack Cloud Monkey logo and the Apache feather logos are registered trademarks or trademarks of The Apache Software Foundation. diff --git a/source/downloads.html.erb b/source/downloads.html.erb index 9901d03..e7e6ed2 100644 --- a/source/downloads.html.erb +++ b/source/downloads.html.erb @@ -161,7 +161,7 @@ <% end %> -https://dist.apache.org/repos/dist/release/cloudstack/releases/<%= data.cloudstack.versions.main %>/apache-cloudstack-<%= data.cloudstack.versions.main %>-src.tar.bz2"> +http://www.apache.org/dyn/closer.lua/cloudstack/releases/<%= data.cloudstack.versions.main %>/apache-cloudstack-<%= data.cloudstack.versions.main %>-src.tar.bz2"> Get the <%= data.cloudstack.versions.main %> Source
[cloudstack-documentation] annotated tag 4.12.0.0 updated (951299e -> 81a8130)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to annotated tag 4.12.0.0 in repository https://gitbox.apache.org/repos/asf/cloudstack-documentation.git. *** WARNING: tag 4.12.0.0 was modified! *** from 951299e (tag) to 81a8130 (tag) tagging af1371881b151a1374faaa57bdb70c24a7ae9e28 (commit) replaces 4.11.1.0 by GabrielBrascher on Tue Apr 2 14:59:06 2019 -0300 - Log - Updated documentation for 4.12.0.0 release --- from 15ead30 initial update for create 4.12 with updated global values add af13718 Fixed issues 41200 (#35) No new revisions were added by this update. Summary of changes: source/releasenotes/about.rst | 51 +- source/releasenotes/api-changes.rst | 7 +- source/releasenotes/compat.rst| 2 +- source/releasenotes/fixed_issues.rst | 859 ++ source/upgrading/upgrade/upgrade-4.11.rst | 2 +- 5 files changed, 916 insertions(+), 5 deletions(-)
[cloudstack-documentation] branch master updated (61a6e15 -> af13718)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack-documentation.git. from 61a6e15 qig: fix libvirt port (#32) add 15ead30 initial update for create 4.12 with updated global values add af13718 Fixed issues 41200 (#35) No new revisions were added by this update. Summary of changes: source/conf.py| 4 +- source/releasenotes/about.rst | 51 +- source/releasenotes/api-changes.rst | 7 +- source/releasenotes/compat.rst| 2 +- source/releasenotes/fixed_issues.rst | 859 ++ source/upgrading/upgrade/upgrade-4.11.rst | 2 +- 6 files changed, 918 insertions(+), 7 deletions(-)
[cloudstack-documentation] branch 4.12 updated: Fixed issues 41200 (#35)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch 4.12 in repository https://gitbox.apache.org/repos/asf/cloudstack-documentation.git The following commit(s) were added to refs/heads/4.12 by this push: new af13718 Fixed issues 41200 (#35) af13718 is described below commit af1371881b151a1374faaa57bdb70c24a7ae9e28 Author: Gabriel Beims Bräscher AuthorDate: Mon Apr 1 11:10:24 2019 -0300 Fixed issues 41200 (#35) * 4.12.0.0 issues fixed * 4.12 API changes and upgrade from 4.11 * Issues fixed updated considering also commits in 4.12.0.0 & 4.11.3 * Update supported Ubuntu versions. * Add |version| for 4.12 release * Update changes list, adding 'Drop support for Ubuntu 14.04' * Address issues raised by Wido's review --- source/releasenotes/about.rst | 51 +- source/releasenotes/api-changes.rst | 7 +- source/releasenotes/compat.rst| 2 +- source/releasenotes/fixed_issues.rst | 859 ++ source/upgrading/upgrade/upgrade-4.11.rst | 2 +- 5 files changed, 916 insertions(+), 5 deletions(-) diff --git a/source/releasenotes/about.rst b/source/releasenotes/about.rst index 549ade6..5f2334d 100644 --- a/source/releasenotes/about.rst +++ b/source/releasenotes/about.rst @@ -16,18 +16,65 @@ What's New in |release| === +Version |release| is a |version| non-LTS release adding multiple features for those who want to access a fresh CloudStack prior to our next LTS. +|release| combines 12 months of work and adds +200 commits, with multiple new features and fixes. + +Some of the changes are presented in this quick summary (this is not a complete list): + +* Drop support for Ubuntu 14.04 +* Allow users of all types to create L2 networks +* keystore: don't restart systemvm cloud.service post cert +* Add back ability to disable backup of snapshot to secondary +* API: add command to list management servers +* UI: Fix "Migrate instance to another host" popup modal +* UI: Fix issue with verification of ipv4/ipv6 address. +* UI: Fix UI bug: Create Network Offering Popup has no fields +* UI: Update jquery and related libraries +* network: Offerings do not have to have Security Grouping enabled +* Vmware offline migration +* IP address acquired with associate ip address is marked as source nat +* ipv6: allow Secondary IPv6 addresses to be EUI-64 +* ipv6: Send userdata to Virtual Router if IPv6 is enabled +* ipv6: Calculate IPv6 address instead of fetching one from a pool +* ipv6: Advanced Networking Security Groups are supported +* ipv6: Allow specification of IPv6 details when creating Basic network +* Enable remote debugging for the management server, usage server, and KVM agent +* Security Group: add secondary ips to the correct ipset based on ip family (4.11) +* Security Group: add secondary ips to the correct ipset +* XenServer: fix Security Groups 'vmops' script +* XenServer: Support online storage migration from non-managed to managed storage +* KVM: Security Group enhancements and refactor old code +* KVM: Properly report available memory to Management Server +* KVM: Add influxdb to statscollector +* KVM: add libvirt / qemu IO bursting +* KVM: Refactory VXLAN script and add IPv6 support +* KVM: Set amount of queues for Virtio SCSI driver to vCPU of Instance +* KVM: Use 'ip route show default 0.0.0.0/0' to find the default gateway +* KVM: Add KVM Guest OS mapping for Windows Server 2019 +* KVM: Enable DPDK support on KVM +* KVM: Allow KVM VM live migration with ROOT volume on file storage type +* Prevent corner case for infinite PrepareForMaintenance +* Enhance bypass vlan overlap check +* Improved support for Java 8 for building artifacts/modules, packaging, and in +* Destroy VM also removes volumes +* Users are able to change/edit the protocol of an ACL rule +* allows to remove local primary storage +* Support requesting a specific IPv4 address in Basic Networking during Instance creation +* Adding zone disablement during deletion of the range +* Display mac address in nic detail view +* Cleanup methods, classes, and POMs What's New in 4.11.2.0 -- -The new |release| version is a |version| maintainance release containing over 70 +The new 4.11.2.0 version is a 4.11 maintainance release containing over 70 fixes and improvements on the 4.11.1.0 release. What's New in 4.11.1.0 -- -The new |release| version is a |version| maintainance release containing over 140 +The new 4.11.1.0 version is a 4.11 maintainance release containing over 140 fixes and improvements on the 4.11.0.0 release. These include the speeding up of virtual router deployments and fixes for corner cases diff --git a/source/releasenotes/api-changes.rst b/source/releasenotes/api-changes.rst index e5b437c..c2cea13 100644 --- a/source/releasenotes/api-changes.rs
[cloudstack] branch 4.12.0.0-RC20190212T2301 deleted (was e5b3aa4)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch 4.12.0.0-RC20190212T2301 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. was e5b3aa4 Updating pom.xml version numbers for release 4.12.0.0 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[cloudstack] branch 4.12.0.0-RC20190314T1011 deleted (was a137398)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch 4.12.0.0-RC20190314T1011 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. was a137398 Updating pom.xml version numbers for release 4.12.0.0 The revisions that were on this branch are still contained in other references; therefore, this change does not discard any commits from the repository.
[cloudstack] branch 4.12.0.0-RC20190306T1109 deleted (was 9c0cbf9)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch 4.12.0.0-RC20190306T1109 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. was 9c0cbf9 Updating pom.xml version numbers for release 4.12.0.0 This change permanently discards the following revisions: discard 9c0cbf9 Updating pom.xml version numbers for release 4.12.0.0
[cloudstack] branch master updated: Updating pom.xml version numbers for release 4.13.0.0-SNAPSHOT
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 8d3feb1 Updating pom.xml version numbers for release 4.13.0.0-SNAPSHOT 8d3feb1 is described below commit 8d3feb100aab4a45b31a789f444038b892161eec Author: GabrielBrascher AuthorDate: Wed Mar 20 18:47:35 2019 -0300 Updating pom.xml version numbers for release 4.13.0.0-SNAPSHOT Signed-off-by: GabrielBrascher --- agent/pom.xml | 2 +- api/pom.xml | 2 +- client/pom.xml| 2 +- core/pom.xml | 2 +- debian/changelog | 8 developer/pom.xml | 2 +- engine/api/pom.xml| 2 +- engine/components-api/pom.xml | 2 +- engine/network/pom.xml| 2 +- engine/orchestration/pom.xml | 2 +- engine/pom.xml| 2 +- engine/schema/pom.xml | 2 +- engine/service/pom.xml| 2 +- engine/storage/cache/pom.xml | 2 +- engine/storage/configdrive/pom.xml| 2 +- engine/storage/datamotion/pom.xml | 2 +- engine/storage/image/pom.xml | 2 +- engine/storage/integration-test/pom.xml | 2 +- engine/storage/pom.xml| 2 +- engine/storage/snapshot/pom.xml | 2 +- engine/storage/volume/pom.xml | 2 +- framework/agent-lb/pom.xml| 2 +- framework/ca/pom.xml | 2 +- framework/cluster/pom.xml | 2 +- framework/config/pom.xml | 2 +- framework/db/pom.xml | 2 +- framework/direct-download/pom.xml | 2 +- framework/events/pom.xml | 2 +- framework/ipc/pom.xml | 2 +- framework/jobs/pom.xml| 2 +- framework/managed-context/pom.xml | 2 +- framework/pom.xml | 2 +- framework/quota/pom.xml | 2 +- framework/rest/pom.xml| 2 +- framework/security/pom.xml| 2 +- framework/spring/lifecycle/pom.xml| 2 +- framework/spring/module/pom.xml | 2 +- plugins/acl/dynamic-role-based/pom.xml| 2 +- plugins/acl/static-role-based/pom.xml | 2 +- plugins/affinity-group-processors/explicit-dedication/pom.xml | 2 +- plugins/affinity-group-processors/host-affinity/pom.xml | 2 +- plugins/affinity-group-processors/host-anti-affinity/pom.xml | 2 +- plugins/alert-handlers/snmp-alerts/pom.xml| 2 +- plugins/alert-handlers/syslog-alerts/pom.xml | 2 +- plugins/api/discovery/pom.xml | 2 +- plugins/api/rate-limit/pom.xml| 2 +- plugins/api/solidfire-intg-test/pom.xml | 2 +- plugins/api/vmware-sioc/pom.xml | 2 +- plugins/ca/root-ca/pom.xml| 2 +- plugins/database/mysql-ha/pom.xml | 2 +- plugins/database/quota/pom.xml| 2 +- plugins/dedicated-resources/pom.xml | 2 +- plugins/deployment-planners/implicit-dedication/pom.xml | 2 +- plugins/deployment-planners/user-concentrated-pod/pom.xml | 2 +- plugins/deployment-planners/user-dispersing/pom.xml | 2 +- plugins/event-bus/inmemory/pom.xml| 2 +- plugins/event-bus/kafka/pom.xml | 2 +- plugins/event-bus/rabbitmq/pom.xml| 2 +- plugins/ha-planners/skip-heurestics/pom.xml | 2 +- plugins/host-allocators/random/pom.xml| 2 +- plugins/hypervisors/baremetal/pom.xml | 2 +- plugins/hypervisors/hyperv/pom.xml| 2 +- plugins/hypervisors/kvm/pom.xml | 2
[cloudstack] branch master updated (a6f4d6d -> a137398)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from a6f4d6d Merge remote-tracking branch 'origin/4.11' add a137398 Updating pom.xml version numbers for release 4.12.0.0 No new revisions were added by this update. Summary of changes: agent/pom.xml | 2 +- api/pom.xml | 2 +- client/pom.xml| 2 +- core/pom.xml | 2 +- debian/changelog | 6 ++ developer/pom.xml | 2 +- engine/api/pom.xml| 2 +- engine/components-api/pom.xml | 2 +- engine/network/pom.xml| 2 +- engine/orchestration/pom.xml | 2 +- engine/pom.xml| 2 +- engine/schema/pom.xml | 2 +- engine/service/pom.xml| 2 +- engine/storage/cache/pom.xml | 2 +- engine/storage/configdrive/pom.xml| 2 +- engine/storage/datamotion/pom.xml | 2 +- engine/storage/image/pom.xml | 2 +- engine/storage/integration-test/pom.xml | 2 +- engine/storage/pom.xml| 2 +- engine/storage/snapshot/pom.xml | 2 +- engine/storage/volume/pom.xml | 2 +- framework/agent-lb/pom.xml| 2 +- framework/ca/pom.xml | 2 +- framework/cluster/pom.xml | 2 +- framework/config/pom.xml | 2 +- framework/db/pom.xml | 2 +- framework/direct-download/pom.xml | 2 +- framework/events/pom.xml | 2 +- framework/ipc/pom.xml | 2 +- framework/jobs/pom.xml| 2 +- framework/managed-context/pom.xml | 2 +- framework/pom.xml | 2 +- framework/quota/pom.xml | 2 +- framework/rest/pom.xml| 2 +- framework/security/pom.xml| 2 +- framework/spring/lifecycle/pom.xml| 2 +- framework/spring/module/pom.xml | 2 +- plugins/acl/dynamic-role-based/pom.xml| 2 +- plugins/acl/static-role-based/pom.xml | 2 +- plugins/affinity-group-processors/explicit-dedication/pom.xml | 2 +- plugins/affinity-group-processors/host-affinity/pom.xml | 2 +- plugins/affinity-group-processors/host-anti-affinity/pom.xml | 2 +- plugins/alert-handlers/snmp-alerts/pom.xml| 2 +- plugins/alert-handlers/syslog-alerts/pom.xml | 2 +- plugins/api/discovery/pom.xml | 2 +- plugins/api/rate-limit/pom.xml| 2 +- plugins/api/solidfire-intg-test/pom.xml | 2 +- plugins/api/vmware-sioc/pom.xml | 2 +- plugins/ca/root-ca/pom.xml| 2 +- plugins/database/mysql-ha/pom.xml | 2 +- plugins/database/quota/pom.xml| 2 +- plugins/dedicated-resources/pom.xml | 2 +- plugins/deployment-planners/implicit-dedication/pom.xml | 2 +- plugins/deployment-planners/user-concentrated-pod/pom.xml | 2 +- plugins/deployment-planners/user-dispersing/pom.xml | 2 +- plugins/event-bus/inmemory/pom.xml| 2 +- plugins/event-bus/kafka/pom.xml | 2 +- plugins/event-bus/rabbitmq/pom.xml| 2 +- plugins/ha-planners/skip-heurestics/pom.xml | 2 +- plugins/host-allocators/random/pom.xml| 2 +- plugins/hypervisors/baremetal/pom.xml | 2 +- plugins/hypervisors/hyperv/pom.xml| 2 +- plugins/hypervisors/kvm/pom.xml | 2 +- plugins/hypervisors/ovm/pom.xml | 2 +- plugins/hypervisors/ovm3/pom.xml | 2 +- plugins/hypervisors/simulator/pom.xml | 2
[cloudstack] branch 4.12 created (now a137398)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch 4.12 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at a137398 Updating pom.xml version numbers for release 4.12.0.0 No new revisions were added by this update.
[cloudstack] tag 4.12.0.0 created (now a137398)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to tag 4.12.0.0 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at a137398 (commit) No new revisions were added by this update.
[cloudstack] 01/01: Updating pom.xml version numbers for release 4.12.0.0
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch 4.12.0.0-RC20190314T1011 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit a137398bf106028d2fd5344d599fcd2b560d2944 Author: GabrielBrascher AuthorDate: Thu Mar 14 10:11:46 2019 -0300 Updating pom.xml version numbers for release 4.12.0.0 Signed-off-by: GabrielBrascher --- agent/pom.xml | 2 +- api/pom.xml | 2 +- client/pom.xml| 2 +- core/pom.xml | 2 +- debian/changelog | 6 ++ developer/pom.xml | 2 +- engine/api/pom.xml| 2 +- engine/components-api/pom.xml | 2 +- engine/network/pom.xml| 2 +- engine/orchestration/pom.xml | 2 +- engine/pom.xml| 2 +- engine/schema/pom.xml | 2 +- engine/service/pom.xml| 2 +- engine/storage/cache/pom.xml | 2 +- engine/storage/configdrive/pom.xml| 2 +- engine/storage/datamotion/pom.xml | 2 +- engine/storage/image/pom.xml | 2 +- engine/storage/integration-test/pom.xml | 2 +- engine/storage/pom.xml| 2 +- engine/storage/snapshot/pom.xml | 2 +- engine/storage/volume/pom.xml | 2 +- framework/agent-lb/pom.xml| 2 +- framework/ca/pom.xml | 2 +- framework/cluster/pom.xml | 2 +- framework/config/pom.xml | 2 +- framework/db/pom.xml | 2 +- framework/direct-download/pom.xml | 2 +- framework/events/pom.xml | 2 +- framework/ipc/pom.xml | 2 +- framework/jobs/pom.xml| 2 +- framework/managed-context/pom.xml | 2 +- framework/pom.xml | 2 +- framework/quota/pom.xml | 2 +- framework/rest/pom.xml| 2 +- framework/security/pom.xml| 2 +- framework/spring/lifecycle/pom.xml| 2 +- framework/spring/module/pom.xml | 2 +- plugins/acl/dynamic-role-based/pom.xml| 2 +- plugins/acl/static-role-based/pom.xml | 2 +- plugins/affinity-group-processors/explicit-dedication/pom.xml | 2 +- plugins/affinity-group-processors/host-affinity/pom.xml | 2 +- plugins/affinity-group-processors/host-anti-affinity/pom.xml | 2 +- plugins/alert-handlers/snmp-alerts/pom.xml| 2 +- plugins/alert-handlers/syslog-alerts/pom.xml | 2 +- plugins/api/discovery/pom.xml | 2 +- plugins/api/rate-limit/pom.xml| 2 +- plugins/api/solidfire-intg-test/pom.xml | 2 +- plugins/api/vmware-sioc/pom.xml | 2 +- plugins/ca/root-ca/pom.xml| 2 +- plugins/database/mysql-ha/pom.xml | 2 +- plugins/database/quota/pom.xml| 2 +- plugins/dedicated-resources/pom.xml | 2 +- plugins/deployment-planners/implicit-dedication/pom.xml | 2 +- plugins/deployment-planners/user-concentrated-pod/pom.xml | 2 +- plugins/deployment-planners/user-dispersing/pom.xml | 2 +- plugins/event-bus/inmemory/pom.xml| 2 +- plugins/event-bus/kafka/pom.xml | 2 +- plugins/event-bus/rabbitmq/pom.xml| 2 +- plugins/ha-planners/skip-heurestics/pom.xml | 2 +- plugins/host-allocators/random/pom.xml| 2 +- plugins/hypervisors/baremetal/pom.xml | 2 +- plugins/hypervisors/hyperv/pom.xml| 2 +- plugins/hypervisors/kvm/pom.xml | 2 +- plugins/hypervisors/ovm/pom.xml | 2 +- plugins/hypervisors/ovm3/pom.xml | 2 +- plugins/hypervisors/simulator
[cloudstack] branch 4.12.0.0-RC20190314T1011 created (now a137398)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch 4.12.0.0-RC20190314T1011 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at a137398 Updating pom.xml version numbers for release 4.12.0.0 This branch includes the following new commits: new a137398 Updating pom.xml version numbers for release 4.12.0.0 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.
svn commit: r32920 - in /dev/cloudstack/4.12.0.0: apache-cloudstack-4.12.0.0-src.tar.bz2 apache-cloudstack-4.12.0.0-src.tar.bz2.asc apache-cloudstack-4.12.0.0-src.tar.bz2.md5 apache-cloudstack-4.12.0.
Author: gabriel Date: Thu Mar 14 13:17:40 2019 New Revision: 32920 Log: Committing release candidate artifacts for 4.12.0.0 to dist/dev/cloudstack in preparation for release vote Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 (with props) dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 == Binary file - no diff available. Propchange: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 -- svn:mime-type = application/octet-stream Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc Thu Mar 14 13:17:40 2019 @@ -0,0 +1,17 @@ +-BEGIN PGP SIGNATURE- +Version: GnuPG v1 + +iQIcBAABAgAGBQJcilMYAAoJEOgcqc4lkIRVqEsQANJ1ouAHaYtewL4awvl5kbFJ +HBG0b0HaHLd9Nnp/1xDUnZfptKwGGRe8a3UX3QTSc/jJt9KoiAAes50mAziqyY9v +Bbde6YkXB0i+kTr5hKrZPrS9Ifp9b3UfB2+hMCwQG69LqGnDFIwPE6oWDM57xCwZ +qd5RaK7gS1e0Mh/Bso+XE3ZqgaUVqT8SXsTTc3Xuap9mRTwFWIPLPthz9m1MSMb+ +gIAPT0La0cgDokjrf4eS88FnSMtzlBfpd0yqqN9/Jf+Kfzm9/KZPSHVIfVBjUPwy +RcOUOIkVzxYJ1kp2vTU2Zhh0GbjcoM9mbhF6Br9w++jP2KSUGkOR8pXOg8P09EA1 +Uprqy0rgT+pcQhlyrTRG2F/aVeB0lU3GCGccOQQkYGDUJ6mMFfRLJr/OmzPuwDTK +NHe+ANbLtiKz1iInfr0GDMVhBrv63ZcyEw7Mc7hYTnQKeR+akinDRdtKS/vRR54F +3K579s2nmSoXva3oLLCvLEdxEwnMnroIcJE2k/DX2qxysmxX+zeoptpCINcF +F+YnSzCwuOOJt38pescm6ryh8iSczbIVkn5T+bTB+yxx+E7E3IJMRise5y3MOWJB +ul0NoviDot9gapi2QoCRfUMfvjHkjxju9W7xvNr+1ebjFPhGJiU7sef6IPyeKFdv +5ODPoRO6GXQilXAWTNyG +=Rjec +-END PGP SIGNATURE- Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 Thu Mar 14 13:17:40 2019 @@ -0,0 +1,2 @@ +apache-cloudstack-4.12.0.0-src.tar.bz2: F6 53 30 25 58 43 E4 08 2F 80 9C 78 D5 +F9 F2 22 Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 Thu Mar 14 13:17:40 2019 @@ -0,0 +1,4 @@ +apache-cloudstack-4.12.0.0-src.tar.bz2: 31390571 116EB244 6374BFD2 B5D5B300 +0FAF83D2 8F7A2690 2FD52794 EEDB7234 +25201CB7 37B95CC0 BC1C4A60 1434DBC6 +0C112951 7A1D8218 97668CB8 21466636
[cloudstack] branch 4.11 updated: systemd: Fix -Dpid arg passing to systemd usage service (#3210)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch 4.11 in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/4.11 by this push: new f7327c7 systemd: Fix -Dpid arg passing to systemd usage service (#3210) f7327c7 is described below commit f7327c745768f27ccfe90bf7b52b7b2fccaff59d Author: Rohit Yadav AuthorDate: Thu Mar 14 17:49:12 2019 +0530 systemd: Fix -Dpid arg passing to systemd usage service (#3210) * systemd: Fix -Dpid arg passing to systemd usage service This fixes regression introduced by refactoring PR #3163 where `-Dpid` was incorrectly passed string `$$` instead of parent PID integer. Signed-off-by: Rohit Yadav * fix systemd limitation, exec using /bin/sh instead and wrap in ${} syntax https://www.freedesktop.org/software/systemd/man/systemd.service.html#Command%20lines Signed-off-by: Rohit Yadav * usage: don't hide exception from Gabriel's https://github.com/apache/cloudstack/pull/3207/files#diff-062fcf5ae32de59dfd6cd4f780e1d7cd Signed-off-by: Rohit Yadav --- packaging/systemd/cloudstack-usage.default | 5 - packaging/systemd/cloudstack-usage.service | 3 ++- usage/src/com/cloud/usage/UsageServer.java | 6 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packaging/systemd/cloudstack-usage.default b/packaging/systemd/cloudstack-usage.default index 26f5528..089f3ee 100644 --- a/packaging/systemd/cloudstack-usage.default +++ b/packaging/systemd/cloudstack-usage.default @@ -15,8 +15,11 @@ # specific language governing permissions and limitations # under the License. -JAVA_OPTS="-Dpid=$$ -Xms256m -Xmx2048m" +JAVA_OPTS="-Xms256m -Xmx2048m" CLASSPATH="/usr/share/cloudstack-usage/*:/usr/share/cloudstack-usage/lib/*:/usr/share/cloudstack-mysql-ha/lib/*:/etc/cloudstack/usage:/usr/share/java/mysql-connector-java.jar" JAVA_CLASS=com.cloud.usage.UsageServer + +# Enable the following to enable remote socket based debugging: +#JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,address=8001,server=y,suspend=n" diff --git a/packaging/systemd/cloudstack-usage.service b/packaging/systemd/cloudstack-usage.service index f887486..8d9dff2 100644 --- a/packaging/systemd/cloudstack-usage.service +++ b/packaging/systemd/cloudstack-usage.service @@ -24,7 +24,8 @@ After=network.target network-online.target [Service] Type=simple EnvironmentFile=/etc/default/cloudstack-usage -ExecStart=/usr/bin/java $JAVA_OPTS -cp $CLASSPATH $JAVA_CLASS +Environment=JAVA_PID=$$ +ExecStart=/bin/sh -ec '/usr/bin/java -Dpid=${JAVA_PID} $JAVA_OPTS $JAVA_DEBUG -cp $CLASSPATH $JAVA_CLASS' Restart=always RestartSec=10s diff --git a/usage/src/com/cloud/usage/UsageServer.java b/usage/src/com/cloud/usage/UsageServer.java index df3f374..5e8a69d 100644 --- a/usage/src/com/cloud/usage/UsageServer.java +++ b/usage/src/com/cloud/usage/UsageServer.java @@ -51,11 +51,7 @@ public class UsageServer implements Daemon { appContext = new ClassPathXmlApplicationContext("usageApplicationContext.xml"); -try { -ComponentContext.initComponentsLifeCycle(); -} catch (Exception e) { -e.printStackTrace(); -} +ComponentContext.initComponentsLifeCycle(); mgr = appContext.getBean(UsageManager.class);
[cloudstack] branch null-file-created-during-migration-fixed deleted (was 3ce9f46)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch null-file-created-during-migration-fixed in repository https://gitbox.apache.org/repos/asf/cloudstack.git. was 3ce9f46 Remove code that generated /var/lib/libvirt/images/null on target host This change permanently discards the following revisions: discard 3ce9f46 Remove code that generated /var/lib/libvirt/images/null on target host
[cloudstack] 01/01: Remove code that generated /var/lib/libvirt/images/null on target host
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch null-file-created-during-migration-fixed in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 3ce9f4665398c8f2255aaaf5450336e9f37fcb89 Author: GabrielBrascher AuthorDate: Wed Mar 13 11:36:20 2019 -0300 Remove code that generated /var/lib/libvirt/images/null on target host --- .../KvmNonManagedStorageDataMotionStrategy.java| 29 +- .../motion/StorageSystemDataMotionStrategy.java| 4 +- .../KvmNonManagedStorageSystemDataMotionTest.java | 67 -- .../StorageSystemDataMotionStrategyTest.java | 4 +- 4 files changed, 5 insertions(+), 99 deletions(-) diff --git a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java index 2cf236d..1bbe177 100644 --- a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java +++ b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java @@ -40,15 +40,11 @@ import org.apache.log4j.Logger; import com.cloud.agent.api.Answer; import com.cloud.agent.api.MigrateCommand; import com.cloud.agent.api.MigrateCommand.MigrateDiskInfo; -import com.cloud.agent.api.storage.CreateAnswer; -import com.cloud.agent.api.storage.CreateCommand; -import com.cloud.agent.api.to.VirtualMachineTO; import com.cloud.exception.AgentUnavailableException; import com.cloud.exception.OperationTimedoutException; import com.cloud.host.Host; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.storage.DataStoreRole; -import com.cloud.storage.DiskOfferingVO; import com.cloud.storage.Storage.StoragePoolType; import com.cloud.storage.StorageManager; import com.cloud.storage.StoragePool; @@ -57,7 +53,6 @@ import com.cloud.storage.VMTemplateStorageResourceAssoc; import com.cloud.storage.VolumeVO; import com.cloud.storage.dao.VMTemplatePoolDao; import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.vm.DiskProfile; import com.cloud.vm.VirtualMachineManager; /** @@ -111,28 +106,8 @@ public class KvmNonManagedStorageDataMotionStrategy extends StorageSystemDataMot * Example: /var/lib/libvirt/images/f3d49ecc-870c-475a-89fa-fd0124420a9b */ @Override -protected String generateDestPath(VirtualMachineTO vmTO, VolumeVO srcVolume, Host destHost, StoragePoolVO destStoragePool, VolumeInfo destVolumeInfo) { -DiskOfferingVO diskOffering = _diskOfferingDao.findById(srcVolume.getDiskOfferingId()); -DiskProfile diskProfile = new DiskProfile(destVolumeInfo, diskOffering, HypervisorType.KVM); -String templateUuid = getTemplateUuid(destVolumeInfo.getTemplateId()); -CreateCommand rootImageProvisioningCommand = new CreateCommand(diskProfile, templateUuid, destStoragePool, true); - -Answer rootImageProvisioningAnswer = agentManager.easySend(destHost.getId(), rootImageProvisioningCommand); - -if (rootImageProvisioningAnswer == null) { -throw new CloudRuntimeException(String.format("Migration with storage of vm [%s] failed while provisioning root image", vmTO.getName())); -} - -if (!rootImageProvisioningAnswer.getResult()) { -throw new CloudRuntimeException(String.format("Unable to modify target volume on the host [host id:%s, name:%s]", destHost.getId(), destHost.getName())); -} - -String libvirtDestImgsPath = null; -if (rootImageProvisioningAnswer instanceof CreateAnswer) { -libvirtDestImgsPath = ((CreateAnswer)rootImageProvisioningAnswer).getVolume().getName(); -} -// File.getAbsolutePath is used to keep the file separator as it should be and eliminate a verification to check if exists a file separator in the last character of libvirtDestImgsPath. -return new File(libvirtDestImgsPath, destVolumeInfo.getUuid()).getAbsolutePath(); +protected String generateDestPath(Host destHost, StoragePoolVO destStoragePool, VolumeInfo destVolumeInfo) { +return new File(destStoragePool.getPath(), destVolumeInfo.getUuid()).getAbsolutePath(); } /** diff --git a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java index 6bcaebe..1f3368f 100644 --- a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java +++ b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java @@ -1764,7 +17
[cloudstack] branch null-file-created-during-migration-fixed created (now 3ce9f46)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch null-file-created-during-migration-fixed in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at 3ce9f46 Remove code that generated /var/lib/libvirt/images/null on target host This branch includes the following new commits: new 3ce9f46 Remove code that generated /var/lib/libvirt/images/null on target host 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] branch 4.12.0.0-RC20190306T1109 created (now 9c0cbf9)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch 4.12.0.0-RC20190306T1109 in repository https://gitbox.apache.org/repos/asf/cloudstack.git. at 9c0cbf9 Updating pom.xml version numbers for release 4.12.0.0 This branch includes the following new commits: new 9c0cbf9 Updating pom.xml version numbers for release 4.12.0.0 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: Updating pom.xml version numbers for release 4.12.0.0
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch 4.12.0.0-RC20190306T1109 in repository https://gitbox.apache.org/repos/asf/cloudstack.git commit 9c0cbf91caefad3aa9340b88dd3f45a5a93323f4 Author: GabrielBrascher AuthorDate: Wed Mar 6 11:09:52 2019 -0300 Updating pom.xml version numbers for release 4.12.0.0 Signed-off-by: GabrielBrascher --- agent/pom.xml | 2 +- api/pom.xml | 2 +- client/pom.xml| 2 +- core/pom.xml | 2 +- debian/changelog | 6 ++ developer/pom.xml | 2 +- engine/api/pom.xml| 2 +- engine/components-api/pom.xml | 2 +- engine/network/pom.xml| 2 +- engine/orchestration/pom.xml | 2 +- engine/pom.xml| 2 +- engine/schema/pom.xml | 2 +- engine/service/pom.xml| 2 +- engine/storage/cache/pom.xml | 2 +- engine/storage/configdrive/pom.xml| 2 +- engine/storage/datamotion/pom.xml | 2 +- engine/storage/image/pom.xml | 2 +- engine/storage/integration-test/pom.xml | 2 +- engine/storage/pom.xml| 2 +- engine/storage/snapshot/pom.xml | 2 +- engine/storage/volume/pom.xml | 2 +- framework/agent-lb/pom.xml| 2 +- framework/ca/pom.xml | 2 +- framework/cluster/pom.xml | 2 +- framework/config/pom.xml | 2 +- framework/db/pom.xml | 2 +- framework/direct-download/pom.xml | 2 +- framework/events/pom.xml | 2 +- framework/ipc/pom.xml | 2 +- framework/jobs/pom.xml| 2 +- framework/managed-context/pom.xml | 2 +- framework/pom.xml | 2 +- framework/quota/pom.xml | 2 +- framework/rest/pom.xml| 2 +- framework/security/pom.xml| 2 +- framework/spring/lifecycle/pom.xml| 2 +- framework/spring/module/pom.xml | 2 +- plugins/acl/dynamic-role-based/pom.xml| 2 +- plugins/acl/static-role-based/pom.xml | 2 +- plugins/affinity-group-processors/explicit-dedication/pom.xml | 2 +- plugins/affinity-group-processors/host-affinity/pom.xml | 2 +- plugins/affinity-group-processors/host-anti-affinity/pom.xml | 2 +- plugins/alert-handlers/snmp-alerts/pom.xml| 2 +- plugins/alert-handlers/syslog-alerts/pom.xml | 2 +- plugins/api/discovery/pom.xml | 2 +- plugins/api/rate-limit/pom.xml| 2 +- plugins/api/solidfire-intg-test/pom.xml | 2 +- plugins/api/vmware-sioc/pom.xml | 2 +- plugins/ca/root-ca/pom.xml| 2 +- plugins/database/mysql-ha/pom.xml | 2 +- plugins/database/quota/pom.xml| 2 +- plugins/dedicated-resources/pom.xml | 2 +- plugins/deployment-planners/implicit-dedication/pom.xml | 2 +- plugins/deployment-planners/user-concentrated-pod/pom.xml | 2 +- plugins/deployment-planners/user-dispersing/pom.xml | 2 +- plugins/event-bus/inmemory/pom.xml| 2 +- plugins/event-bus/kafka/pom.xml | 2 +- plugins/event-bus/rabbitmq/pom.xml| 2 +- plugins/ha-planners/skip-heurestics/pom.xml | 2 +- plugins/host-allocators/random/pom.xml| 2 +- plugins/hypervisors/baremetal/pom.xml | 2 +- plugins/hypervisors/hyperv/pom.xml| 2 +- plugins/hypervisors/kvm/pom.xml | 2 +- plugins/hypervisors/ovm/pom.xml | 2 +- plugins/hypervisors/ovm3/pom.xml | 2 +- plugins/hypervisors/simulator
svn commit: r32783 - in /dev/cloudstack/4.12.0.0: apache-cloudstack-4.12.0.0-src.tar.bz2 apache-cloudstack-4.12.0.0-src.tar.bz2.asc apache-cloudstack-4.12.0.0-src.tar.bz2.md5 apache-cloudstack-4.12.0.
Author: gabriel Date: Wed Mar 6 14:22:24 2019 New Revision: 32783 Log: Committing release candidate artifacts for 4.12.0.0 to dist/dev/cloudstack in preparation for release vote Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 (with props) dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 == Binary file - no diff available. Propchange: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 -- svn:mime-type = application/octet-stream Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc Wed Mar 6 14:22:24 2019 @@ -0,0 +1,17 @@ +-BEGIN PGP SIGNATURE- +Version: GnuPG v1 + +iQIcBAABAgAGBQJcf9cYAAoJEOgcqc4lkIRVUcMP+QFTGv4+r13owL5VAG/PtcI1 +CQPUVjwu7hzOYoTgWwdFgtJfbCt+hJ0nd16zVCAPTGOmEtgSNY3N+VNzrGt83u4f +hew4xtdRVL14/rhIIENRsxuNczBtlZwCrTEXbhJnVeJkB5wJhrXo70M7pxrWnsMa +XXHVCsNBSWCfIJxsbJirN8n8rvcg1gsfk62iA12qEa6wIcJcdVpX0+s5IbF6ob0J +brbuffSznj+OoGzBuJEg5yONw2WdSyiTDf0v4ukC2L3YP8oPWfKMWMgvnqD45J82 +CzedEyKtwJd5KxobTZxmWZWFcgy6cUEXUKuH0yvA4I6fFlngXpCM0rx8PbH+ks0V +Z7NwtV0HIgXeWJSJ7+3vKASctztuaxfEnIuAkOqrIT4rLJpZVyMTyU+G2hmwD5sj +PN0N+fMzt0FyDzAZicv087+iJ+35K0E3W72WhWrChYWfOpBDjR2+SBfRYyw9BCY0 +xPjhEGoDEVdmTbpaQGPIZm9h0YMrcv1ZBsqAplG1RhC4X/0AsBvMyo0/GKVznMXL +ChZ3aXRJOxUMYKHZ7yeojSMVceR+3xUmxHnkhCg1rM5YU0mkP7bU7dBLMPgku2iZ +KS+lCQ4wDt6EFAtAZPqgSRQ3YLBol2rZP9lOqp9uyI++yfRk4e79HjuOc3mQJUve +RYjbe24l9CqWO975s8Rg +=FjKu +-END PGP SIGNATURE- Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 Wed Mar 6 14:22:24 2019 @@ -0,0 +1,2 @@ +apache-cloudstack-4.12.0.0-src.tar.bz2: DD CB 76 A5 49 AB 9A 3D 1E 1E 65 9B 68 +E6 BD B1 Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 Wed Mar 6 14:22:24 2019 @@ -0,0 +1,4 @@ +apache-cloudstack-4.12.0.0-src.tar.bz2: E11E69E1 94EE089B 6C7279A0 6334F614 +E6B79898 AF73B7D7 DD2A5C80 94ED8DC6 +15EE7C88 E35BC670 3B8E2E1A 2D5DF5B6 +13AA8A55 B6B16642 6CDC57EA 4B75E867
[cloudstack] branch master updated: Fix XenServer Security Groups 'vmops' script (#3197)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 34030be Fix XenServer Security Groups 'vmops' script (#3197) 34030be is described below commit 34030be393dfa81845578a4cb74785450c726021 Author: Gabriel Beims Bräscher AuthorDate: Wed Mar 6 09:13:40 2019 -0300 Fix XenServer Security Groups 'vmops' script (#3197) * Fix XenServer Security Groups 'vmops' script - fix tokens = line.split(':') to tokens = line.split(';') - fix expected tokens size from 5 to 4 - enhance logs - remove unused vmops script. The XCP patch points to the vmops script on the parent folder [1]. Thus, all XenServer versions are considering the vmops script located at [2]. - fix UI ipv4/ipv6 cidr validator to allow a list of cidirs. Fixing issue: #3192 Security Group rules not applied at all for XenServer 6.5 / Advanced Zone https://github.com/apache/cloudstack/issues/3192 * Update security group rules after VM migration Add security group rules on target host Cause: vmops script expected secondary IPs as "0;" but received "0:" Remove security group network rules on source host. Cause: destroy_network_rules_for_vm function on vmops script was not called when migrating VM * Add unit tests and address reviewers --- .../com/cloud/agent/api/SecurityGroupRulesCmd.java |2 +- .../xenbase/CitrixMigrateCommandWrapper.java | 23 +- .../xenbase/CitrixMigrateCommandWrapperTest.java | 70 + scripts/vm/hypervisor/xenserver/vmops | 50 +- scripts/vm/hypervisor/xenserver/xcposs/vmops | 1455 ui/scripts/network.js |4 +- ui/scripts/sharedFunctions.js | 13 + 7 files changed, 146 insertions(+), 1471 deletions(-) diff --git a/core/src/main/java/com/cloud/agent/api/SecurityGroupRulesCmd.java b/core/src/main/java/com/cloud/agent/api/SecurityGroupRulesCmd.java index 47da7f8..1d3d154 100644 --- a/core/src/main/java/com/cloud/agent/api/SecurityGroupRulesCmd.java +++ b/core/src/main/java/com/cloud/agent/api/SecurityGroupRulesCmd.java @@ -173,7 +173,7 @@ public class SecurityGroupRulesCmd extends Command { final StringBuilder sb = new StringBuilder(); final List ips = getSecIps(); if (ips == null) { -sb.append("0:"); +sb.append("0").append(RULE_COMMAND_SEPARATOR); } else { for (final String ip : ips) { sb.append(ip).append(RULE_COMMAND_SEPARATOR); diff --git a/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixMigrateCommandWrapper.java b/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixMigrateCommandWrapper.java index 21930ee..12d19c8 100644 --- a/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixMigrateCommandWrapper.java +++ b/plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/wrapper/xenbase/CitrixMigrateCommandWrapper.java @@ -21,7 +21,9 @@ package com.cloud.hypervisor.xenserver.resource.wrapper.xenbase; import java.util.Set; +import org.apache.commons.lang.BooleanUtils; import org.apache.log4j.Logger; +import org.apache.xmlrpc.XmlRpcException; import com.cloud.agent.api.Answer; import com.cloud.agent.api.MigrateAnswer; @@ -32,11 +34,13 @@ import com.cloud.resource.ResourceWrapper; import com.xensource.xenapi.Connection; import com.xensource.xenapi.Host; import com.xensource.xenapi.Types; +import com.xensource.xenapi.Types.BadServerResponse; +import com.xensource.xenapi.Types.XenAPIException; import com.xensource.xenapi.VBD; import com.xensource.xenapi.VM; @ResourceWrapper(handles = MigrateCommand.class) -public final class CitrixMigrateCommandWrapper extends CommandWrapper { +public class CitrixMigrateCommandWrapper extends CommandWrapper { private static final Logger s_logger = Logger.getLogger(CitrixMigrateCommandWrapper.class); @@ -81,6 +85,8 @@ public final class CitrixMigrateCommandWrapper extends CommandWrapperhttp://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.xenserver.resource.wrapper.xenbase; + +import org.apache.xmlrpc.XmlRpcException; +import org.junit.Test; +import org.junit
svn commit: r32470 - /dev/cloudstack/4.12.0.0/
Author: gabriel Date: Wed Feb 13 01:03:38 2019 New Revision: 32470 Log: Committing release candidate artifacts for 4.12.0.0 to dist/dev/cloudstack in preparation for release vote Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 (with props) dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 Removed: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2 dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.asc dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.md5 dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.sha512 Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 == Binary file - no diff available. Propchange: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 -- svn:mime-type = application/octet-stream Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc Wed Feb 13 01:03:38 2019 @@ -0,0 +1,17 @@ +-BEGIN PGP SIGNATURE- +Version: GnuPG v1 + +iQIcBAABAgAGBQJcY2yKAAoJEOgcqc4lkIRVPFUQALiBOmtLuM0Lsz/ahH8T4dmu +Ve/fVFXWjbi2ohQUbE0jGRb5wIEKZPnxCbeYSS5EoPiFLq3TU/Ej1KZHn7M/WgPg +UM/N15GUoBzl19Jkx/CSlEjdhg0RWwHJyIgJ081kdKcSF6l7qAU2M7SxWB5BfaMg +ki1p6Q95JfqHV5mB+xKmg6CFST4frUJZ2JE6gzPb9JQr4T9kpEzml+K6lU+3E7jg +JoENdD1wT+1rju1lDL8ZKpR6oO5/8kLgHjCf+1PE2GjyEXQ89dGsrL/ulJ7SG0gM +hKUN/9Ynw+EkC8LJi8c/h/SVREOVQPFxCmeBJsqypo6VWHdvBtGK6PdNS/Z+4JRI +aJFdlKPFQyc6Dc7/OUbM3MeeNbHwhREcvLTwDXbOcRPvQRlDQFGMMZls18gPyPcT +gm3R/I/lII1IEmYla29ra2uJ2fwDXzA0zLgnGG7i+PzmIqPaKNjrGLnQ4T/6eH4+ +pT5RGvGfoHiAIMUEjojfsHvryV5kcoEYZKhPCwG2QG4ey4rwmOE0KNdu27NGWcli +EJEFVtdyIv4cetWewQncbpSaB3IRJY9H/JtbAcf9FBuDeTKvIuaRmYAXmrQhvyML +1zoiIZQCXtlQr/hFuP9QtzbF2TDdLtqFHg8u2Ec5JMstedOwvrl3tEDlTlUPUbM7 +LWAqp086enADgelYCa2H +=TnB6 +-END PGP SIGNATURE- Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 Wed Feb 13 01:03:38 2019 @@ -0,0 +1,2 @@ +apache-cloudstack-4.12.0.0-src.tar.bz2: 63 F3 6F 40 4A 51 DB 80 CE 49 1C 63 10 +05 C3 DC Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 Wed Feb 13 01:03:38 2019 @@ -0,0 +1,4 @@ +apache-cloudstack-4.12.0.0-src.tar.bz2: DCE35294 7C5E8992 B5325909 EE5FF478 +EB7C168C 6FD28A42 98C7A9F4 1C8731B8 +D3442FC6 78735C2D 2E616D95 96867A72 +AFEDC483 7CC7860B 8FC9A27B E425CB45
[cloudstack] branch master updated: Keep iotune section in the VM's XML after live migration (#3171)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 709845f Keep iotune section in the VM's XML after live migration (#3171) 709845f is described below commit 709845f4a333ad2ace0183706433a0653ba159c6 Author: Gabriel Beims Bräscher AuthorDate: Tue Feb 12 22:07:03 2019 -0200 Keep iotune section in the VM's XML after live migration (#3171) * Keep iotune section in the VM's XML after live migration When live migrating a KVM VM among local storages, the VM loses the section on its XML, therefore, having no IO limitations. This commit removes the piece of code that deletes the section in the XML. * Add test for replaceStorage in LibvirtMigrateCommandWrapper Signed-off-by: Wido den Hollander * Fix Javadoc for method replaceIpForVNCInDescFile --- .../wrapper/LibvirtMigrateCommandWrapper.java | 20 + .../wrapper/LibvirtMigrateCommandWrapperTest.java | 48 ++ 2 files changed, 59 insertions(+), 9 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java index 2e3bd20..0c1370e 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java @@ -346,13 +346,17 @@ public final class LibvirtMigrateCommandWrapper extends CommandWrapper migrateStorage) +/** + * Pass in a list of the disks to update in the XML (xmlDesc). Each disk passed in needs to have a serial number. If any disk's serial number in the + * list does not match a disk in the XML, an exception should be thrown. + * In addition to the serial number, each disk in the list needs the following info: + * + * The value of the 'type' of the disk (ex. file, block) + * The value of the 'type' of the driver of the disk (ex. qcow2, raw) + * The source of the disk needs an attribute that is either 'file' or 'dev' as well as its corresponding value. + * + */ +protected String replaceStorage(String xmlDesc, Map migrateStorage) throws IOException, ParserConfigurationException, SAXException, TransformerException { InputStream in = IOUtils.toInputStream(xmlDesc); @@ -411,8 +415,6 @@ public final class LibvirtMigrateCommandWrapper extends CommandWrapper\n" + " \n" + " \n" + +" \n" + +"500\n" + +"5000\n" + +"60\n" + +" \n" + " 4650a2f7fce548e2beaa\n" + " \n" + " \n" + @@ -208,6 +223,11 @@ public class LibvirtMigrateCommandWrapperTest { "\n" + " \n" + " \n" + +" \n" + +"500\n" + +"5000\n" + +"60\n" + +" \n" + " 4650a2f7fce548e2beaa\n" + " \n" + " \n" + @@ -435,4 +455,32 @@ public class LibvirtMigrateCommandWrapperTest { inOrder.verify(virtResource, Mockito.times(timesCleanup)).cleanupDisk(disk); } +static void assertXpath(final Document doc, final String xPathExpr, +final String expected) { +try { +Assert.assertEquals(expected, XPathFactory.newInstance().newXPath() +.evaluate(xPathExpr, doc)); +} catch (final XPathExpressionException e) { +Assert.fail("Could not evaluate xpath" + xPathExpr + ":" ++ e.getMessage()); +} +} + +@Test +public void testReplaceStorage() throws Exception { +Map mapMigrateStorage = new HashMap(); + +MigrateDiskInfo diskInfo = new MigrateDiskInfo("123456", DiskType.BLOCK, DriverType.RAW, Source.FILE, "sourctest"); + mapMigrateStorage.put("/mnt/812ea6a3-7ad0-30f4-9cab-01e3f2985b98/4650a2f7-fce5-48e2-beaa-bcdf063194e6", diskInfo); +final String result = libvirtMigrateCmdWrapper.replaceStorage(fullfile, mapMigrateStorage); + +InputStream in = IOUtils.toInputStream(result); +DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance(); +DocumentBuilder docBuilder = docFactory.newDocumentBuilder(); +Document doc = docBuilder.parse(in); +assertXpath(doc, "/domain/devices/disk/iotune/write_iops_sec", "500"); +assertXpath(doc, "/domain/devices/disk/@type", "block"); +assertXpath(doc, "/domain/devices/disk/driver/@type", "raw"); +} + }
[cloudstack] branch iotune-removed-from-xml-on-kvm-migration deleted (was 8439b0b)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch iotune-removed-from-xml-on-kvm-migration in repository https://gitbox.apache.org/repos/asf/cloudstack.git. was 8439b0b Keep iotune section in the VM's XML after live migration This change permanently discards the following revisions: discard 8439b0b Keep iotune section in the VM's XML after live migration
svn commit: r32380 - /dev/cloudstack/4.12.0.0/
Author: gabriel Date: Thu Feb 7 01:33:57 2019 New Revision: 32380 Log: Committing release candidate artifacts for 4.12.0.0-RC20190206T2333 to dist/dev/cloudstack in preparation for release vote Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2 (with props) dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.asc dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.md5 dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.sha512 Removed: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2 == Binary file - no diff available. Propchange: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2 -- svn:mime-type = application/octet-stream Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.asc == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.asc (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.asc Thu Feb 7 01:33:57 2019 @@ -0,0 +1,17 @@ +-BEGIN PGP SIGNATURE- +Version: GnuPG v1 + +iQIcBAABAgAGBQJcW4rwAAoJEOgcqc4lkIRVVMYP/iltC923aSYnvk/sONXIbjHg +cY4EBOpnW+djxXaOUqgouIvLwEgqTnUbiofUkAguU68sgG2dWvIF9v+FFSKMQksq +iEVjTXS2IpRJogNsKNW1hVVnPZO7F5wtkkFIR5ScvQrB5jIcc+Dzn4VlpAU6lRoB +j6lGDSzkFqIKpKUfk2nDRQiNkp20kCHva32rYnJBfghQC6M04F8L2CA+EUZCeOGW +0mgF38W2bmpuRtmvTPv2cOs1mYpxNeWzIK1jOIlV2gWJ0IE8HIx9NLNsahTsqqqh +ravScBBjPhInmAOyPnNJChVtFd2Tleirq3ybeu0E2GegNKSd+oMfUnKhqOXL7qB8 +wM3ic+jlfSHcs6Ynawelq8xLbjlUWT/elQ/nqeMxEKKos7Z7eqQWYz+3fNRvoOEm +Mlx0/lZ2zvLv82iqW5M3Roq3ZLP8i8BSLwX0MoTQauz522bfIVsr4Ig9inJjonfF +VGCC5wBuNx2l3gcf+Yy3Ztzsfhez33Q1cAGUGEEc9gX0dVwrZD8AJ2NM5OFHtMv7 +7jgcxylO7+lwOrGgOB8hNqMQHiFDCTtbSNsDP7elWRHnWEr7in0obF4R6dR98dvf +5PNm2vyZljf0T2fSwUEhGgtXnHYcU9qt0mC7JUh2XRrtAPnOn6rtuTqCYs+WzOT/ +yHWFdGA5walSQoniWvQ4 +=p/mC +-END PGP SIGNATURE- Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.md5 == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.md5 (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.md5 Thu Feb 7 01:33:57 2019 @@ -0,0 +1,2 @@ +apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2: +AD DF 08 D9 91 47 3B 97 F9 58 BE 03 62 2C AB EA Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.sha512 == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.sha512 (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2.sha512 Thu Feb 7 01:33:57 2019 @@ -0,0 +1,3 @@ +apache-cloudstack-4.12.0.0-RC20190206T2333-src.tar.bz2: +E2515CDE 3CC42B46 E2C64FF8 A0BD3D78 205BD134 574CC585 46F4AB54 C831A98D 0DEFF98B + CE1CA39C E8CF65F3 8E89C048 E93D9E7D F73C67BA C7EDE60F CEAF5DFA
svn commit: r32378 - in /dev/cloudstack/4.12.0.0: ./ apache-cloudstack-4.12.0.0-src.tar.bz2 apache-cloudstack-4.12.0.0-src.tar.bz2.asc apache-cloudstack-4.12.0.0-src.tar.bz2.md5 apache-cloudstack-4.12
Author: gabriel Date: Thu Feb 7 01:23:59 2019 New Revision: 32378 Log: Committing release candidate artifacts for 4.12.0.0 to dist/dev/cloudstack in preparation for release vote Added: dev/cloudstack/4.12.0.0/ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 (with props) dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 == Binary file - no diff available. Propchange: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2 -- svn:mime-type = application/octet-stream Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.asc Thu Feb 7 01:23:59 2019 @@ -0,0 +1,17 @@ +-BEGIN PGP SIGNATURE- +Version: GnuPG v1 + +iQIcBAABAgAGBQJcW4iUAAoJEOgcqc4lkIRVAfwP/2WjdsguYOJx2ZSDVFjiNW0K +gK5xucBHt5Ar7BvgdOWoVWD2E12K8h1N71PabV5wTZX7LasxVp5h7jfedGwrOsa6 +frYvy3NBlRr5ta3P0QfFKsT1kSRAygDASqLQgwb7fuZy/e///aSQJovzcSOfTRBf +yU+M/vHNFNpbUzCH5bpTSeH18EKqZpgPdnHuBB2saqdGkuP2OsWy1gnvLbvKGJZj +f5iydPUG51njpNOU8UZ8Ztg5ry7cgeOADimCaBEMI6FkEJeIRjUPpWwuWhvWQ/B9 +isA5+MOoJ3Rf0A70cseR2BA/IhCkC0C2dFpdxCWla9r46NbXic//iI1rw9K1iJh5 +WIHp66I5s4bDKCk2d+eHD2UAeRJxXhVAFWclTnUTo+pz0U2+Sh1V+dndIC7VqZXJ +3fvxrL2NLJ0XoL9dHxEOzRScw6Kn9tMBJ+5EMYJYkydXm2jcYgaeajro+tT/uo0r +8etsd1V33N7KHKAzatuJyl7oI6JX+Y0I7ZmfmNR4jI4PSrEO47o0JS4RM0/XJg+N +6J+L8yDqIwwptgjZsEBcK1HekRaU3JVlwy3az3BQRUC6QxmxVX9oefLWabCY14cB +15fQlz+PCp/2UMLc0ZR8FFBW3d3Lm1X4xyEjvJtrgP/L0zcHDIWbyIoMDhB2lvpe +PqiqmA7TG8pizF9CCOeP +=iv+e +-END PGP SIGNATURE- Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.md5 Thu Feb 7 01:23:59 2019 @@ -0,0 +1,2 @@ +apache-cloudstack-4.12.0.0-src.tar.bz2: 7E C5 86 31 8C 12 01 78 83 5A 98 82 68 +3B 23 47 Added: dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 == --- dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 (added) +++ dev/cloudstack/4.12.0.0/apache-cloudstack-4.12.0.0-src.tar.bz2.sha512 Thu Feb 7 01:23:59 2019 @@ -0,0 +1,4 @@ +apache-cloudstack-4.12.0.0-src.tar.bz2: 15602753 028B9867 EF9E4854 4CD7EF3F +5627A607 6DE7B79E CD2769C3 52439C3B +F66E131D 816F51EF 06334503 E973C768 +28984863 DB35E45D DC3A6219 A9C19207
[cloudstack] branch master updated: Copy template to target KVM host if needed when migrating local <> local storage (#3154)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 7c5eca9 Copy template to target KVM host if needed when migrating local <> local storage (#3154) 7c5eca9 is described below commit 7c5eca94810c88a7e4a0849be1b1c23bf603e61b Author: Gabriel Beims Bräscher AuthorDate: Tue Feb 5 00:18:29 2019 -0200 Copy template to target KVM host if needed when migrating local <> local storage (#3154) * Migrate template to target host if needed. Fix KVM VM local storage live migration by migrating its template to the target host if needed. * Address reviewer and add method that updates the DB template reference * Remove deprecated Config.PrimaryStorageDownloadWait * Code formating of @Inject to follow checkstyle --- .../java/com/cloud/storage/StorageManager.java | 3 + .../storage/motion/AncientDataMotionStrategy.java | 7 +- .../KvmNonManagedStorageDataMotionStrategy.java| 97 - .../motion/StorageSystemDataMotionStrategy.java| 104 -- .../KvmNonManagedStorageSystemDataMotionTest.java | 150 - .../CloudStackPrimaryDataStoreDriverImpl.java | 7 +- .../main/java/com/cloud/configuration/Config.java | 8 -- .../java/com/cloud/storage/StorageManagerImpl.java | 2 +- 8 files changed, 316 insertions(+), 62 deletions(-) diff --git a/engine/components-api/src/main/java/com/cloud/storage/StorageManager.java b/engine/components-api/src/main/java/com/cloud/storage/StorageManager.java index c9c24d8..fd98101 100644 --- a/engine/components-api/src/main/java/com/cloud/storage/StorageManager.java +++ b/engine/components-api/src/main/java/com/cloud/storage/StorageManager.java @@ -101,6 +101,9 @@ public interface StorageManager extends StorageService { ConfigKey.Scope.Cluster, null); +ConfigKey PRIMARY_STORAGE_DOWNLOAD_WAIT = new ConfigKey("Storage", Integer.class, "primary.storage.download.wait", "10800", +"In second, timeout for download template to primary storage", false); + /** * Returns a comma separated list of tags for the specified storage pool * @param poolId diff --git a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java index 9471fad..7b52645 100644 --- a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java +++ b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java @@ -62,6 +62,7 @@ import com.cloud.configuration.Config; import com.cloud.host.Host; import com.cloud.hypervisor.Hypervisor; import com.cloud.storage.DataStoreRole; +import com.cloud.storage.StorageManager; import com.cloud.storage.Storage.StoragePoolType; import com.cloud.storage.StoragePool; import com.cloud.storage.VolumeVO; @@ -145,8 +146,7 @@ public class AncientDataMotionStrategy implements DataMotionStrategy { } protected Answer copyObject(DataObject srcData, DataObject destData, Host destHost) { -String value = configDao.getValue(Config.PrimaryStorageDownloadWait.toString()); -int _primaryStorageDownloadWait = NumbersUtil.parseInt(value, Integer.parseInt(Config.PrimaryStorageDownloadWait.getDefaultValue())); +int primaryStorageDownloadWait = StorageManager.PRIMARY_STORAGE_DOWNLOAD_WAIT.value(); Answer answer = null; DataObject cacheData = null; DataObject srcForCopy = srcData; @@ -156,7 +156,8 @@ public class AncientDataMotionStrategy implements DataMotionStrategy { srcForCopy = cacheData = cacheMgr.createCacheObject(srcData, destScope); } -CopyCommand cmd = new CopyCommand(srcForCopy.getTO(), addFullCloneFlagOnVMwareDest(destData.getTO()), _primaryStorageDownloadWait, VirtualMachineManager.ExecuteInSequence.value()); +CopyCommand cmd = new CopyCommand(srcForCopy.getTO(), addFullCloneFlagOnVMwareDest(destData.getTO()), primaryStorageDownloadWait, +VirtualMachineManager.ExecuteInSequence.value()); EndPoint ep = destHost != null ? RemoteHostEndPoint.getHypervisorHostEndPoint(destHost) : selector.select(srcForCopy, destData); if (ep == null) { String errMsg = "No remote endpoint to send command, check if host or ssvm is down?"; diff --git a/engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/KvmNonManagedStorageDataMotionStrategy.java b/engine/storage/datamotion/src/main/java/org/apache/cloudstack/st
[cloudstack] branch master updated (637cc6e -> 3f17671)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from 637cc6e feature: add libvirt / qemu io bursting (#3133) new cb3fed0 systemd: fix services to allow TLS configurations via java.security.ciphers (#3163) new 3f17671 Fix conflict and merge forward PR #3163 from 4.11 to master (4.12) The 31815 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. Summary of changes: debian/cloudstack-agent.postinst| 2 + packaging/centos63/cloud-management.rc | 2 +- packaging/centos7/cloud-agent.rc| 122 packaging/centos7/cloud.spec| 2 +- packaging/systemd/cloudstack-agent.default | 8 +- packaging/systemd/cloudstack-agent.service | 8 +- packaging/systemd/cloudstack-management.default | 13 +-- packaging/systemd/cloudstack-management.service | 12 +-- packaging/systemd/cloudstack-usage.default | 8 +- packaging/systemd/cloudstack-usage.service | 7 +- systemvm/debian/opt/cloud/bin/configure.py | 4 +- 11 files changed, 25 insertions(+), 163 deletions(-) delete mode 100755 packaging/centos7/cloud-agent.rc
[cloudstack] branch 4.11 updated: systemd: fix services to allow TLS configurations via java.security.ciphers (#3163)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch 4.11 in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/4.11 by this push: new cb3fed0 systemd: fix services to allow TLS configurations via java.security.ciphers (#3163) cb3fed0 is described below commit cb3fed0e4e1594d3f82de4de0554a68e09b25817 Author: Rohit Yadav AuthorDate: Tue Feb 5 03:21:30 2019 +0530 systemd: fix services to allow TLS configurations via java.security.ciphers (#3163) * systemd: fix services to allow TLS configurations via java.security.ciphers This fixes the management server and systemd services to allow the java.security.ciphers file to configure disabled TLS protocols and algorithms. This also cleans up systemd service files for agent and usage server. This fixes #3140 Signed-off-by: Rohit Yadav * configure: fix travis failure due pycodestyle error Signed-off-by: Rohit Yadav --- debian/cloudstack-agent.postinst| 2 + packaging/centos63/cloud-management.rc | 2 +- packaging/centos7/cloud-agent.rc| 122 packaging/centos7/cloud.spec| 2 +- packaging/debian/init/cloud-management | 2 +- packaging/systemd/cloudstack-agent.default | 8 +- packaging/systemd/cloudstack-agent.service | 8 +- packaging/systemd/cloudstack-management.default | 13 +-- packaging/systemd/cloudstack-management.service | 12 +-- packaging/systemd/cloudstack-usage.default | 8 +- packaging/systemd/cloudstack-usage.service | 7 +- systemvm/debian/opt/cloud/bin/configure.py | 4 +- 12 files changed, 26 insertions(+), 164 deletions(-) diff --git a/debian/cloudstack-agent.postinst b/debian/cloudstack-agent.postinst index c358c3c..0942047 100755 --- a/debian/cloudstack-agent.postinst +++ b/debian/cloudstack-agent.postinst @@ -25,6 +25,8 @@ case "$1" in NEWCONFDIR="/etc/cloudstack/agent" CONFFILES="agent.properties log4j.xml log4j-cloud.xml" +mkdir -m 0755 -p /usr/share/cloudstack-agent/tmp + # Copy old configuration so the admin doesn't have to do that # Only do so when we are installing for the first time if [ -z "$2" ]; then diff --git a/packaging/centos63/cloud-management.rc b/packaging/centos63/cloud-management.rc index 0ef5fc4..df7a583 100755 --- a/packaging/centos63/cloud-management.rc +++ b/packaging/centos63/cloud-management.rc @@ -71,7 +71,7 @@ setJavaHome() { setJavaHome JARS=$(ls /usr/share/cloudstack-management/lib/*.jar | tr '\n' ':' | sed s'/.$//') -CLASSPATH="$JARS:$CLASSPATH" +CLASSPATH="$JARS:$CLASSPATH:/usr/share/java/commons-daemon.jar" start() { if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then diff --git a/packaging/centos7/cloud-agent.rc b/packaging/centos7/cloud-agent.rc deleted file mode 100755 index 5882780..000 --- a/packaging/centos7/cloud-agent.rc +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/bash - -# chkconfig: 35 99 10 -# description: Cloud Agent -# pidfile: /var/run/cloudstack-agent.pid - -# 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. - -# WARNING: if this script is changed, then all other initscripts MUST BE changed to match it as well - -. /etc/rc.d/init.d/functions - -# set environment variables - -TMP=/usr/share/cloudstack-agent/tmp -SHORTNAME=$(basename $0 | sed -e 's/^[SK][0-9][0-9]//') -PIDFILE=/var/run/"$SHORTNAME".pid -LOCKFILE=/var/lock/subsys/"$SHORTNAME" -LOGDIR=/var/log/cloudstack/agent -LOGFILE=${LOGDIR}/agent.log -PROGNAME="Cloud Agent" -CLASS="com.cloud.agent.AgentShell" -JSVC=`which jsvc 2>/dev/null`; - -# exit if we don't find jsvc -if [ -z "$JSVC" ]; then -echo no jsvc found in path; -exit 1; -fi - -# create java tmp dir if not found -mkdir -m 0755 -p "$TMP" - -unset OPTIONS -[ -r /etc/sysconfig/"$SHORTNAME" ] && source /etc/sysconfig/"$SHORTNAM
[cloudstack] branch master updated: feature: add libvirt / qemu io bursting (#3133)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 637cc6e feature: add libvirt / qemu io bursting (#3133) 637cc6e is described below commit 637cc6ec4ec4f1d15ceb4c792ac737a14330b3a7 Author: Nathan Johnson AuthorDate: Mon Feb 4 15:47:44 2019 -0600 feature: add libvirt / qemu io bursting (#3133) * feature: add libvirt / qemu io bursting Adds the ability to set bursting features from libvirt / qemu This allows you to utilize the iops and bytes temporary "burst" mode introduced with libvirt 2.4 and improved upon with libvirt 2.6. https://blogs.igalia.com/berto/2016/05/24/io-bursts-with-qemu-2-6/ * updates per rafael et al --- .../main/java/com/cloud/offering/DiskOffering.java | 35 + .../org/apache/cloudstack/api/ApiConstants.java| 8 ++ .../admin/offering/CreateDiskOfferingCmd.java | 58 .../admin/offering/CreateServiceOfferingCmd.java | 56 .../api/response/DiskOfferingResponse.java | 64 + .../api/response/ServiceOfferingResponse.java | 48 +++ .../cloudstack/storage/to/VolumeObjectTO.java | 48 +++ .../engine/subsystem/api/storage/VolumeInfo.java | 16 +++ .../java/com/cloud/storage/DiskOfferingVO.java | 117 +++- .../resources/META-INF/db/schema-41120to41200.sql | 112 ++- .../cloudstack/storage/volume/VolumeObject.java| 72 ++ .../kvm/resource/LibvirtComputingResource.java | 76 -- .../kvm/resource/LibvirtDomainXMLParser.java | 40 ++ .../hypervisor/kvm/resource/LibvirtVMDef.java | 65 + .../kvm/storage/KVMStorageProcessor.java | 41 +- .../hypervisor/kvm/resource/LibvirtVMDefTest.java | 53 +++ .../api/query/dao/DiskOfferingJoinDaoImpl.java | 8 ++ .../api/query/dao/ServiceOfferingJoinDaoImpl.java | 8 ++ .../com/cloud/api/query/vo/DiskOfferingJoinVO.java | 40 ++ .../cloud/api/query/vo/ServiceOfferingJoinVO.java | 41 ++ .../configuration/ConfigurationManagerImpl.java| 155 ++--- test/integration/smoke/test_disk_offerings.py | 64 - test/integration/smoke/test_service_offerings.py | 67 + tools/marvin/marvin/config/test_data.py| 18 +++ tools/marvin/marvin/lib/base.py| 3 +- 25 files changed, 1229 insertions(+), 84 deletions(-) diff --git a/api/src/main/java/com/cloud/offering/DiskOffering.java b/api/src/main/java/com/cloud/offering/DiskOffering.java index 581d32d..98ba6c0 100644 --- a/api/src/main/java/com/cloud/offering/DiskOffering.java +++ b/api/src/main/java/com/cloud/offering/DiskOffering.java @@ -99,18 +99,53 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId Long getBytesReadRate(); +void setBytesReadRateMax(Long bytesReadRateMax); + +Long getBytesReadRateMax(); + +void setBytesReadRateMaxLength(Long bytesReadRateMaxLength); + +Long getBytesReadRateMaxLength(); + + void setBytesWriteRate(Long bytesWriteRate); Long getBytesWriteRate(); +void setBytesWriteRateMax(Long bytesWriteMax); + +Long getBytesWriteRateMax(); + +void setBytesWriteRateMaxLength(Long bytesWriteMaxLength); + +Long getBytesWriteRateMaxLength(); + + void setIopsReadRate(Long iopsReadRate); Long getIopsReadRate(); +void setIopsReadRateMax(Long iopsReadRateMax); + +Long getIopsReadRateMax(); + +void setIopsReadRateMaxLength(Long iopsReadRateMaxLength); + +Long getIopsReadRateMaxLength(); + void setIopsWriteRate(Long iopsWriteRate); Long getIopsWriteRate(); +void setIopsWriteRateMax(Long iopsWriteRateMax); + +Long getIopsWriteRateMax(); + + +void setIopsWriteRateMaxLength(Long iopsWriteRateMaxLength); + +Long getIopsWriteRateMaxLength(); + void setHypervisorSnapshotReserve(Integer hypervisorSnapshotReserve); Integer getHypervisorSnapshotReserve(); diff --git a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java index d519e44..0c1f2b1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/main/java/org/apache/cloudstack/api/ApiConstants.java @@ -37,7 +37,11 @@ public class ApiConstants { public static final String BIND_DN = "binddn"; public static final String BIND_PASSWORD = "bindpass"; public static final String BYTES_READ_RATE = "bytesreadrate"; +public static final String BYTES_READ_RATE_MAX = "bytesreadratemax"; +public static final String BYTES_READ_RATE_MAX_LENGTH = "bytesreadratemaxlength"; public static final String BYTES_WR
[cloudstack] branch master updated (ff07c17 -> 460d312)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from ff07c17 Foward merge #3139 from 4.11 to master (4.12) new bf805d1 Add back ability to disable backup of snapshot to secondary (#3122) new 460d312 Fix conflict and merge forward PR #3122 from 4.11 to master (4.12) The 31812 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. Summary of changes: .../engine/subsystem/api/storage/SnapshotInfo.java | 3 + .../storage/snapshot/SnapshotObject.java | 11 ++ .../storage/snapshot/SnapshotManagerImpl.java | 52 +++ .../cloud/storage/snapshot/SnapshotManager.java| 3 + .../storage/snapshot/SnapshotManagerImpl.java | 164 +++-- 5 files changed, 122 insertions(+), 111 deletions(-) copy server/src/{main/java => }/com/cloud/storage/snapshot/SnapshotManagerImpl.java (97%)
[cloudstack] branch 4.11 updated: Add back ability to disable backup of snapshot to secondary (#3122)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch 4.11 in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/4.11 by this push: new bf805d1 Add back ability to disable backup of snapshot to secondary (#3122) bf805d1 is described below commit bf805d1483c1ec11982c04db4367b761f6b47abe Author: Nathan Johnson AuthorDate: Mon Feb 4 15:08:42 2019 -0600 Add back ability to disable backup of snapshot to secondary (#3122) * The snapshot.backup.rightafter configuration variable was removed by: SHA: 6bb0ca2f854 This adds it back, though named snapshot.backup.to.secondary now instead. This global parameter, once set, will allow you to prevent automatic backups of snapshots to secondary storage, unless they're actually needed. Fixes #3096 * updates per review --- .../engine/subsystem/api/storage/SnapshotInfo.java | 3 +++ .../storage/snapshot/SnapshotObject.java | 11 + .../cloud/storage/snapshot/SnapshotManager.java| 3 +++ .../storage/snapshot/SnapshotManagerImpl.java | 26 +- 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java index 5541b36..ef72afc 100644 --- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java @@ -17,6 +17,7 @@ package org.apache.cloudstack.engine.subsystem.api.storage; import com.cloud.storage.Snapshot; +import com.cloud.utils.exception.CloudRuntimeException; public interface SnapshotInfo extends DataObject, Snapshot { SnapshotInfo getParent(); @@ -42,4 +43,6 @@ public interface SnapshotInfo extends DataObject, Snapshot { boolean isRevertable(); long getPhysicalSize(); + +void markBackedUp() throws CloudRuntimeException; } diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java index 23e1650..65d6fa5 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java @@ -150,6 +150,17 @@ public class SnapshotObject implements SnapshotInfo { } @Override +public void markBackedUp() throws CloudRuntimeException{ +try { +processEvent(Event.OperationNotPerformed); +} catch (NoTransitionException ex) { +s_logger.error("no transition error: ", ex); +throw new CloudRuntimeException("Error marking snapshot backed up: " + +this.snapshot.getId() + " " + ex.getMessage()); +} +} + +@Override public VolumeInfo getBaseVolume() { return volFactory.getVolume(snapshot.getVolumeId()); } diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManager.java b/server/src/com/cloud/storage/snapshot/SnapshotManager.java index f3557d0..407ffa3 100644 --- a/server/src/com/cloud/storage/snapshot/SnapshotManager.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManager.java @@ -56,6 +56,9 @@ public interface SnapshotManager extends Configurable { public static final ConfigKey BackupRetryInterval = new ConfigKey(Integer.class, "backup.retry.interval", "Advanced", "300", "Time in seconds between retries in backing up snapshot to secondary", false, ConfigKey.Scope.Global, null); +public static final ConfigKey BackupSnapshotAfterTakingSnapshot = new ConfigKey(Boolean.class, "snapshot.backup.to.secondary", "Snapshots", "true", +"Indicates whether to always backup primary storage snapshot to secondary storage", false, ConfigKey.Scope.Global, null); + void deletePoliciesForVolume(Long volumeId); /** diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index bd49c05..07eb072 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -206,7 +206,7 @@ public class SnapshotManagerImpl extends MutualExclusiveIdsManagerBase implement @Override public ConfigKey[] getConfigKeys() { -return new ConfigKey[] {BackupRetryAttempts, BackupRetryInterval, SnapshotHourlyMax, SnapshotDailyMax, SnapshotMonthlyMax, SnapshotWeeklyMax, usageSnapshotSelection}; +return new ConfigKey[] {BackupRetryAttempts, BackupRetry
[cloudstack] branch master updated: packaging: management default file cleanup (#3139)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 463372b packaging: management default file cleanup (#3139) new ff07c17 Foward merge #3139 from 4.11 to master (4.12) 463372b is described below commit 463372bc7ea13e15c1ec0aa8808095bb2e053d07 Author: Rohit Yadav AuthorDate: Fri Jan 25 22:19:33 2019 +0530 packaging: management default file cleanup (#3139) This cleanups management server default file, the `cloud.jks` is no longer created by the management server but instead created in-memory by the root CA plugin on management server startup. Signed-off-by: Rohit Yadav --- client/conf/java.security.ciphers.in| 32 - packaging/systemd/cloudstack-management.default | 6 + 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/client/conf/java.security.ciphers.in b/client/conf/java.security.ciphers.in index 27e2d69..6e7620e 100644 --- a/client/conf/java.security.ciphers.in +++ b/client/conf/java.security.ciphers.in @@ -1,18 +1,18 @@ - # 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. +# 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. jdk.tls.disabledAlgorithms=SSLv2Hello, SSLv3, TLSv1, TLSv1.1, DH keySize < 128, RSA keySize < 128, DES keySize < 128, SHA1 keySize < 128, MD5 keySize < 128, RC4 diff --git a/packaging/systemd/cloudstack-management.default b/packaging/systemd/cloudstack-management.default index fbdb256..8610e03 100644 --- a/packaging/systemd/cloudstack-management.default +++ b/packaging/systemd/cloudstack-management.default @@ -18,11 +18,7 @@ # Where your java installation lives #JAVA_HOME="/usr/lib/jvm/java" -if [ -r "/etc/cloudstack/management/cloud.jks" ] ; then - JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote=false -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/cloudstack/management/ -XX:PermSize=512M -XX:MaxPermSize=800m -Djavax.net.ssl.trustStore=/etc/cloudstack/management/cloud.jks -Djavax.net.ssl.trustStorePassword=vmops.com -Djava.security.properties=/etc/cloudstack/management/java.security.ciphers " -else - JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote=false -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/cloudstack/management/ -XX:PermSize=512M -XX:MaxPermSize=800m -Djava.security.properties=/etc/cloudstack/management/java.security.ciphers " -fi +JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote=false -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/cloudstack/management/ -XX:PermSize=512M -XX:MaxPermSize=800m -Djava.security.properties=/etc/cloudstack/management/java.security.ciphers " CLOUDSTACK_USER="cloud"
[cloudstack] branch master updated: Fix issue with verification of ipv4/ipv6 address. (#3162)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new f0a2bf9 Fix issue with verification of ipv4/ipv6 address. (#3162) f0a2bf9 is described below commit f0a2bf93bf009b880f8e08cacfede8d254900c00 Author: Gabriel Beims Bräscher AuthorDate: Mon Feb 4 15:58:50 2019 -0200 Fix issue with verification of ipv4/ipv6 address. (#3162) --- ui/scripts/network.js | 2 +- ui/scripts/sharedFunctions.js | 25 + 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index b3c2261..f4530d7 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -1782,7 +1782,7 @@ label: 'label.ip.address', validation: { required: false, -ipv46address: true +ipv4AndIpv6AddressValidator: true } } } diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index e531b1e..fdff4dd 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -676,7 +676,7 @@ var addGuestNetworkDialog = { label: 'label.ipv6.gateway', docID: 'helpGuestNetworkZoneGateway', validation: { -ipv6: true + ipv6CustomJqueryValidator: true } }, ip6cidr: { @@ -689,14 +689,14 @@ var addGuestNetworkDialog = { label: 'label.ipv6.start.ip', docID: 'helpGuestNetworkZoneStartIP', validation: { -ipv6: true + ipv6CustomJqueryValidator: true } }, endipv6: { label: 'label.ipv6.end.ip', docID: 'helpGuestNetworkZoneEndIP', validation: { -ipv6: true + ipv6CustomJqueryValidator: true } }, //IPv6 (end) @@ -2582,7 +2582,7 @@ $.validator.addMethod("ipv6cidr", function(value, element) { return false; } -if (!$.validator.methods.ipv6.call(this, parts[0], element)) +if (!$.validator.methods.ipv6CustomJqueryValidator.call(this, parts[0], element)) return false; if (parts[1] != Number(parts[1]).toString()) //making sure that "", " ", "00", "0 ","2 ", etc. will not pass @@ -2625,6 +2625,23 @@ $.validator.addMethod("ipv46cidr", function(value, element) { return false; }, "The specified IPv4/IPv6 CIDR is invalid."); +jQuery.validator.addMethod("ipv4AndIpv6AddressValidator", function(value, element) { +if (this.optional(element) && value.length == 0) { +return true; + } +if (jQuery.validator.methods.ipv4.call(this, value, element) || jQuery.validator.methods.ipv6CustomJqueryValidator.call(this, value, element)) { +return true; +} +return false; +}, "The specified IPv4/IPv6 address is invalid."); + +jQuery.validator.addMethod("ipv6CustomJqueryValidator", function(value, element) { +if (value == '::'){ + return true; +} +return jQuery.validator.methods.ipv6.call(this, value, element); +}, "The specified IPv6 address is invalid."); + $.validator.addMethod("allzonesonly", function(value, element){
[cloudstack] branch master updated: api: add command to list management servers (#3150)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 58466c8 api: add command to list management servers (#3150) 58466c8 is described below commit 58466c89540aeb643abf47dacb2fe249eca48479 Author: dahn AuthorDate: Fri Feb 1 19:23:39 2019 +0100 api: add command to list management servers (#3150) * api: add command to list management servers * api: add number of mangement servers in listInfrastructure command * ui: add block for mangement servers on infra page * api name resolution method cleanup --- .../apache/cloudstack/api/ApiCommandJobType.java | 3 +- .../apache/cloudstack/api/ResponseGenerator.java | 4 ++ .../api/command/admin/management/ListMgmtsCmd.java | 79 ++ .../api/response/ManagementServerResponse.java | 59 .../management}/ManagementServerHost.java | 12 ++-- .../management/ManagementServerHostPeer.java | 17 +++-- .../org/apache/cloudstack/query/QueryService.java | 4 ++ .../agent/manager/ClusteredAgentManagerImpl.java | 2 +- .../vm/ClusteredVirtualMachineManagerImpl.java | 2 +- .../com/cloud/upgrade/dao/Upgrade41120to41200.java | 13 .../resources/META-INF/db/schema-41120to41200.sql | 5 +- framework/cluster/pom.xml | 3 +- .../com/cloud/cluster/ClusterFenceManagerImpl.java | 1 + .../java/com/cloud/cluster/ClusterManager.java | 1 + .../java/com/cloud/cluster/ClusterManagerImpl.java | 7 +- .../com/cloud/cluster/ClusterManagerListener.java | 2 + .../cloud/cluster/ManagementServerHostPeerVO.java | 9 ++- .../com/cloud/cluster/ManagementServerHostVO.java | 16 + .../cloud/cluster/dao/ManagementServerHostDao.java | 4 +- .../cluster/dao/ManagementServerHostDaoImpl.java | 4 +- .../cluster/dao/ManagementServerHostPeerDao.java | 2 +- .../dao/ManagementServerHostPeerDaoImpl.java | 2 +- .../framework/jobs/impl/AsyncJobManagerImpl.java | 2 +- .../vmware/manager/VmwareManagerImpl.java | 2 +- .../cloudstack/metrics/MetricsServiceImpl.java | 4 ++ .../response/InfrastructureResponse.java | 8 +++ .../main/java/com/cloud/api/ApiResponseHelper.java | 10 +++ .../java/com/cloud/api/query/QueryManagerImpl.java | 24 +++ .../com/cloud/ha/HighAvailabilityManagerImpl.java | 2 +- .../java/com/cloud/server/LockMasterListener.java | 2 +- .../com/cloud/server/ManagementServerImpl.java | 2 + .../java/com/cloud/storage/StorageManagerImpl.java | 2 +- .../org/apache/cloudstack/ha/HAManagerImpl.java| 2 +- tools/apidoc/gen_toc.py| 3 +- ui/css/cloudstack3.css | 3 +- ui/index.html | 9 +++ ui/l10n/en.js | 2 + ui/l10n/fr_FR.js | 2 + ui/scripts/system.js | 38 +++ .../main/java/com/cloud/utils/net/NetUtils.java| 12 40 files changed, 346 insertions(+), 34 deletions(-) diff --git a/api/src/main/java/org/apache/cloudstack/api/ApiCommandJobType.java b/api/src/main/java/org/apache/cloudstack/api/ApiCommandJobType.java index b95831b..d35598b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/ApiCommandJobType.java +++ b/api/src/main/java/org/apache/cloudstack/api/ApiCommandJobType.java @@ -52,5 +52,6 @@ public enum ApiCommandJobType { DedicatedGuestVlanRange, GuestOs, GuestOsMapping, -Network +Network, +Management } diff --git a/api/src/main/java/org/apache/cloudstack/api/ResponseGenerator.java b/api/src/main/java/org/apache/cloudstack/api/ResponseGenerator.java index 4fb248c..80d6d4b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/ResponseGenerator.java +++ b/api/src/main/java/org/apache/cloudstack/api/ResponseGenerator.java @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import org.apache.cloudstack.management.ManagementServerHost; import org.apache.cloudstack.affinity.AffinityGroup; import org.apache.cloudstack.affinity.AffinityGroupResponse; import org.apache.cloudstack.api.ApiConstants.HostDetails; @@ -64,6 +65,7 @@ import org.apache.cloudstack.api.response.LBHealthCheckResponse; import org.apache.cloudstack.api.response.LBStickinessResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.LoadBalancerResponse; +import org.apache.cloudstack.api.response.ManagementServerResponse; import org.apache.cloudstack.api.response.NetworkACLItemResponse; import org.apache.cloudstack.api.response.NetworkACLResponse; import org.apache.cloudstack.api.response.NetworkOfferingResponse; @@ -462,4 +464,6 @@ public interface ResponseGenerator
[cloudstack] branch master updated: Fix UI bug (#3149)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 00e6d59 Fix UI bug (#3149) 00e6d59 is described below commit 00e6d5991d440fd13df2b02c3f68e637b5dac76a Author: Frank Maximus AuthorDate: Wed Jan 30 18:47:42 2019 +0100 Fix UI bug (#3149) Upgrade to jquery 3.3.1: $('selector').context was deprecated, and has been removed. Fixes: #3148 --- ui/scripts/configuration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/scripts/configuration.js b/ui/scripts/configuration.js index 8fc8218..de8f472 100644 --- a/ui/scripts/configuration.js +++ b/ui/scripts/configuration.js @@ -3001,9 +3001,9 @@ }); } } else { //canenableindividualservice == true -if ($thisProviderDropdown.context.name in providerDropdownsForciblyChangedTogether) { //if this provider dropdown is one of provider dropdowns forcibly changed together earlier, make other forcibly changed provider dropdowns restore default option (i.e. 1st option in dropdown) +if (this.name in providerDropdownsForciblyChangedTogether) { //if this provider dropdown is one of provider dropdowns forcibly changed together earlier, make other forcibly changed provider dropdowns restore default option (i.e. 1st option in dropdown) for (var key in providerDropdownsForciblyChangedTogether) { - if (key == $thisProviderDropdown.context.name) + if (key == this.name) continue; //skip to next item in for loop else $("select[name='" + key + "'] option:first").attr("selected", "selected");
[cloudstack] branch master updated: network: Offerings do not have to have Security Grouping enabled (#3112)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 9c4292c network: Offerings do not have to have Security Grouping enabled (#3112) 9c4292c is described below commit 9c4292cc45587001ed1c673a18b9b2326819ca0e Author: Wido den Hollander AuthorDate: Mon Jan 28 18:38:08 2019 +0100 network: Offerings do not have to have Security Grouping enabled (#3112) Offerings can co-exist where on does provide Security Grouping in the network, but other guest Networks have no Security Grouping. In V(X)LAN isolation environments the L2 separation is handled by V(X)LAN and protection between Instances is handled by Security Grouping. There are multiple scenarios possible where one network has Security Grouping enabled because that is required in that network. In the other network, but in the same zone it could be a choice to have Security Grouping disabled and allow all traffic to flow. Signed-off-by: Wido den Hollander --- .../engine/orchestration/NetworkOrchestrator.java | 3 - .../com/cloud/network/guru/DirectNetworkGuru.java | 27 +++--- .../cloud/network/guru/DirectNetworkGuruTest.java | 95 -- 3 files changed, 99 insertions(+), 26 deletions(-) diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index 1629493..5c0e50b 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -2246,9 +2246,6 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra if (_networkModel.areServicesSupportedByNetworkOffering(ntwkOff.getId(), Service.SourceNat)) { throw new InvalidParameterValueException("Service SourceNat is not allowed in security group enabled zone"); } -if (!_networkModel.areServicesSupportedByNetworkOffering(ntwkOff.getId(), Service.SecurityGroup)) { -throw new InvalidParameterValueException("network must have SecurityGroup provider in security group enabled zone"); -} } //don't allow eip/elb networks in Advance zone diff --git a/server/src/main/java/com/cloud/network/guru/DirectNetworkGuru.java b/server/src/main/java/com/cloud/network/guru/DirectNetworkGuru.java index f6279bf..8bb5c9a 100644 --- a/server/src/main/java/com/cloud/network/guru/DirectNetworkGuru.java +++ b/server/src/main/java/com/cloud/network/guru/DirectNetworkGuru.java @@ -122,10 +122,11 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { * Return true if the physical network isolation method contains the expected isolation method for this guru */ protected boolean isMyIsolationMethod(PhysicalNetwork physicalNetwork) { -for (IsolationMethod m : _isolationMethods) { +for (IsolationMethod m : this.getIsolationMethods()) { List isolationMethods = physicalNetwork.getIsolationMethods(); if (CollectionUtils.isNotEmpty(isolationMethods)) { for (String method : isolationMethods) { +s_logger.debug(method + ": " + m.toString()); if (method.equalsIgnoreCase(m.toString())) { return true; } @@ -140,20 +141,11 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { return TrafficTypes; } -/** - * True for Advanced zones, with VXLAN isolation method and Security Groups enabled - */ -private boolean isMyIsolationMethodVxlanWithSecurityGroups(NetworkOffering offering, DataCenter dc, PhysicalNetwork physnet) { -return dc.getNetworkType().equals(NetworkType.Advanced) && - _networkModel.areServicesSupportedByNetworkOffering(offering.getId(), Service.SecurityGroup) && -physnet.getIsolationMethods().contains("VXLAN"); -} - protected boolean canHandle(NetworkOffering offering, DataCenter dc, PhysicalNetwork physnet) { -// this guru handles only Guest networks in Advance zone with source nat service disabled -boolean vxlanWithSecurityGroups = isMyIsolationMethodVxlanWithSecurityGroups(offering, dc, physnet); -if (dc.getNetworkType() == NetworkType.Advanced && isMyTrafficType(offering.getTrafficType()) && -(isMyIsolationMethod(physnet) || vxlanWithSecurityGroups) &&
[cloudstack] branch master updated: CLOUDSTACK-3049: Implemented role update for account. (#3058)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new d68712e CLOUDSTACK-3049: Implemented role update for account. (#3058) d68712e is described below commit d68712eb7b0a53f6426f3bff157b14eee40c368e Author: Bitworks LLC AuthorDate: Fri Jan 25 19:02:56 2019 +0700 CLOUDSTACK-3049: Implemented role update for account. (#3058) --- .dockerignore | 1 + .../command/admin/account/UpdateAccountCmd.java| 16 +- .../java/com/cloud/user/AccountManagerImpl.java| 74 +++-- .../com/cloud/user/AccountManagerImplTest.java | 14 +- test/integration/smoke/test_accounts.py| 54 +++- tools/docker/Dockerfile.smokedev | 143 + tools/docker/docker_run_tests.sh | 50 tools/marvin/marvin/lib/base.py| 330 - 8 files changed, 500 insertions(+), 182 deletions(-) diff --git a/.dockerignore b/.dockerignore index 6ca3ad4..633d33e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -16,6 +16,7 @@ # under the License. cloudstack/tools/docker/Dockerfile +cloudstack/tools/docker/Dockerfile.smokedev .dockerignore .idea .git diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java index a7ce74a..43377da 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java @@ -21,6 +21,7 @@ import java.util.Map; import javax.inject.Inject; +import org.apache.cloudstack.api.response.RoleResponse; import org.apache.log4j.Logger; import org.apache.cloudstack.acl.SecurityChecker.AccessType; @@ -48,16 +49,19 @@ public class UpdateAccountCmd extends BaseCmd { API parameters / / @ACL(accessType = AccessType.OperateEntry) -@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account id") +@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account UUID") private Long id; -@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the current account name") +@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Current account name") private String accountName; -@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "the ID of the domain where the account exists") +@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "The UUID of the domain where the account exists") private Long domainId; -@Parameter(name = ApiConstants.NEW_NAME, type = CommandType.STRING, required = true, description = "new name for the account") +@Parameter(name = ApiConstants.ROLE_ID, type = CommandType.UUID, entityType = RoleResponse.class, description = "The UUID of the dynamic role to set for the account") +private Long roleId; + +@Parameter(name = ApiConstants.NEW_NAME, type = CommandType.STRING, description = "New name for the account") private String newName; @Parameter(name = ApiConstants.NETWORK_DOMAIN, @@ -65,7 +69,7 @@ public class UpdateAccountCmd extends BaseCmd { description = "Network domain for the account's networks; empty string will update domainName with NULL value") private String networkDomain; -@Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters") +@Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "Details for the account used to store specific parameters") private Map details; @Inject @@ -87,6 +91,8 @@ public class UpdateAccountCmd extends BaseCmd { return domainId; } +public Long getRoleId() { return roleId; } + public String getNewName() { return newName; } diff --git a/server/src/main/java/com/cloud/user/AccountManagerImpl.java b/server/src/main/java/com/cloud/user/AccountManagerImpl.java index 6025818..bda4cca 100644 --- a/server/src/main/java/com/cloud/user/AccountManagerImpl.java +++ b/server/src/main/java/com/cloud/user/AccountManagerImpl.java @@ -37,8 +37,10 @@ import javax.crypto.spec.SecretKeySpec; import javax.inj
[cloudstack] branch master updated: Fix some LGTM alerts (#3143)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 97ddd8d Fix some LGTM alerts (#3143) 97ddd8d is described below commit 97ddd8dffd4d2c2892ae006ce05fb11271f477ed Author: Malcolm Taylor AuthorDate: Thu Jan 24 22:22:39 2019 + Fix some LGTM alerts (#3143) * Fix some LGTM alerts * address review comments from Gabriel Brascher and Rafael Weingartner --- .../java/com/cloud/deploy/DeployDestination.java | 22 +++- .../engine/orchestration/NetworkOrchestrator.java | 2 +- .../resource/HypervDirectConnectResource.java | 40 -- .../ovm3/resources/Ovm3HypervisorResource.java | 8 - .../main/java/com/cloud/api/ApiResponseHelper.java | 2 +- server/src/main/java/com/cloud/api/ApiServer.java | 13 +++ 6 files changed, 20 insertions(+), 67 deletions(-) diff --git a/api/src/main/java/com/cloud/deploy/DeployDestination.java b/api/src/main/java/com/cloud/deploy/DeployDestination.java index eadc64e..18503fe 100644 --- a/api/src/main/java/com/cloud/deploy/DeployDestination.java +++ b/api/src/main/java/com/cloud/deploy/DeployDestination.java @@ -78,29 +78,35 @@ public class DeployDestination implements Serializable { @Override public boolean equals(Object obj) { +if (obj == null) { +return false; +} +if (!(obj instanceof DeployDestination)) { +return false; +} DeployDestination that = (DeployDestination)obj; -if (_dc == null || that._dc == null) { +if (this._dc == null || that._dc == null) { return false; } -if (_dc.getId() != that._dc.getId()) { +if (this._dc.getId() != that._dc.getId()) { return false; } -if (_pod == null || that._pod == null) { +if (this._pod == null || that._pod == null) { return false; } -if (_pod.getId() != that._pod.getId()) { +if (this._pod.getId() != that._pod.getId()) { return false; } -if (_cluster == null || that._cluster == null) { +if (this._cluster == null || that._cluster == null) { return false; } -if (_cluster.getId() != that._cluster.getId()) { +if (this._cluster.getId() != that._cluster.getId()) { return false; } -if (_host == null || that._host == null) { +if (this._host == null || that._host == null) { return false; } -return _host.getId() == that._host.getId(); +return this._host.getId() == that._host.getId(); } @Override diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index 9ed99c5..1629493 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -780,7 +780,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra } final int devId = vmNic.getDeviceId(); -if (devId > deviceIds.length) { +if (devId >= deviceIds.length) { throw new IllegalArgumentException("Device id for nic is too large: " + vmNic); } if (deviceIds[devId]) { diff --git a/plugins/hypervisors/hyperv/src/main/java/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java b/plugins/hypervisors/hyperv/src/main/java/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java index 1f9ad02..979be73 100644 --- a/plugins/hypervisors/hyperv/src/main/java/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java +++ b/plugins/hypervisors/hyperv/src/main/java/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java @@ -439,50 +439,10 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S return _vrResource.executeRequest((NetworkElementCommand)cmd); }if (clazz == CheckSshCommand.class) { answer = execute((CheckSshCommand)cmd); -} else if (clazz == GetDomRVersionCmd.class) { -answer = execute((GetDomRVersionCmd)cmd); } else if (cmd instanceof NetworkUsageCommand) { answer = execute((NetworkUsageCommand)cmd); -} else if (clazz == IpAssocCommand.class) { -answer = execute((IpAssocCommand)cmd); -} else if (clazz == DnsMasqCon
[cloudstack] branch master updated: kvm: Properly report available memory to Management Server (#2795)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new c496c84 kvm: Properly report available memory to Management Server (#2795) c496c84 is described below commit c496c84c6c727a84862cbbe2d870ff57939488b4 Author: Wido den Hollander AuthorDate: Thu Jan 24 23:18:04 2019 +0100 kvm: Properly report available memory to Management Server (#2795) The KVM Agent had two mechanisms for reporting its capabilities and memory to the Management Server. On startup it would ask libvirt the amount of Memory the Host has and subtract and add the reserved and overcommit memory. When the HostStats were however reported to the Management Server these two configured values on the Agent were no longer reported in the statistics thus showing all the available memory in the Agent/Host to the Management Server. This commit unifies this by using the same logic on Agent Startup and during statistics reporting. memory=3069636608, reservedMemory=1073741824 This was reported by a 4GB Hypervisor with this setting: host.reserved.mem.mb=1024 The GUI (thus API) would then show: Memory Total 2.86 GB This way the Agent properly 'lies' to the Management Server about its capabilities in terms of Memory. This is very helpful if you want to overprovision or undercommit machines for various reasons. Overcommitting can be done when KSM or ZSwap or a fast SWAP device is installed in the machine. Underprovisioning is done when the Host might run other tasks then a KVM hypervisor, for example when it runs in a hyperconverged setup with Ceph. In addition internally many values have been changed from a Double to a Long and also store the amount of bytes instead of Kilobytes. Signed-off-by: Wido den Hollander --- .../kvm/resource/LibvirtComputingResource.java | 82 ++--- .../wrapper/LibvirtGetHostStatsCommandWrapper.java | 5 +- .../apache/cloudstack/utils/linux/KVMHostInfo.java | 132 + .../org/apache/cloudstack/utils/linux/MemStat.java | 33 -- .../kvm/resource/LibvirtComputingResourceTest.java | 11 +- .../cloudstack/utils/linux/KVMHostInfoTest.java| 37 ++ .../apache/cloudstack/utils/linux/MemStatTest.java | 40 +-- 7 files changed, 233 insertions(+), 107 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index b21cd78..2e799b1 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -19,9 +19,7 @@ package com.cloud.hypervisor.kvm.resource; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; -import java.io.FileReader; import java.io.IOException; -import java.io.Reader; import java.io.StringReader; import java.net.InetAddress; import java.net.URI; @@ -55,12 +53,12 @@ import org.apache.cloudstack.storage.to.TemplateObjectTO; import org.apache.cloudstack.storage.to.VolumeObjectTO; import org.apache.cloudstack.utils.hypervisor.HypervisorUtils; import org.apache.cloudstack.utils.linux.CPUStat; +import org.apache.cloudstack.utils.linux.KVMHostInfo; import org.apache.cloudstack.utils.linux.MemStat; import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat; import org.apache.cloudstack.utils.security.KeyStoreUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.io.FileUtils; -import org.apache.commons.io.IOUtils; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.math.NumberUtils; import org.apache.log4j.Logger; @@ -311,8 +309,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv protected int _cmdsTimeout; protected int _stopTimeout; protected CPUStat _cpuStat = new CPUStat(); -protected MemStat _memStat = new MemStat(); - +protected MemStat _memStat = new MemStat(_dom0MinMem, _dom0OvercommitMem); private final LibvirtUtilitiesHelper libvirtUtilitiesHelper = new LibvirtUtilitiesHelper(); @Override @@ -871,7 +868,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv value = (String)params.get("host.reserved.mem.mb"); // Reserve 1GB unless admin overrides -_dom0MinMem = NumbersUtil.parseInt(value, 1024) * 1024 * 1024L; +_dom0MinMem = NumbersUtil.parseInt(value, 1024) * 1024* 1024L; value
[cloudstack] branch master updated: IP address acquired with associate ip address is marked as source nat (#3125)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 323f791 IP address acquired with associate ip address is marked as source nat (#3125) 323f791 is described below commit 323f791efca6f1d5b8bb63573d9e385c97c427e1 Author: Dingane Hlaluku AuthorDate: Wed Jan 23 14:05:16 2019 +0200 IP address acquired with associate ip address is marked as source nat (#3125) * CLOUDSTACK-4045 added a check for network state when determining whether a new IP should be source NAT. this prevents associated IP's to be marked as source NAT when the network is in allocated state, causing disassociateIpAddress to fail later * Remove mock object that cause other tests to fail * Remove underscores from variable types and add documentation for the created method * Improve exception message to include network name * Include network UUID with the Exception message and fix failing marvin test * Rebase against latest master and format AssociateIPAddrCmd class --- .../command/user/address/AssociateIPAddrCmd.java | 67 +++- .../com/cloud/network/IpAddressManagerImpl.java| 38 +-- .../com/cloud/network/IpAddressManagerTest.java| 116 ++--- test/integration/component/test_tags.py| 15 +++ test/integration/smoke/test_network.py | 38 +++ test/integration/smoke/test_portforwardingrules.py | 67 ++-- 6 files changed, 263 insertions(+), 78 deletions(-) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java index bf4ca88..fea7f20 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java @@ -57,8 +57,12 @@ import com.cloud.offering.NetworkOffering; import com.cloud.projects.Project; import com.cloud.user.Account; -@APICommand(name = "associateIpAddress", description = "Acquires and associates a public IP to an account. Either of the parameters are required, i.e. either zoneId, or networkId, or vpcId ", responseObject = IPAddressResponse.class, responseView = ResponseView.Restricted, -requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) +@APICommand(name = "associateIpAddress", +description = "Acquires and associates a public IP to an account. Either of the parameters are required, i.e. either zoneId, or networkId, or vpcId ", +responseObject = IPAddressResponse.class, +responseView = ResponseView.Restricted, +requestHasSensitiveInfo = false, +responseHasSensitiveInfo = false) public class AssociateIPAddrCmd extends BaseAsyncCreateCmd { public static final Logger s_logger = Logger.getLogger(AssociateIPAddrCmd.class.getName()); private static final String s_name = "associateipaddressresponse"; @@ -67,46 +71,57 @@ public class AssociateIPAddrCmd extends BaseAsyncCreateCmd { API parameters / / -@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account to associate with this IP address") +@Parameter(name = ApiConstants.ACCOUNT, +type = CommandType.STRING, +description = "the account to associate with this IP address") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, - type = CommandType.UUID, - entityType = DomainResponse.class, - description = "the ID of the domain to associate with this IP address") +type = CommandType.UUID, +entityType = DomainResponse.class, +description = "the ID of the domain to associate with this IP address") private Long domainId; @Parameter(name = ApiConstants.ZONE_ID, - type = CommandType.UUID, - entityType = ZoneResponse.class, - description = "the ID of the availability zone you want to acquire an public IP address from") +type = CommandType.UUID, +entityType = ZoneResponse.class, +description = "the ID of the availability zone you want to acquire an public IP address from") private Long zoneId; @Parameter(name = ApiConstants.NETWORK_ID, - type = CommandType.UUID, - entityType = NetworkResponse.class, - description = "The network this IP address should be associated to
[cloudstack] branch master updated: ipv6: Do not allow Secondary IPv6 addresses to be EUI-64 (#3136)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new f967944 ipv6: Do not allow Secondary IPv6 addresses to be EUI-64 (#3136) f967944 is described below commit f967944d900847c9a2020f9aa81f5db09ee78a1c Author: Wido den Hollander AuthorDate: Mon Jan 21 12:20:27 2019 +0100 ipv6: Do not allow Secondary IPv6 addresses to be EUI-64 (#3136) * netutils: Add method to verify if IPv6 Address is EUI-64 By checking if ff:fe is present in the address we can see if an IPv6 Address is EUI-64 or not. Signed-off-by: Wido den Hollander * ipv6: Do not allow a Secondary IPv6 address to be EUI-64 EUI-64 addresses should not be allowed as they can be used in the future by a to be deployed Instance which has to obtain this address because it matches it's MAC. In a /64 subnet there are more then enough other IPs available to be allocated to Instances, therefor we can safely disallow the allocation of EUI-64 addresses. Signed-off-by: Wido den Hollander --- .../com/cloud/network/Ipv6AddressManagerImpl.java | 5 .../com/cloud/network/Ipv6AddressManagerTest.java | 7 ++ .../main/java/com/cloud/utils/net/NetUtils.java| 27 ++ .../java/com/cloud/utils/net/NetUtilsTest.java | 8 +++ 4 files changed, 47 insertions(+) diff --git a/server/src/main/java/com/cloud/network/Ipv6AddressManagerImpl.java b/server/src/main/java/com/cloud/network/Ipv6AddressManagerImpl.java index 0371833..adfc3d2 100644 --- a/server/src/main/java/com/cloud/network/Ipv6AddressManagerImpl.java +++ b/server/src/main/java/com/cloud/network/Ipv6AddressManagerImpl.java @@ -104,6 +104,11 @@ public class Ipv6AddressManagerImpl extends ManagerBase implements Ipv6AddressMa network.getDataCenterId()); } +if (NetUtils.isIPv6EUI64(requestedIpv6)) { +throw new InsufficientAddressCapacityException(String.format("Requested IPv6 address [%s] may not be a EUI-64 address", requestedIpv6), DataCenter.class, +network.getDataCenterId()); +} + checkIfCanAllocateIpv6Address(network, requestedIpv6); IpAddresses requestedIpPair = new IpAddresses(null, requestedIpv6); diff --git a/server/src/test/java/com/cloud/network/Ipv6AddressManagerTest.java b/server/src/test/java/com/cloud/network/Ipv6AddressManagerTest.java index 827f533..3f082d5 100644 --- a/server/src/test/java/com/cloud/network/Ipv6AddressManagerTest.java +++ b/server/src/test/java/com/cloud/network/Ipv6AddressManagerTest.java @@ -248,4 +248,11 @@ public class Ipv6AddressManagerTest { Assert.assertEquals(expected, nic.getIPv6Address()); } + +@Test(expected = InsufficientAddressCapacityException.class) +public void acquireGuestIpv6AddressEUI64Test() throws InsufficientAddressCapacityException { +setAcquireGuestIpv6AddressTest(true, State.Free); +String requestedIpv6 = setCheckIfCanAllocateIpv6AddresscTest("2001:db8:13f::1c00:4aff:fe00:fe", false, false); +ip6Manager.acquireGuestIpv6Address(network, requestedIpv6); +} } diff --git a/utils/src/main/java/com/cloud/utils/net/NetUtils.java b/utils/src/main/java/com/cloud/utils/net/NetUtils.java index 958dfc6..72f6583b 100644 --- a/utils/src/main/java/com/cloud/utils/net/NetUtils.java +++ b/utils/src/main/java/com/cloud/utils/net/NetUtils.java @@ -88,6 +88,10 @@ public class NetUtils { private final static Random s_rand = new Random(System.currentTimeMillis()); private final static long prefix = 0x1e; +// RFC4291 IPv6 EUI-64 +public final static int IPV6_EUI64_11TH_BYTE = -1; +public final static int IPV6_EUI64_12TH_BYTE = -2; + public static long createSequenceBasedMacAddress(final long macAddress, long globalConfig) { /* Logic for generating MAC address: @@ -1583,6 +1587,29 @@ public class NetUtils { } /** + * When using StateLess Address AutoConfiguration (SLAAC) for IPv6 the addresses + * choosen by hosts in a network are based on the 48-bit MAC address and this is expanded to 64-bits + * with EUI-64 + * FFFE is inserted into the address and these can be identified + * + * By converting the IPv6 Address to a byte array we can check the 11th and 12th byte to see if the + * address is EUI064. + * + * See RFC4291 for more information + * + * @param address IPv6Address to be checked + * @return True if Address is EUI-64 IPv6 + */ +public static boolean isIPv6EUI64(final IPv6Address address) { +byte[] bytes = address.toByteArray(); +return (bytes[11] == IPV6_EUI64_11TH_BYTE && bytes[12] == IPV6_EUI64_12TH_BYTE); +}
[cloudstack] branch copy-template-on-host-kvm-local-migration deleted (was cea0eac)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch copy-template-on-host-kvm-local-migration in repository https://gitbox.apache.org/repos/asf/cloudstack.git. was cea0eac Fix KVM migration by migrating template to the target host if needed This change permanently discards the following revisions: discard cea0eac Fix KVM migration by migrating template to the target host if needed
[cloudstack] branch master updated: ipv6: Calculate IPv6 address instead of fetching one from a pool (#3077)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new af9fefc ipv6: Calculate IPv6 address instead of fetching one from a pool (#3077) af9fefc is described below commit af9fefc6b40d1bbd25d6fe306a9b30a8b92d0c94 Author: Wido den Hollander AuthorDate: Wed Jan 16 19:49:02 2019 +0100 ipv6: Calculate IPv6 address instead of fetching one from a pool (#3077) With IPv6 we are not using DHCP to allocate addresses, but using StateLess Address Auto Configuration (SLAAC) a Instance will calculate it's own address based on the Router Advertisements send out by the routers in the network. This Advertisement contains the IPv6 Subnet in use in that subnet and allows to calculate the stable Address the Instance will obtain based on it's MAC Address. The existing code is 'dead code' as it has been written, but was never used by any production code. SLAAC only works properly with subnets of exactly 64-bits large. Signed-off-by: Wido den Hollander --- .../engine/orchestration/NetworkOrchestrator.java | 4 +- .../com/cloud/network/IpAddressManagerImpl.java| 51 +--- .../java/com/cloud/network/Ipv6AddressManager.java | 8 +- .../com/cloud/network/Ipv6AddressManagerImpl.java | 130 +++-- .../com/cloud/network/guru/DirectNetworkGuru.java | 12 -- .../com/cloud/network/Ipv6AddressManagerTest.java | 22 6 files changed, 71 insertions(+), 156 deletions(-) diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index f223eb3..9ed99c5 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -2257,8 +2257,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra } } -if (ipv6 && !NetUtils.isValidIp6Cidr(ip6Cidr)) { -throw new InvalidParameterValueException("Invalid IPv6 cidr specified"); +if (ipv6 && NetUtils.getIp6CidrSize(ip6Cidr) != 64) { +throw new InvalidParameterValueException("IPv6 subnet should be exactly 64-bits in size"); } //TODO(VXLAN): Support VNI specified diff --git a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java index cb7210d..f840d0d 100644 --- a/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java +++ b/server/src/main/java/com/cloud/network/IpAddressManagerImpl.java @@ -57,7 +57,6 @@ import com.cloud.dc.DataCenterIpAddressVO; import com.cloud.dc.HostPodVO; import com.cloud.dc.Pod; import com.cloud.dc.PodVlanMapVO; -import com.cloud.dc.Vlan; import com.cloud.dc.Vlan.VlanType; import com.cloud.dc.VlanVO; import com.cloud.dc.dao.AccountVlanMapDao; @@ -2014,7 +2013,6 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage if (network.getGateway() != null) { if (nic.getIPv4Address() == null) { -ipv4 = true; PublicIp ip = null; //Get ip address from the placeholder and don't allocate a new one @@ -2050,30 +2048,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage nic.setIPv4Dns2(dc.getDns2()); } -//FIXME - get ipv6 address from the placeholder if it's stored there -if (network.getIp6Gateway() != null) { -if (nic.getIPv6Address() == null) { -UserIpv6Address ip = _ipv6Mgr.assignDirectIp6Address(dc.getId(), vm.getOwner(), network.getId(), requestedIpv6); -Vlan vlan = _vlanDao.findById(ip.getVlanId()); -nic.setIPv6Address(ip.getAddress().toString()); -nic.setIPv6Gateway(vlan.getIp6Gateway()); -nic.setIPv6Cidr(vlan.getIp6Cidr()); -if (ipv4) { -nic.setFormat(AddressFormat.DualStack); -} else { - nic.setIsolationUri(IsolationType.Vlan.toUri(vlan.getVlanTag())); -nic.setBroadcastType(BroadcastDomainType.Vlan); - nic.setBroadcastUri(BroadcastDomainType.Vlan.toUri(vlan.getVlanTag())); -nic.setFormat(AddressFormat.Ip6); -
[cloudstack] branch master updated: kvm: Security Group enhancements and refactor old code (#3113)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new ac73e7e kvm: Security Group enhancements and refactor old code (#3113) ac73e7e is described below commit ac73e7e671ba107830f96b9fb534eb716956e405 Author: Wido den Hollander AuthorDate: Wed Jan 16 16:35:18 2019 +0100 kvm: Security Group enhancements and refactor old code (#3113) * security group: Replace deprecated optparse by argparse Starting with Python 2.7 the library optparse has been replaced by argpase. This commit replaces the use of optparse by argparse Signed-off-by: Wido den Hollander * security group: Remove LXC support from security_group.py LXC does not work and has been partially removed from CloudStack already Signed-off-by: Wido den Hollander * security group: Refactor libvirt code Use a single function which properly throws an Exception when the connection to libvirt fails. Also simplify some logic, make it PEP-8 compatible and remove a unused function from the code. Signed-off-by: Wido den Hollander * security group: Raise Exception on execute() failure If the executed command exists with a non-zero exit status we should still return the output to the command, but also raise an Exception. Signed-off-by: Wido den Hollander * security group: Use a function to determin the physical device of a bridge We can not safely assume that the first device listed under a bridge is the physical device. With VXLAN isolation a vnet device can be attached to a bridge prior to the vxlan device being attached. We need to filter out those devices and then fetch the physical device attached to the bridge. In addition use the 'bridge' command instead of 'brctl'. 'bridge' is part of the iproute2 utils just like 'ip' and should be considered as the new default. This command is also available on EL6 and does not break any backwards compat. Signed-off-by: Wido den Hollander * security group: --set is deprecated, use --match-set These messages are seen in the KVM Agent log: --set option deprecated, please use --match-set Functionality does not change Signed-off-by: Wido den Hollander * security group: PEP-8 and indentation fixes There were a lot of styling problems in the code: - Missing whitespace or exess whitespace - CaMelCaSe function names and variables - 2-space indentation instead of 4 spaces This commit addresses those issues. Signed-off-by: Wido den Hollander --- .../kvm/resource/LibvirtComputingResource.java | 2 +- scripts/vm/network/security_group.py | 467 ++--- 2 files changed, 216 insertions(+), 253 deletions(-) diff --git a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index ced37c9..b21cd78 100644 --- a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -3491,7 +3491,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv private boolean canBridgeFirewall(final String prvNic) { final Script cmd = new Script(_securityGroupPath, _timeout, s_logger); cmd.add("can_bridge_firewall"); -cmd.add(prvNic); +cmd.add("--privnic", prvNic); final String result = cmd.execute(); if (result != null) { return false; diff --git a/scripts/vm/network/security_group.py b/scripts/vm/network/security_group.py index 12afe0b..2b81c3f 100755 --- a/scripts/vm/network/security_group.py +++ b/scripts/vm/network/security_group.py @@ -16,14 +16,12 @@ # specific language governing permissions and limitations # under the License. -import cloud_utils +import argparse from subprocess import check_output, CalledProcessError -from cloudutils.configFileOps import configFileOps import logging import sys import os import xml.dom.minidom -from optparse import OptionParser, OptionGroup, OptParseError, BadOptionError, OptionError, OptionConflictError, OptionValueError import re import libvirt import fcntl @@ -35,11 +33,6 @@ from netaddr.core import AddrFormatError logpath = "/var/run/cloud/"# FIXME: Logs should reside in /var/log/cloud lock_file = "/var/lock/cloudstack_security_group.lock" driver = "qemu:///system
[cloudstack] branch master updated: Delete blank java file 'CopyTemplateToPrimaryStorageAnswer.java' (#3124)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new c12cadb Delete blank java file 'CopyTemplateToPrimaryStorageAnswer.java' (#3124) c12cadb is described below commit c12cadb284240677fc93963fc0a3763b55c52714 Author: Gabriel Beims Bräscher AuthorDate: Fri Jan 11 12:56:46 2019 +0100 Delete blank java file 'CopyTemplateToPrimaryStorageAnswer.java' (#3124) --- .../storage/CopyTemplateToPrimaryStorageAnswer.java| 18 -- 1 file changed, 18 deletions(-) diff --git a/api/src/main/java/com/cloud/agent/api/storage/CopyTemplateToPrimaryStorageAnswer.java b/api/src/main/java/com/cloud/agent/api/storage/CopyTemplateToPrimaryStorageAnswer.java deleted file mode 100644 index 901dfd7..000 --- a/api/src/main/java/com/cloud/agent/api/storage/CopyTemplateToPrimaryStorageAnswer.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.cloud.agent.api.storage; - -// 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.
[cloudstack] branch master updated (7b0ff7f -> d3e95b9)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git. from 7b0ff7f Rework for destroy VM with volumes UI (#3120) add d3e95b9 kvm: Refactory VXLAN script and add IPv6 support (#3070) No new revisions were added by this update. Summary of changes: scripts/vm/network/vnet/modifyvxlan.sh | 306 - 1 file changed, 106 insertions(+), 200 deletions(-)
[cloudstack] branch master updated: Rework for destroy VM with volumes UI (#3120)
This is an automated email from the ASF dual-hosted git repository. gabriel pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack.git The following commit(s) were added to refs/heads/master by this push: new 7b0ff7f Rework for destroy VM with volumes UI (#3120) 7b0ff7f is described below commit 7b0ff7f0c7e0a9643f1e1f11cfe6a2c652ccfe16 Author: Dingane Hlaluku AuthorDate: Wed Jan 9 12:28:47 2019 +0200 Rework for destroy VM with volumes UI (#3120) * Remove redundant checkbox that controls the visibility of volumes to delete when destroying VMs * Change label from Volume IDs to Delete Volumes * Revert back deleted Volume IDs label --- ui/scripts/instances.js | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/scripts/instances.js b/ui/scripts/instances.js index 43e6bc9..7a959df 100644 --- a/ui/scripts/instances.js +++ b/ui/scripts/instances.js @@ -116,13 +116,14 @@ volumes: { label: 'label.delete.volumes', isBoolean: true, -isChecked: false +isChecked: true, +isHidden: true, }, volumeids: { -label: 'label.volume.ids', +label: 'label.delete.volumes', dependsOn: 'volumes', isBoolean: true, -isHidden: true, +isHidden: false, emptyMessage: 'label.volume.empty', multiDataArray: true, multiData: function(args) {