Summary: Allow ssh keypairs to be created if developer flag set and user ! cloud
Detail: Previously in the code we allowed the configuration to create ssh keypairs and put them in the configuration table so that systemvms could have ssh key auth and work properly if the user was 'cloud' or if the developer configuration item was set to true. It got changed to requiring both the cloud user and the developer flag (using an || on a negative) somwhere along the way. This changes it back to && on a negative to allow us to run as non-cloud users with the dev flag set, and for cloud to deploy properly without the developer flag. Signed-off-by: Marcus Sorensen <[email protected]> 1358285190 -0700 Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/47251b51 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/47251b51 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/47251b51 Branch: refs/heads/api_limit Commit: 47251b51a7bad37c66c0fa460723ede6a3e7b0a9 Parents: f7b8ad5 Author: Marcus Sorensen <[email protected]> Authored: Tue Jan 15 14:26:30 2013 -0700 Committer: Marcus Sorensen <[email protected]> Committed: Tue Jan 15 14:53:28 2013 -0700 ---------------------------------------------------------------------- .../com/cloud/server/ConfigurationServerImpl.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/47251b51/server/src/com/cloud/server/ConfigurationServerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java index b25c63f..7e5f424 100755 --- a/server/src/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java @@ -549,7 +549,7 @@ public class ConfigurationServerImpl implements ConfigurationServer { String username = System.getProperty("user.name"); 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; }
