SSH key changes

This commit is contained in:
Dave Cahill 2012-11-05 10:51:02 +09:00 committed by Edison Su
parent 716c35645b
commit 476e771c1c
2 changed files with 6 additions and 0 deletions

View File

@ -44,4 +44,9 @@ INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
VALUES ('Advanced', 'DEFAULT', 'management-server', VALUES ('Advanced', 'DEFAULT', 'management-server',
'integration.api.port', '8096'); 'integration.api.port', '8096');
-- Add developer configuration entry; allows management server to be run as a user other than "cloud"
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
VALUES ('Advanced', 'DEFAULT', 'management-server',
'developer', 'true');
commit; commit;

View File

@ -570,6 +570,7 @@ public class ConfigurationServerImpl implements ConfigurationServer {
String username = System.getProperty("user.name"); String username = System.getProperty("user.name");
Boolean devel = Boolean.valueOf(_configDao.getValue("developer")); Boolean devel = Boolean.valueOf(_configDao.getValue("developer"));
if (!username.equalsIgnoreCase("cloud") && !devel) { if (!username.equalsIgnoreCase("cloud") && !devel) {
s_logger.warn("Systemvm keypairs could not be set. Management server should be run as cloud user, or in development mode.");
return; return;
} }
String already = _configDao.getValue("ssh.privatekey"); String already = _configDao.getValue("ssh.privatekey");