[
https://issues.apache.org/jira/browse/CLOUDSTACK-9077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15023588#comment-15023588
]
ASF GitHub Bot commented on CLOUDSTACK-9077:
--------------------------------------------
Github user pdion891 commented on the pull request:
https://github.com/apache/cloudstack/pull/1109#issuecomment-159130294
@remibergsma can you update this PR with following update:
It still need to look for ``/dev/loop0`` inside docker to know if it can
update the sshkey at the template creation process.
right after line 87
```
# if running into Docker as unprivileges, skip ssh verification as iso
cannot be mounted due to missing loop device.
if [ -f /.dockerinit ]; then
if [ -e /dev/loop0 ]; then
# it's a docker instance with privileges.
inject_into_iso systemvm.iso $newpubkey
[ $? -ne 0 ] && exit 5
copy_priv_key $newprivkey
else
# this mean it's a docker instance, ssh key cannot be verify.
echo "We run inside Docker, skipping ssh key insertion in systemvm.iso"
fi
else
inject_into_iso systemvm.iso $newpubkey
[ $? -ne 0 ] && exit 5
copy_priv_key $newprivkey
fi
```
Thanks
> injectkeys.sh doesn't work on CentOS7
> -------------------------------------
>
> Key: CLOUDSTACK-9077
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9077
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Management Server
> Affects Versions: 4.6.0
> Reporter: Remi Bergsma
> Priority: Critical
>
> Regression from:
> https://github.com/apache/cloudstack/commit/3381154fafb7fa4f0a61d538f7c2550e48247787
> CentOS7 doesn't have /dev/loop0 so it fails. Removing the check makes it work
> again.
> ```
> 2015-11-20 21:51:16,145 DEBUG [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Executing: /bin/bash
> /var/lib/tomcat/webapps/client/WEB-INF/classes/scripts/vm/systemvm/injectkeys.sh
> /usr/share/tomc
> at5/.ssh/id_rsa.pub /usr/share/tomcat5/.ssh/id_rsa
> /var/lib/tomcat/webapps/client/WEB-INF/classes/vms/systemvm.iso
> 2015-11-20 21:51:16,161 DEBUG [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Execution is successful.
> 2015-11-20 21:51:16,161 DEBUG [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) No loop device found, skipping ssh key insertion
> in systemvm.iso
> 2015-11-20 21:51:16,162 INFO [c.c.s.ConfigurationServerImpl]
> (localhost-startStop-1:null) Injected public and private keys into systemvm
> iso with result : null
> ```
> Pinging [~pdion]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)