Great!

I created the patch: https://review.opendev.org/c/openstack/kolla-ansible/+/839393

On Tue, Apr 26, 2022 at 10:01 AM wodel youchi <wodel.youchi@gmail.com> wrote:
Hi,

It did work,

Modify /home/deployer/kollavenv/xenavenv/share/kolla-ansible/ansible/roles/cloudkitty/tasks/bootstrap.yml  like this :
- name: Creating Cloudkitty influxdb database
  become: true
  kolla_toolbox:
    module_name: influxdb_database
    module_args:
      hostname: "{{ influxdb_address }}"
      port: "{{ influxdb_http_port }}"
      ssl: {{  cloudkitty_influxdb_use_ssl }}
      database_name: "{{ cloudkitty_influxdb_name }}"
  run_once: True
  delegate_to: "{{ groups['cloudkitty-api'][0] }}"
  when: cloudkitty_storage_backend == 'influxdb' 

Then declare cloudkitty_influxdb_use_ssl variable in globals.yml

cloudkitty_influxdb_use_ssl: true

Then deploy, it did work.

How to propose a fix, I do not know how to do that!!!

Regards.

Le mer. 20 avr. 2022 à 08:57, Mark Goddard <mark@stackhpc.com> a écrit :
Hi Wodel,

Did it work when you added the ssl parameter? If so, could you propose a fix for this upstream?

Thanks,
Mark

On Tue, 19 Apr 2022 at 15:07, wodel youchi <wodel.youchi@gmail.com> wrote:
Hi,
I tried to do this
vim /home/deployer/kollavenv/xenavenv/share/kolla-ansible/ansible/roles/cloudkitty/defaults/main.yml
cloudkitty_influxdb_use_ssl: "true"
But it didn't work,then I added the same variable to globals.yml but it didn't work.

So finally I edited vim /home/deployer/kollavenv/xenavenv/share/kolla-ansible/ansible/roles/cloudkitty/tasks/bootstrap.yml and added the ssl variable as a workaround
- name: Creating Cloudkitty influxdb database
  become: true
  kolla_toolbox:
    module_name: influxdb_database
    module_args:
      hostname: "{{ influxdb_address }}"
      port: "{{ influxdb_http_port }}"
      ssl: True
      database_name: "{{ cloudkitty_influxdb_name }}"
  run_once: True
  delegate_to: "{{ groups['cloudkitty-api'][0] }}"
  when: cloudkitty_storage_backend == 'influxdb' 


I don't know if this would have worked I just get the idea

- name: Creating Cloudkitty influxdb database
  become: true
  kolla_toolbox:
    module_name: influxdb_database
    module_args:
      hostname: "{{ influxdb_address }}"
      port: "{{ influxdb_http_port }}"
      ssl: {{  cloudkitty_influxdb_use_ssl }}
      database_name: "{{ cloudkitty_influxdb_name }}"
  run_once: True
  delegate_to: "{{ groups['cloudkitty-api'][0] }}"
  when: cloudkitty_storage_backend == 'influxdb' 




Regards.

Le mar. 19 avr. 2022 à 12:37, Rafael Weingärtner <rafaelweingartner@gmail.com> a écrit :

Maybe, we will need to change that to use SSL whenever needed.

On Tue, Apr 19, 2022 at 8:19 AM wodel youchi <wodel.youchi@gmail.com> wrote:
Hi,

I tested with influx -host <IP_ADDRESS>
First I tested with the internal api IP address of the host itself, and it did work : influx -host 10.10.3.9
Then I tested with VIP of the internal api, which is held by haproxy : influx -host 10.10.3.1, it didn't work, looking in the haproxy configuration file of influxdb, I noticed that haproxy uses https in the front end, so I tested with :  influx -ssl -host 10.10.3.1 and it did work.

And if you see the error message from TASK [cloudkitty : Creating Cloudkitty influxdb database], ssl is false

fatal: [192.168.1.5 -> 192.168.1.5]: FAILED! => {
    "action": "influxdb_database",
    "changed": false,
    "invocation": {
        "module_args": {
            "database_name": "cloudkitty",
            "hostname": "dashint.cloud.cerist.dz",
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "path": "",
            "port": 8086,
            "proxies": {},
            "retries": 3,
            "ssl": false,
            "state": "present",
            "timeout": null,
            "udp_port": 4444,
            "use_udp": false,
            "username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "validate_certs": true
        }
    },
    "msg": "('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))"
}

Could that be the problem? if yes how to force Cloudkitty to enable ssl?

Regards.

Virus-free. www.avast.com

Le mar. 19 avr. 2022 à 07:30, Pierre Riteau <pierre@stackhpc.com> a écrit :
Hello,

InfluxDB is configured to only listen on the internal API interface. Can you check the hostname you are using resolves correctly from the cloudkitty host?
Inside the influxdb container, you should use `influxdb -host <IP_ADDRESS>` with the internal IP of the influxdb host.

Also check if the output of `docker logs influxdb` has any logs.

Best wishes,
Pierre Riteau (priteau)

On Tue, 19 Apr 2022 at 01:24, wodel youchi <wodel.youchi@gmail.com> wrote:
Hi,

I am trying to deploy Cloudkitty, but I get this error message :

TASK [cloudkitty : Creating Cloudkitty influxdb database] ******************************************************
task path: /home/deployer/kollavenv/xenavenv/share/kolla-ansible/ansible/roles/cloudkitty/tasks/bootstrap.yml:36

fatal: [192.168.1.5 -> 192.168.1.5]: FAILED! => {
    "action": "influxdb_database",
    "changed": false,
    "invocation": {
        "module_args": {
            "database_name": "cloudkitty",
            "hostname": "dashint.cloud.cerist.dz",
            "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "path": "",
            "port": 8086,
            "proxies": {},
            "retries": 3,
            "ssl": false,
            "state": "present",
            "timeout": null,
            "udp_port": 4444,
            "use_udp": false,
            "username": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "validate_certs": true
        }
    },
    "msg": "('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))"
}


On  the influxdb container I did this :
[root@controllerb ~]# docker ps | grep inf
68b3ebfefbec   192.168.1.16:4000/openstack.kolla/centos-source-influxdb:xena                  "dumb-init --single-…"   22 minutes ago   Up 22 minutes                        influxdb
[root@controllerb ~]# docker exec -it influxdb /bin/bash
(influxdb)[influxdb@controllerb /]$ influx
Failed to connect to http://localhost:8086: Get http://localhost:8086/ping: dial tcp [::1]:8086: connect: connection refused
Please check your connection settings and ensure 'influxd' is running.
(influxdb)[influxdb@controllerb /]$ ps -ef
UID          PID    PPID  C STIME TTY          TIME CMD
influxdb       1       0  0 Apr18 ?        00:00:00 dumb-init --single-child -- kolla_start
influxdb       7       1  0 Apr18 ?        00:00:01 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
influxdb      45       0  0 00:12 pts/0    00:00:00 /bin/bash
influxdb      78      45  0 00:12 pts/0    00:00:00 ps -ef
(influxdb)[influxdb@controllerb /]$

I have no log file for influxdb, the directory is empty.

Any ideas?

Regards.


--
Rafael Weingärtner


--
Rafael Weingärtner