Bug 1662496 - unable to launch ceph-deploy to deploy a ceph cluster
Summary: unable to launch ceph-deploy to deploy a ceph cluster
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: ceph-deploy
Version: 29
Hardware: aarch64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Federico Simoncelli
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-28 23:14 UTC by Pierre-Francois RENARD
Modified: 2019-11-27 23:09 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-27 23:09:03 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
ceph-deploy log (3.35 KB, text/plain)
2018-12-28 23:14 UTC, Pierre-Francois RENARD
no flags Details

Description Pierre-Francois RENARD 2018-12-28 23:14:19 UTC
Created attachment 1517303 [details]
ceph-deploy log

Description of problem:
ceph-deploy is not working when trying to deploy a new cluster

Version-Release number of selected component (if applicable):
ceph-deploy-1.5.32-8.fc29.noarch


How reproducible:
each time I launch the command

Steps to Reproduce:
1. ceph-deploy new 'node-mon'
2.
3.

Actual results:
it is failling

Expected results:
a created cluster

Additional info:
here is the log 
[ceph_deploy][ERROR ] Traceback (most recent call last):
[ceph_deploy][ERROR ]   File "/usr/lib/python2.7/site-packages/ceph_deploy/util/decorators.py", line 69, in newfunc
[ceph_deploy][ERROR ]     return f(*a, **kw)
[ceph_deploy][ERROR ]   File "/usr/lib/python2.7/site-packages/ceph_deploy/cli.py", line 169, in _main
[ceph_deploy][ERROR ]     return args.func(args)
[ceph_deploy][ERROR ]   File "/usr/lib/python2.7/site-packages/ceph_deploy/new.py", line 141, in new
[ceph_deploy][ERROR ]     ssh_copy_keys(host, args.username)
[ceph_deploy][ERROR ]   File "/usr/lib/python2.7/site-packages/ceph_deploy/new.py", line 35, in ssh_copy_keys
[ceph_deploy][ERROR ]     if ssh.can_connect_passwordless(hostname):
[ceph_deploy][ERROR ]   File "/usr/lib/python2.7/site-packages/ceph_deploy/util/ssh.py", line 22, in can_connect_passwordless
[ceph_deploy][ERROR ]     out, err, retval = remoto.process.check(conn, command, stop_on_error=False)
[ceph_deploy][ERROR ]   File "/usr/lib/python2.7/site-packages/remoto/process.py", line 163, in check
[ceph_deploy][ERROR ]     kw = extend_path(conn, kw)
[ceph_deploy][ERROR ] NameError: global name 'extend_path' is not defined
[ceph_deploy][ERROR ]

Comment 1 Pierre-Francois RENARD 2018-12-28 23:22:11 UTC
I am running ceph-deploy from node pi00 (admin node), and node pi11,pi12,pi13 are meant to be the nodes running mon and ods.

the global name error is due to a non imported module inside remote/process.py file
adding "from pkgutil import extend_path" solve the issue but another one is trigger just after that.


I also tried to use the ceph-deploy from the official ceph repo ( https://download.ceph.com/rpm-mimic/el7/noarch ) but ceph-deploy 2.0 is not installable due to dependency issues...

Comment 2 Stefano Garzarella 2019-02-11 15:16:49 UTC
I hade the same issue ad I solved upgrading remoto package (0.0.33 -> 0.0.35) using pip:
sudo pip install --upgrade remoto

Comment 3 Daniel Lara 2019-03-08 14:38:43 UTC
I hade the same issue ad I solved upgrading ceph-deploy
   
pip install --upgrade ceph-deploy

Comment 4 Adam Williamson 2019-03-27 01:49:18 UTC
Does it work with https://bodhi.fedoraproject.org/updates/FEDORA-2019-677e06db0b (an updated python-remoto)?

Comment 5 Adam Williamson 2019-03-27 01:49:45 UTC
and if not with that 1.0.0, does it work with 1.1.2 - https://koji.fedoraproject.org/koji/buildinfo?buildID=1239499 ?

Comment 7 Nathan G. Grennan 2019-04-08 02:51:22 UTC
I was trying to run ceph-deploy new `hostname -f` on fc29. I found the results below.

python2-remoto-0.0.30-6.fc29.noarch.rpm <--- Works
python2-remoto-0.0.31-2.fc29.noarch.rpm <--- NameError: global name 'extend_path' is not defined
python2-remoto-0.0.33-1.fc29.noarch.rpm <--- NameError: global name 'extend_path' is not defined
python2-remoto-1.0.0-1.fc29.noarch      <--- AttributeError: 'module' object has no attribute 'needs_ssh'
python2-remoto-1.1.2-1.fc29.noarch.rpm  <--- AttributeError: 'module' object has no attribute 'needs_ssh'

Comment 8 Łukasz Posadowski 2019-07-31 12:55:58 UTC
(In reply to Nathan G. Grennan from comment #7)
> I was trying to run ceph-deploy new `hostname -f` on fc29. I found the
> results below.
> 
> python2-remoto-0.0.30-6.fc29.noarch.rpm <--- Works
> python2-remoto-0.0.31-2.fc29.noarch.rpm <--- NameError: global name
> 'extend_path' is not defined
> python2-remoto-0.0.33-1.fc29.noarch.rpm <--- NameError: global name
> 'extend_path' is not defined
> python2-remoto-1.0.0-1.fc29.noarch      <--- AttributeError: 'module' object
> has no attribute 'needs_ssh'
> python2-remoto-1.1.2-1.fc29.noarch.rpm  <--- AttributeError: 'module' object
> has no attribute 'needs_ssh'

I changed the /usr/lib/python2.7/site-packages/ceph_deploy/util/ssh.py like that:

#import logging
#from ceph_deploy.lib import remoto
#from ceph_deploy.connection import get_local_connection
#
#
#def can_connect_passwordless(hostname):
#    """
#    Ensure that current host can SSH remotely to the remote
#    host using the ``BatchMode`` option to prevent a password prompt.
#
#    That attempt will error with an exit status of 255 and a ``Permission
#    denied`` message or a``Host key verification failed`` message.
#    """
#    # Ensure we are not doing this for local hosts
#    if not remoto.connection.needs_ssh(hostname):
#        return True
#
#    logger = logging.getLogger(hostname)
#    with get_local_connection(logger) as conn:
#        # Check to see if we can login, disabling password prompts
#        command = ['ssh', '-CT', '-o', 'BatchMode=yes', hostname]
#        out, err, retval = remoto.process.check(conn, command, stop_on_error=False)
#        permission_denied_error = 'Permission denied '
#        host_key_verify_error = 'Host key verification failed.'
#        has_key_error = False
#        for line in err:
#            if permission_denied_error in line or host_key_verify_error in line:
#                has_key_error = True
#
#        if retval == 255 and has_key_error:
#            return False
#    return True
def can_connect_passwordless(hostname): return True

Make sure that You have passwordless ssh access to the nodes, because the code above will not check that at all.
I know it's a silly workaround, but I just need that for testing right now.

Comment 9 Ben Cotton 2019-10-31 18:59:43 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Ben Cotton 2019-11-27 23:09:03 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.