mirror of https://github.com/apache/cloudstack.git
Update message when keys are NOT being injected (#3799)
* Update message when keys are NOT being injected * Correct the message after injectkeys.ssh is done * Update message to a more meaningful one, since sometimes nothing is injected * Update other 2 * typo
This commit is contained in:
parent
09e812f9cb
commit
9b7acfde1e
|
|
@ -42,7 +42,7 @@ inject_into_iso() {
|
|||
[ ! -f $isofile ] && echo "$(basename $0): Could not find systemvm iso patch file $isofile" && return 1
|
||||
$SUDO mount -o loop $isofile $MOUNTPATH
|
||||
[ $? -ne 0 ] && echo "$(basename $0): Failed to mount original iso $isofile" && clean_up && return 1
|
||||
diff -q $MOUNTPATH/authorized_keys $newpubkey &> /dev/null && clean_up && return 0
|
||||
diff -q $MOUNTPATH/authorized_keys $newpubkey &> /dev/null && echo "New public key is the same as the one in the systemvm.iso, not injecting it, not modifying systemvm.iso" && clean_up && return 0
|
||||
$SUDO cp -b $isofile $backup
|
||||
[ $? -ne 0 ] && echo "$(basename $0): Failed to backup original iso $isofile" && clean_up && return 1
|
||||
rm -rf $TMPDIR
|
||||
|
|
|
|||
|
|
@ -767,10 +767,10 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
|
|||
command.add(systemVmIsoPath);
|
||||
|
||||
final String result = command.execute();
|
||||
s_logger.info("Injected public and private keys into systemvm iso with result : " + result);
|
||||
s_logger.info("The script injectkeys.sh was run with result : " + result);
|
||||
if (result != null) {
|
||||
s_logger.warn("Failed to inject generated public key into systemvm iso " + result);
|
||||
throw new CloudRuntimeException("Failed to inject generated public key into systemvm iso " + result);
|
||||
s_logger.warn("The script injectkeys.sh failed to run successfully : " + result);
|
||||
throw new CloudRuntimeException("The script injectkeys.sh failed to run successfully : " + result);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue