unable to install gnocchi when using ceph storage driver

Bug #1955676 reported by admin0
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
admin0

Bug Description

Hi,

settings:

gnocchi_storage_driver: ceph
gnocchi_ceph_username : "gnocchi"
gnocchi_ceph_pool: "metrics"

The task stops at:

TASK [os_gnocchi : Perform a Gnocchi DB sync] **************************************************************************************************
task path: /etc/ansible/roles/os_gnocchi/tasks/gnocchi_db_sync.yml:16
<r1c1_gnocchi_container-df1ea719> The "physical_host" variable of "r1c1" has been found to have a corresponding host entry in inventory.
<r1c1_gnocchi_container-df1ea719> The "physical_host" variable of "r1c1" terminates at "172.29.236.11" using the host variable "ansible_host".
Read vars_file 'defaults/repo_packages/openstack_services.yml'
Read vars_file 'defaults/repo_packages/gnocchi.yml'
Read vars_file 'defaults/{{ install_method }}_install.yml'
<r1c2_gnocchi_container-33d80ba5> Task "Perform a Gnocchi DB sync" has been omitted from the job because the conditional "["(gnocchi_storage_driver == 'file') | ternary(True, _gnocchi_is_first_play_host)", 'not gnocchi_identity_only | bool']" was evaluated as "False"
container_name: "r1c1_gnocchi_container-df1ea719"
physical_host: "r1c1"
Container confirmed
Container type "lxc"
Using module file /opt/ansible-runtime/lib/python3.8/site-packages/ansible/modules/command.py
Pipelining is enabled.
container_name: "r1c1_gnocchi_container-df1ea719"
physical_host: "r1c1"
Container confirmed
Container type "lxc"
<172.29.236.11> ESTABLISH SSH CONNECTION FOR USER: root
<172.29.236.11> SSH: EXEC ssh -vvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="root"' -o ConnectTimeout=5 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ServerAliveInterval=64 -o ServerAliveCountMax=1024 -o Compression=no -o TCPKeepAlive=yes -o VerifyHostKeyDNS=no -o ForwardX11=no -o ForwardAgent=yes -T -o ControlPath=/root/.ansible/cp/91b96b3250 172.29.236.11 'sudo lxc-attach --clear-env --name r1c1_gnocchi_container-df1ea719 -- su - root -c '"'"'/bin/sh -c '"'"'"'"'"'"'"'"'sudo -H -S -n -u gnocchi /bin/sh -c '"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-hnuinyskxvlyjaywovmxqyrwzmaztrof ; /usr/bin/python3'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"' && sleep 0'"'"'"'"'"'"'"'"''"'"''
Read vars_file 'defaults/repo_packages/openstack_services.yml'
Read vars_file 'defaults/repo_packages/gnocchi.yml'
Read vars_file 'defaults/{{ install_method }}_install.yml'
<r1c3_gnocchi_container-c23575ad> Task "Perform a Gnocchi DB sync" has been omitted from the job because the conditional "["(gnocchi_storage_driver == 'file') | ternary(True, _gnocchi_is_first_play_host)", 'not gnocchi_identity_only | bool']" was evaluated as "False"
Escalation succeeded

and stays there for hours...

branch used: 23.2.0

Revision history for this message
admin0 (shashi-eu) wrote :

I was using redis as incoming driver, and it was failing due to python-redis not being found.
Please ignore this bug and close it.

Changed in openstack-ansible:
status: New → Invalid
assignee: nobody → admin0 (shashi-eu)
Revision history for this message
admin0 (shashi-eu) wrote :

I am going to submit a patch for it.

Changed in openstack-ansible:
status: Invalid → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_gnocchi (master)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible-os_gnocchi (master)
Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote (last edit ):

I think the valid fix here would be to introduce `gnocchi_incoming_driver` variable, that will allow to install dependencies based on that.
This would require implementation of configuration for extra drivers, like s3 or redis for your usecase, but eventually if you would set `gnocchi_incoming_driver: redis`, this would install all required packges for that.

Until it's implemented I'd suggest overriding `gnocchi_pip_package_extras`, for example:

  gnocchi_pip_package_extras:
    - keystone
    - mysql
    - "{{ gnocchi_storage_driver_pip_extra }}"
    - redis

This will be passed to gnocchi setup.py, which handles dependencies:
https://github.com/gnocchixyz/gnocchi/blob/master/setup.cfg#L71

And you can use config overrides for actual incoming driver configuration

Revision history for this message
Dmitriy Rabotyagov (noonedeadpunk) wrote :

Hopefully you will be able to test suggested fix https://review.opendev.org/c/openstack/openstack-ansible-os_gnocchi/+/822905 and report back if it's working for you or not.

Revision history for this message
admin0 (shashi-eu) wrote :

I cherry-picked and tested the patch. It installs the driver correctly.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible-os_gnocchi (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_gnocchi/+/822905
Committed: https://opendev.org/openstack/openstack-ansible-os_gnocchi/commit/84150e8fb17a0a3520358713b938da320a575500
Submitter: "Zuul (22348)"
Branch: master

commit 84150e8fb17a0a3520358713b938da320a575500
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri Dec 24 13:39:12 2021 +0200

    Add availability to define gnocchi_incoming_driver

    Gnocchi supports having different storage and incoming drivers [1] which
    has been never implemented in role.

    We add `gnocchi_incoming_driver` variable and do incoming configuration only
    when it's not same as gnocchi_storage_driver.

    [1] https://gnocchi.osci.io/install.html#configuration-file

    Depends-On: https://review.opendev.org/c/openstack/ansible-role-python_venv_build/+/822901
    Change-Id: If1442abd7978d44def2a4386f9d159b42c4939e3
    Related-Bug: #1955676

Changed in openstack-ansible:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to openstack-ansible-os_gnocchi (master)
Changed in openstack-ansible:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to openstack-ansible-os_gnocchi (master)

Reviewed: https://review.opendev.org/c/openstack/openstack-ansible-os_gnocchi/+/841699
Committed: https://opendev.org/openstack/openstack-ansible-os_gnocchi/commit/1483fcbc2802e4d6364138e19516b24114abfadf
Submitter: "Zuul (22348)"
Branch: master

commit 1483fcbc2802e4d6364138e19516b24114abfadf
Author: Dmitriy Rabotyagov <email address hidden>
Date: Fri May 13 11:19:21 2022 +0200

    Add variables to manage redis url

    To provide more convenience in configuring redis as Gnocchi driver,
    we add 2 variables that can be used to control
    URL to Redis when it's used for storage or incoming data.

    Related-Bug: #1955676
    Change-Id: Iba5186df3656c116cba48c3be0e39e87ddcb727f

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.