ceph/ceph-ansible

Can't create bucket.

kostiley opened this issue · 3 comments

Bug Report

What happened:
I try to create buckets using playbook:

- name: add rgw users and buckets
  hosts: ceph-01
  gather_facts: no
  become: true
  tasks:
  - name: add rgw users and buckets
    ignore_errors: yes
    ceph_add_users_buckets:
      rgw_host: 'ceph-01'
      port: 8080
      admin_access_key: '----'
      admin_secret_key: '----'
      users:
        - username: 'test1'
          fullname: 'tester'
      buckets:
        - bucket: 'testbucket1'
          user: 'test1'

It's create user, but not bucket. I got 404 error.

The full traceback is:

Traceback (most recent call last):
  File "<stdin>", line 102, in <module>
  File "<stdin>", line 94, in _ansiballz_main
  File "<stdin>", line 40, in invoke_module
  File "/usr/lib/python3.8/runpy.py", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 571, in <module>
  File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 556, in main
  File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 409, in create_buckets
  File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 359, in get_bucket
    body = self._process_response(response)
  File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 136, in _process_response
    raise radosgw.exception.factory(response.status, response.reason, body)
radosgw.exception.NoSuchBucket: NoSuchBucket (404 Not Found)
fatal: [ceph-01]: FAILED! => changed=false 
  module_stderr: |-
    Traceback (most recent call last):
      File "<stdin>", line 102, in <module>
      File "<stdin>", line 94, in _ansiballz_main
      File "<stdin>", line 40, in invoke_module
      File "/usr/lib/python3.8/runpy.py", line 207, in run_module
        return _run_module_code(code, init_globals, run_name, mod_spec)
      File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
        _run_code(code, mod_globals, init_globals,
      File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 571, in <module>
      File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 556, in main
      File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 409, in create_buckets
      File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 359, in get_bucket
        body = self._process_response(response)
      File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 136, in _process_response
        raise radosgw.exception.factory(response.status, response.reason, body)
    radosgw.exception.NoSuchBucket: NoSuchBucket (404 Not Found)
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1zcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 409, in create_buckets\n  File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 359, in get_bucket\n    body = self._process_response(response)\n  File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 136, in _process_response\n    raise radosgw.exception.factory(response.status, response.reason, body)\nradosgw.exception.NoSuchBucket: NoSuchBucket (404 Not Found)\n')
<ceph-01> Failed to connect to the host via ssh: Traceback (most recent call last):
  File "<stdin>", line 102, in <module>
  File "<stdin>", line 94, in _ansiballz_main
  File "<stdin>", line 40, in invoke_module
  File "/usr/lib/python3.8/runpy.py", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 571, in <module>
  File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 556, in main
  File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 409, in create_buckets
  File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 359, in get_bucket
    body = self._process_response(response)
  File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 136, in _process_response
    raise radosgw.exception.factory(response.status, response.reason, body)
radosgw.exception.NoSuchBucket: NoSuchBucket (404 Not Found)
The full traceback is:
Traceback (most recent call last):
  File "<stdin>", line 102, in <module>
  File "<stdin>", line 94, in _ansiballz_main
  File "<stdin>", line 40, in invoke_module
  File "/usr/lib/python3.8/runpy.py", line 207, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 571, in <module>
  File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 556, in main
  File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 409, in create_buckets
  File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 359, in get_bucket
    body = self._process_response(response)
  File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 136, in _process_response
    raise radosgw.exception.factory(response.status, response.reason, body)
radosgw.exception.NoSuchBucket: NoSuchBucket (404 Not Found)
fatal: [ceph-01]: FAILED! => changed=false 
  module_stderr: |-
    Traceback (most recent call last):
      File "<stdin>", line 102, in <module>
      File "<stdin>", line 94, in _ansiballz_main
      File "<stdin>", line 40, in invoke_module
      File "/usr/lib/python3.8/runpy.py", line 207, in run_module
        return _run_module_code(code, init_globals, run_name, mod_spec)
      File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
        _run_code(code, mod_globals, init_globals,
      File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 571, in <module>
      File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 556, in main
      File "/tmp/ansible_ceph_add_users_buckets_payload_nxjjnzcs/ansible_ceph_add_users_buckets_payload.zip/ansible/modules/ceph_add_users_buckets.py", line 409, in create_buckets
      File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 359, in get_bucket
        body = self._process_response(response)
      File "/usr/local/lib/python3.8/dist-packages/radosgw/connection.py", line 136, in _process_response
        raise radosgw.exception.factory(response.status, response.reason, body)
    radosgw.exception.NoSuchBucket: NoSuchBucket (404 Not Found)
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

What you expected to happen:

How to reproduce it (minimal and precise):
Decribe above

Environment:
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

  • Kernel (e.g. uname -a): Linux ikv-home 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Docker version if applicable (e.g. docker version):
  • Ansible version (e.g. ansible-playbook --version): ansible-playbook 2.10.8
  • ceph-ansible version (e.g. git head or tag or stable branch): devel
  • Ceph version (e.g. ceph -v): ceph version 17.2.5 (98318ae89f1a893a6ded3a640405cdbb33e08757) quincy (stable)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions.

This issue has been automatically closed due to inactivity. Please re-open if this still requires investigation.