invalid_index_name_exception

Bug #1875811 reported by XiaojueGuan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Invalid
Undecided
Unassigned

Bug Description

(deploy) root@k-node1:~# pip freeze | grep kolla
kolla==9.1.0.dev387
kolla-ansible==9.1.0.dev588

the globals.yml file is https://github.com/albertjone/kolla-config/blob/master/kolla-config/multinode/globals.yml

code in fiel kolla-ansible/ansible/roles/kibana/tasks/post_config.yml
```
- name: Register the kibana index in elasticsearch
  become: true
  kolla_toolbox:
    module_name: uri
    module_args:
      url: "{{ internal_protocol }}://{{ kolla_internal_fqdn | put_address_in_context('url') }}:{{ elasticsearch_port }}/.kibana"
      method: PUT
      body: "{{ kibana_default_index_options | to_json }}"
      body_format: json
      status_code: 200, 201, 400
      validate_certs: "{{ 'no' if enable_self_signed_certificates | bool else 'yes' }}"
  register: result
  failed_when:
    # If the index already exists, Elasticsearch will respond with a 400 error.
    - result.status == 400
    # Format: {"json": {"error": {"type": "index_already_exists_exception"}}}
    - result.get('json', {}).get('error', {}).get('type') != 'index_already_exists_exception'
  run_once: true
```
can not handle all exceptions which will failed if you don't run it successfully at first try.

Changed in kolla-ansible:
status: New → Invalid
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.