Re: ceph-deploy not including sudo?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 18, 2013 at 11:54 PM, Gruher, Joseph R
<joseph.r.gruher@xxxxxxxxx> wrote:
> Using latest ceph-deploy:
>
> ceph@cephtest01:/my-cluster$ sudo ceph-deploy --version
>
> 1.2.6
>
>
>
> I get this failure:
>
>
>
> ceph@cephtest01:/my-cluster$ sudo ceph-deploy install cephtest03 cephtest04
> cephtest05 cephtest06

How you are running the command above is part of the problem.
ceph-deploy doesn't need to run
with sudo privileges because it uses the current directory to
read/write some files and then send
them to remote hosts.

What happens next is that it will attempt to detect if you need `sudo`
on the remote end, it does this
by making sure you are *not* executing as a super user (which you are).
>
> [ceph_deploy.install][DEBUG ] Installing stable version dumpling on cluster
> ceph hosts cephtest03 cephtest04 cephtest05 cephtest06
>
> [ceph_deploy.install][DEBUG ] Detecting platform for host cephtest03 ...
>
> [ceph_deploy.sudo_pushy][DEBUG ] will use a remote connection without sudo
>

The line above confirms this, "will use a remote connection without
sudo" is here because it detects
you are executing as a super user, so there is no need to introduce
sudo in the other end. It assumes
you are login in as root.

> [ceph_deploy.install][INFO  ] Distro info: Ubuntu 12.04 precise
>
> [cephtest03][INFO  ] installing ceph on cephtest03
>
> [cephtest03][INFO  ] Running command: env DEBIAN_FRONTEND=noninteractive
> apt-get -q install --assume-yes ca-certificates
>
> [cephtest03][ERROR ] Traceback (most recent call last):
>
> [cephtest03][ERROR ]   File
> "/usr/lib/python2.7/dist-packages/ceph_deploy/hosts/debian/install.py", line
> 26, in install
>
> [cephtest03][ERROR ]   File
> "/usr/lib/python2.7/dist-packages/ceph_deploy/util/decorators.py", line 10,
> in inner
>
> [cephtest03][ERROR ]   File
> "/usr/lib/python2.7/dist-packages/ceph_deploy/util/wrappers.py", line 6, in
> remote_call
>
> [cephtest03][ERROR ]   File "/usr/lib/python2.7/subprocess.py", line 511, in
> check_call
>
> [cephtest03][ERROR ]     raise CalledProcessError(retcode, cmd)
>
> [cephtest03][ERROR ] CalledProcessError: Command '['env',
> 'DEBIAN_FRONTEND=noninteractive', 'apt-get', '-q', 'install',
> '--assume-yes', 'ca-certificates']' returned non-zero exit status 100
>
> [cephtest03][ERROR ] E: Could not open lock file /var/lib/dpkg/lock - open
> (13: Permission denied)
>
> [cephtest03][ERROR ] E: Unable to lock the administration directory
> (/var/lib/dpkg/), are you root?
>
> [ceph_deploy][ERROR ] RuntimeError: Failed to execute command: env
> DEBIAN_FRONTEND=noninteractive apt-get -q install --assume-yes
> ca-certificates
>
>
>
> This failure seems to imply ceph-deploy is not prefacing remote (SSH)
> commands to other systems with sudo?  For example this command as shown in
> the ceph-deploy output fails:
>
>
>
> ceph@cephtest01:/my-cluster$ ssh cephtest03 env
> DEBIAN_FRONTEND=noninteractive apt-get -q install --assume-yes
> ca-certificates
>
> E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission
> denied)
>
> E: Unable to lock the administration directory (/var/lib/dpkg/), are you
> root?
>
>
>
> But with the sudo added it works:
>
>
>
> ceph@cephtest01:/my-cluster$ ssh cephtest03 sudo env
> DEBIAN_FRONTEND=noninteractive apt-get -q install --assume-yes
> ca-certificates
>
> Reading package lists...
>
> Building dependency tree...
>
> Reading state information...
>
> ca-certificates is already the newest version.
>
> 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
>
> ceph@cephtest01:/my-cluster$
>

Can you try running ceph-deploy *without* sudo ?

>
>
> Thanks,
>
> Joe
>
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@xxxxxxxxxxxxxx
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux