Hi,

I ran into some issues recently around ssh keys, and I have a few questions.

When the management server starts up, it tries to set the ssh.publickey and
ssh.privatekey configuration options in
ConfigurationServerImpl.updateKeyPairs(). If it fails to do this, you run
into several problems later - the management server will try to read the
keys, get null, and send an empty ModifySshKeysCommand to the agent,
causing the agent to fail with a NullPointerException.

However, the management server will only set these options if the user
running the management server is called "cloud" or if there is a
configuration value called "developer" with a value of true:

*ConfigurationServerImpl.java, line 586*
        if (!username.equalsIgnoreCase("cloud") && !devel) {
            return;
        }

This brings up several questions:

1. Are developers supposed to know that they should be running the
management server as the "cloud" user?
    I was using the install guides at
http://docs.cloudstack.org/CloudStack_Documentation/Installing_CloudStackas
references, and didn't see any instruction saying to run as cloud
user,
or even an instruction to create a cloud user.

2. How are people supposed to set the "developer" configuration option if
they want to run as a user other than "cloud"?
    I grepped for the value across the codebase and didn't find it, so I
manually inserted it into the configuration table just to make some
progress.

3. Does it make sense to just "return" if the user is not running as cloud
and "developer" flag not set?
    It seems like a pretty loud ERROR would be in order, since later
actions are guaranteed to fail if these options are not set correctly.

Any comments or answers appreciated.

Thanks,
Dave.

Reply via email to