This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 2ea6d5c2112c4017770de07ec200df1acc6ab6a4 Author: Rohit Yadav <rohit.ya...@shapeblue.com> AuthorDate: Wed Dec 20 20:08:17 2017 +0530 Misc fixes to allow upload template/iso tests to work I'll meld this with other commits, keeping this as a separate commit for now. Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com> --- .../cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java | 8 ++------ systemvm/debian/etc/apache2/vhost.template | 3 +++ tools/appliance/systemvmtemplate/scripts/cleanup.sh | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java b/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java index ac5b48a..63a44b8 100644 --- a/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java +++ b/server/src/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java @@ -29,6 +29,7 @@ import javax.naming.ConfigurationException; import org.apache.cloudstack.ca.CAManager; import org.apache.cloudstack.ca.SetupCertificateCommand; +import org.apache.cloudstack.config.ApiServiceConfiguration; import org.apache.cloudstack.framework.ca.Certificate; import org.apache.cloudstack.utils.security.KeyStoreUtils; import org.apache.log4j.Logger; @@ -66,7 +67,6 @@ import com.trilead.ssh2.Connection; public abstract class LibvirtServerDiscoverer extends DiscovererBase implements Discoverer, Listener, ResourceStateAdapter { private static final Logger s_logger = Logger.getLogger(LibvirtServerDiscoverer.class); - private String _hostIp; private final int _waitTime = 5; /* wait for 5 minutes */ private String _kvmPrivateNic; private String _kvmPublicNic; @@ -291,7 +291,7 @@ public abstract class LibvirtServerDiscoverer extends DiscovererBase implements setupAgentSecurity(sshConnection, agentIp, hostname); - String parameters = " -m " + StringUtils.shuffleCSVList(_hostIp) + " -z " + dcId + " -p " + podId + " -c " + clusterId + " -g " + guid + " -a"; + String parameters = " -m " + StringUtils.shuffleCSVList(ApiServiceConfiguration.ManagementHostIPAdr.value()) + " -z " + dcId + " -p " + podId + " -c " + clusterId + " -g " + guid + " -a"; parameters += " --pubNic=" + kvmPublicNic; parameters += " --prvNic=" + kvmPrivateNic; @@ -395,10 +395,6 @@ public abstract class LibvirtServerDiscoverer extends DiscovererBase implements _kvmGuestNic = _kvmPrivateNic; } - _hostIp = _configDao.getValue("host"); - if (_hostIp == null) { - throw new ConfigurationException("Can't get host IP"); - } _resourceMgr.registerResourceStateAdapter(this.getClass().getSimpleName(), this); return true; } diff --git a/systemvm/debian/etc/apache2/vhost.template b/systemvm/debian/etc/apache2/vhost.template index f393db5..caded8c 100644 --- a/systemvm/debian/etc/apache2/vhost.template +++ b/systemvm/debian/etc/apache2/vhost.template @@ -83,6 +83,9 @@ Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> + # Include CORS configuration **IF SET** + IncludeOptional /etc/apache2/[cC][oO][rR][sS].conf + # SSL Engine Switch: # Enable/Disable SSL for this virtual host. SSLEngine on diff --git a/tools/appliance/systemvmtemplate/scripts/cleanup.sh b/tools/appliance/systemvmtemplate/scripts/cleanup.sh index eed29af..27de669 100644 --- a/tools/appliance/systemvmtemplate/scripts/cleanup.sh +++ b/tools/appliance/systemvmtemplate/scripts/cleanup.sh @@ -21,8 +21,7 @@ set -x function cleanup_apt() { apt-get -y remove --purge dictionaries-common busybox isc-dhcp-client isc-dhcp-common \ - task-english task-ssh-server tasksel tasksel-data laptop-detect wamerican \ - debconf-i18n sharutils gnupg gnupg-agent + task-english task-ssh-server tasksel tasksel-data laptop-detect wamerican sharutils apt-get -y autoremove --purge apt-get autoclean -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" <commits@cloudstack.apache.org>.