Updated Branches:
refs/heads/4.2 ba619ec11 -> 79af8b16b
CLOUDSTACK-3951: Don't require SSH access to KVM nodes when cancelling
maintenance
Conflicts:
setup/db/db/schema-410to420.sql
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/79af8b16
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/79af8b16
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/79af8b16
Branch: refs/heads/4.2
Commit: 79af8b16b288229d815fe34c2efa8f78f9ae223c
Parents: ba619ec
Author: Wido den Hollander <[email protected]>
Authored: Tue Jul 30 15:06:29 2013 +0200
Committer: Wido den Hollander <[email protected]>
Committed: Wed Jul 31 15:22:53 2013 +0200
----------------------------------------------------------------------
server/src/com/cloud/configuration/Config.java | 2 ++
server/src/com/cloud/resource/ResourceManagerImpl.java | 7 +++++++
setup/db/db/schema-410to420.sql | 3 +++
3 files changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/79af8b16/server/src/com/cloud/configuration/Config.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/Config.java
b/server/src/com/cloud/configuration/Config.java
index ff484be..0d72694 100755
--- a/server/src/com/cloud/configuration/Config.java
+++ b/server/src/com/cloud/configuration/Config.java
@@ -307,6 +307,8 @@ public enum Config {
KvmPublicNetwork("Hidden", ManagementServer.class, String.class,
"kvm.public.network.device", null, "Specify the public bridge on host for
public network", null),
KvmPrivateNetwork("Hidden", ManagementServer.class, String.class,
"kvm.private.network.device", null, "Specify the private bridge on host for
private network", null),
KvmGuestNetwork("Hidden", ManagementServer.class, String.class,
"kvm.guest.network.device", null, "Specify the private bridge on host for
private network", null),
+ KvmSshToAgentEnabled("Advanced", ManagementServer.class, Boolean.class,
"kvm.ssh.to.agent", "true", "Specify whether or not the management server is
allowed to SSH into KVM Agents", null),
+
// Usage
UsageExecutionTimezone("Usage", ManagementServer.class, String.class,
"usage.execution.timezone", null, "The timezone to use for usage job execution
time", null),
UsageStatsJobAggregationRange("Usage", ManagementServer.class,
Integer.class, "usage.stats.job.aggregation.range", "1440", "The range of time
for aggregating the user statistics specified in minutes (e.g. 1440 for daily,
60 for hourly.", null),
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/79af8b16/server/src/com/cloud/resource/ResourceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java
b/server/src/com/cloud/resource/ResourceManagerImpl.java
index 46fd808..878bfcd 100755
--- a/server/src/com/cloud/resource/ResourceManagerImpl.java
+++ b/server/src/com/cloud/resource/ResourceManagerImpl.java
@@ -2114,6 +2114,13 @@ public class ResourceManagerImpl extends ManagerBase
implements ResourceManager,
// for kvm, need to log into kvm host, restart cloudstack-agent
if (host.getHypervisorType() == HypervisorType.KVM) {
+
+ boolean sshToAgent =
Boolean.parseBoolean(_configDao.getValue(Config.KvmSshToAgentEnabled.key()));
+ if (!sshToAgent) {
+ s_logger.info("Configuration tells us not to SSH into
Agents. Please restart the Agent (" + hostId + ") manually");
+ return true;
+ }
+
_hostDao.loadDetails(host);
String password = host.getDetail("password");
String username = host.getDetail("username");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/79af8b16/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 9cdf837..1650e2f 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -2191,6 +2191,7 @@ ALTER TABLE `cloud`.`usage_event` ADD COLUMN
`virtual_size` bigint unsigned;
ALTER TABLE `cloud_usage`.`usage_event` ADD COLUMN `virtual_size` bigint
unsigned;
ALTER TABLE `cloud_usage`.`usage_storage` ADD COLUMN `virtual_size` bigint
unsigned;
ALTER TABLE `cloud_usage`.`cloud_usage` ADD COLUMN `virtual_size` bigint
unsigned;
+
INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Network', 'DEFAULT',
'management-server', 'network.loadbalancer.haproxy.max.conn', '4096', 'Load
Balancer(haproxy) maximum number of concurrent connections(global max)');
DROP TABLE IF EXISTS `cloud_usage`.`usage_vmsnapshot`;
@@ -2208,3 +2209,5 @@ CREATE TABLE `cloud_usage`.`usage_vmsnapshot` (
) ENGINE=InnoDB CHARSET=utf8;
ALTER TABLE volumes ADD COLUMN vm_snapshot_chain_size bigint(20) unsigned;
+
+INSERT IGNORE INTO `cloud`.`configuration` VALUES ('Advanced', 'DEFAULT',
'management-server', 'kvm.ssh.to.agent', 'true', 'Specify whether or not the
management server is allowed to SSH into KVM Agents');