From: Alex Yang Date: Tue, 19 Dec 2017 02:30:41 +0000 (+0800) Subject: Generate .ssh/known_hosts when making VM image X-Git-Tag: opnfv-6.0.0~30^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F53%2F49253%2F2;p=daisy.git Generate .ssh/known_hosts when making VM image Change-Id: I3f72239d6c4db27f67d5586c45e46ed01fad281d Signed-off-by: Alex Yang --- diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh index 283dad1e..4ea87b6b 100755 --- a/ci/deploy/deploy.sh +++ b/ci/deploy/deploy.sh @@ -437,11 +437,6 @@ function install_daisy() else echo "daisy install successfully" fi - - #TODO: Why need this? - echo "====== generate known_hosts file in daisy vm ======" - touch $WORKSPACE/known_hosts - scp $WORKSPACE/known_hosts root@$DAISY_IP:/root/.ssh/ } function config_daisy() diff --git a/tools/centos-img-modify.sh b/tools/centos-img-modify.sh index 31f122fb..c095be73 100755 --- a/tools/centos-img-modify.sh +++ b/tools/centos-img-modify.sh @@ -58,6 +58,12 @@ host_name=daisy echo ${host_name} > /etc/hostname sed -i "/^127.0.0.1/s/ localhost / ${host_name} localhost /g" /etc/hosts +# required by daisycloud-core daisy/api/backends/osinstall/pxe/install.py +# This can be removed when upstream fix it. +mkdir -p -m 700 /root/.ssh +touch /root/.ssh/known_hosts +chmod 600 /root/.ssh/known_hosts + # Allow console access via pwd cat << EOF > /etc/cloud/cloud.cfg.d/default.cfg disable_root: False