cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shanker Balan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CLOUDSTACK-218) Permission problem while running /usr/lib/cloud/common/scripts/vm/systemvm/injectkeys.sh on Ubuntu 12.04 AWS Instance
Date Thu, 27 Sep 2012 07:38:07 GMT
Shanker Balan created CLOUDSTACK-218:
----------------------------------------

             Summary: Permission problem while running /usr/lib/cloud/common/scripts/vm/systemvm/injectkeys.sh
on Ubuntu 12.04 AWS Instance
                 Key: CLOUDSTACK-218
                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-218
             Project: CloudStack
          Issue Type: Bug
          Components: Management Server
    Affects Versions: 4.0.0
         Environment: Fresh Ubuntu 12.04 AWS instance of type m1.medium

root@ip-10-145-150-14:/var/log/cloud/management# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.1 LTS
Release:        12.04
Codename:       precise
root@ip-10-145-150-14:/var/log/cloud/management# 


root@ip-10-145-150-14:/var/log/cloud/management# dpkg -l | grep cloud
ii  cloud-client                         1:4.0.0-1beta1                   CloudStack client
ii  cloud-client-ui                      1:4.0.0-1beta1                   CloudStack management
server UI
ii  cloud-core                           1:4.0.0-1beta1                   CloudStack core
library
ii  cloud-deps                           1:4.0.0-1beta1                   CloudStack library
dependencies
ii  cloud-init                           0.6.3-0ubuntu1                   Init scripts for
cloud instances
ii  cloud-initramfs-growroot             0.4ubuntu1                       automatically resize
the root partition on first boot
ii  cloud-initramfs-rescuevol            0.4ubuntu1                       boot off a rescue
volume rather than root filesystem
ii  cloud-python                         1:4.0.0-1beta1                   CloudStack Python
library
ii  cloud-scripts                        1:4.0.0-1beta1                   CloudStack scripts
ii  cloud-server                         1:4.0.0-1beta1                   CloudStack server
library
ii  cloud-setup                          1:4.0.0-1beta1                   CloudStack client
ii  cloud-system-iso                     1:4.0.0-1beta1                   CloudStack system
iso
ii  cloud-utils                          1:4.0.0-1beta1                   CloudStack utility
library

            Reporter: Shanker Balan
            Priority: Trivial
             Fix For: 4.0.0


To reproduce:

Create new AWS instance running Ubuntu precise
deb http://cloudstack.apt-get.eu/ubuntu precise 4.0
wget -O - http://cloudstack.apt-get.eu/release.asc|sudo apt-key add -
sudo apt-get update
sudo apt-get install cloud-client
sudo apt-get install mysql-server
sudo cloud-setup-databases cloud:password@localhost --deploy-as=root:password
sudo cloud-setup-management
sudo /etc/init.d/cloud-management restart
tail -f management-server.log

ubuntu@ip-10-145-150-14:~$ ls -al
total 40
drwxr-xr-x 6 ubuntu ubuntu 4096 Sep 27 07:10 .
drwxr-xr-x 3 root   root   4096 Aug 22 05:48 ..
-rw-r--r-- 1 ubuntu ubuntu  220 Apr  3 15:58 .bash_logout
-rw-r--r-- 1 ubuntu ubuntu 3486 Apr  3 15:58 .bashrc
drwxrwxr-x 2 ubuntu ubuntu 4096 Sep 27 07:08 .byobu
drwx------ 2 ubuntu ubuntu 4096 Sep 27 06:44 .cache
-rw-r--r-- 1 ubuntu ubuntu  675 Apr  3 15:58 .profile
-rw-rw-r-- 1 ubuntu ubuntu    0 Sep 27 06:47 .screenrc
drwx------ 2 ubuntu ubuntu 4096 Sep 27 06:42 .ssh
-rw-r--r-- 1 ubuntu ubuntu    0 Sep 27 06:47 .sudo_as_admin_successful
drwxr-xr-x 2 root   root   4096 Sep 27 07:10 systemvm_mnt
-rw------- 1 root   root    672 Sep 27 06:47 .viminfo
ubuntu@ip-10-145-150-14:~$ pwd
/home/ubuntu
ubuntu@ip-10-145-150-14:~$ id
uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu),4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),110(netdev),111(admin)
ubuntu@ip-10-145-150-14:~$ sudo tail -2  /etc/sudoers
#includedir /etc/sudoers.d
cloud ALL =NOPASSWD : ALL


---- snip ----
2012-09-27 07:10:46,743 DEBUG [utils.script.Script] (main:null) Looking for vms/systemvm.iso
in /vms/systemvm.iso
2012-09-27 07:10:46,743 DEBUG [utils.script.Script] (main:null) Searching in environment.properties
2012-09-27 07:10:46,743 DEBUG [utils.script.Script] (main:null) environment.properties says
scripts should be in /usr/lib/cloud/common
2012-09-27 07:10:46,743 DEBUG [utils.script.Script] (main:null) Looking for vms/systemvm.iso
in /usr/lib/cloud/common/vms/systemvm.iso
2012-09-27 07:10:46,743 DEBUG [cloud.server.ConfigurationServerImpl] (main:null) Executing:
/usr/lib/cloud/common/scripts/vm/systemvm/injectkeys.sh /var/lib/cloud/management/.ssh/id_rsa.pub
/var/lib/cloud/management/.ssh/id_rsa /usr/lib/cloud/common/vms/systemvm.iso 
2012-09-27 07:10:46,901 DEBUG [cloud.server.ConfigurationServerImpl] (main:null) Exit value
is 5
2012-09-27 07:10:46,902 DEBUG [cloud.server.ConfigurationServerImpl] (main:null) mount: warning:
/home/ubuntu/systemvm_mnt seems to be mounted read-only.mkdir: cannot create directory `/home/ubuntu/tmp':
Permission deniedinjectkeys.sh: Could not find/create temporary dir /home/ubuntu/tmp/cloud/systemvm
2012-09-27 07:10:46,902 WARN  [cloud.server.ConfigurationServerImpl] (main:null) Failed to
inject generated public key into systemvm iso mount: warning: /home/ubuntu/systemvm_mnt seems
to be mounted read-only.mkdir: cannot create directory `/home/ubuntu/tmp': Permission deniedinjectkeys.sh:
Could not find/create temporary dir /home/ubuntu/tmp/cloud/systemvm
2012-09-27 07:10:46,907 ERROR [cloud.servlet.CloudStartupServlet] (main:null) Exception starting
management server 
com.cloud.utils.exception.CloudRuntimeException: Failed to inject generated public key into
systemvm iso mount: warning: /home/ubuntu/systemvm_mnt seems to be mounted read-only.mkdir:
cannot create directory `/home/ubuntu/tmp': Permission deniedinjectkeys.sh: Could not find/create
temporary dir /home/ubuntu/tmp/cloud/systemvm
        at com.cloud.server.ConfigurationServerImpl.updateKeyPairs(ConfigurationServerImpl.java:675)
        at com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:34)
        at com.cloud.server.ConfigurationServerImpl.persistDefaultValues(ConfigurationServerImpl.java:265)
        at com.cloud.utils.db.DatabaseCallback.intercept(DatabaseCallback.java:34)
        at com.cloud.servlet.CloudStartupServlet.init(CloudStartupServlet.java:47)
        at javax.servlet.GenericServlet.init(GenericServlet.java:212)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1026)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4421)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4734)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
--- snip ---

Let me know if you need access to this AWS instance to debug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message