Project

General

Profile

Actions

Bug #38806

closed

ceph mgr/ansible module doesn't work

Added by 一帆 师 about 5 years ago. Updated over 4 years ago.

Status:
Won't Fix
Priority:
High
Category:
-
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

I run ansible_runner_service as :

[root@node6 ansible-runner-service-master]# python3 ansible_runner_service.py 
Starting ansible-runner-service
Analysing local configuration options from ./config.yaml
/root/ansible-runner-service-master/runner_service/configuration.py:91: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  local_config = yaml.load(_cfg.read())
- setting passwords to {'admin': 'admin'}
- setting token_secret to secret
- setting token_hours to 24
Analysing runtime overrides from environment variables
No configuration settings overridden
2019-03-19 04:34:52,012 - root - INFO - Loaded logging configuration from ./logging.yaml
2019-03-19 04:34:52,012 - root - INFO - Run mode is: dev
2019-03-19 04:34:52,012 - runner_service.utils - DEBUG - Checking svctoken
2019-03-19 04:34:52,013 - runner_service.utils - INFO - svctoken exists, and is valid
2019-03-19 04:34:52,013 - root - INFO - SSH keys present in ./samples/env
2019-03-19 04:34:52,013 - runner_service.utils - DEBUG - Checking for the SSL keys in .
2019-03-19 04:34:52,013 - runner_service.utils - INFO - Using existing SSL files in .
 * Serving Flask app "runner_service" (lazy loading)
 * Environment: 
 * Debug mode: on
2019-03-19 04:34:52,041 - werkzeug - INFO -  * Running on https://0.0.0.0:5001/ (Press CTRL+C to quit)

and then

ceph mgr module enable ansible

and then set the mgr/ansible config and set the orchestrator backend as follows:

[root@node6 ceph-ansible-4.0.0beta1]# ceph config dump
WHO   MASK LEVEL    OPTION                            VALUE                    RO 
  mgr      advanced mgr/ansible/password              admin                    *  
  mgr      advanced mgr/ansible/server_url            http://192.168.10.3:5001 *  
  mgr      advanced mgr/ansible/username              admin                    *  
  mgr      advanced mgr/ansible/verify_server         true                     *  
  mgr      advanced mgr/orchestrator_cli/orchestrator ansible                  *  
[root@node6 ceph-ansible-4.0.0beta1]# 

the I try the to show devices,but there is an error. is there any step I lost or the "http://docs.ceph.com/docs/master/mgr/ansible/" docs is not corroct ?

[root@node6 ceph-ansible-4.0.0beta1]# ceph orchestrator device ls
Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 864, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 336, in call
    return self.func(mgr, **kwargs)
  File "/usr/share/ceph/mgr/orchestrator_cli/module.py", line 21, in inner
    return func(*args, **kwargs)
  File "/usr/share/ceph/mgr/orchestrator_cli/module.py", line 79, in _list_devices
    completion = self.get_inventory(node_filter=nf, refresh=refresh)
  File "/usr/share/ceph/mgr/orchestrator.py", line 806, in inner
    return self._oremote(method_name, args, kwargs)
  File "/usr/share/ceph/mgr/orchestrator.py", line 830, in _oremote
    return self.remote(o, meth, *args, **kwargs)
  File "/usr/share/ceph/mgr/mgr_module.py", line 1220, in remote
    args, kwargs)
RuntimeError: Remote method threw exception: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/ansible/module.py", line 388, in get_inventory
    self._launch_operation(ansible_operation)
  File "/usr/share/ceph/mgr/ansible/module.py", line 528, in _launch_operation
    ansible_operation.execute_playbook()
  File "/usr/share/ceph/mgr/ansible/module.py", line 126, in execute_playbook
    self.pb_execution.launch()
  File "/usr/share/ceph/mgr/ansible/ansible_runner_svc.py", line 75, in launch
    response = self.rest_client.http_post(endpoint,
AttributeError: 'NoneType' object has no attribute 'http_post'

any other orchestrator operation throws the same error either.

Actions

Also available in: Atom PDF