)]}'
{"tripleo_ansible/playbooks/cephadm.yml":[{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"a01a2273c7a86f8e4ddd419951e3197bf75fbeb9","unresolved":true,"context_lines":[{"line_number":26,"context_line":"        name: tripleo_cephadm"},{"line_number":27,"context_line":"        tasks_from: bootstrap"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    - name: Apply Ceph Configuration"},{"line_number":30,"context_line":"      import_role:"},{"line_number":31,"context_line":"        name: tripleo_cephadm"},{"line_number":32,"context_line":"        tasks_from: ceph_config_set"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"2f88d654_46adfedd","line":29,"range":{"start_line":29,"start_character":4,"end_line":29,"end_character":36},"updated":"2021-06-03 09:07:54.000000000","message":"This is ok, it makes sense, you need to apply these config _before_ the osds are applied via the spec (L34).\nThis task can process the dictionary provided by tht and can apply the \u003csection\u003e \u003ckey\u003e \u003cvalue\u003e map against the ceph cluster","commit_id":"0fc6e14fd3498d4eb9a5a9dc5a988cda65fa36b1"}],"tripleo_ansible/roles/tripleo_cephadm/defaults/main.yml":[{"author":{"_account_id":18002,"name":"John Fulton","email":"fulton@redhat.com","username":"fultonj"},"change_message_id":"8b4e09f50be3eb8838fe80b79f5f3754158721a6","unresolved":true,"context_lines":[{"line_number":49,"context_line":"tripleo_cephadm_nfs_rados_export_index: \u0027ganesha-export-index\u0027"},{"line_number":50,"context_line":"tripleo_cephadm_ceph_nfs_rados_backend: true"},{"line_number":51,"context_line":"tripleo_cephadm_certs: /etc/pki/tls"},{"line_number":52,"context_line":"# todo(fultonj) add is_hci boolean for target memory"},{"line_number":53,"context_line":"# https://lists.ceph.io/hyperkitty/list/dev@ceph.io/thread/Z77XO23JPXDNHKM7IG6UN4URYKA6L7VH/"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"4a6f5dc4_1bd6646d","side":"PARENT","line":52,"range":{"start_line":52,"start_character":0,"end_line":52,"end_character":52},"updated":"2021-06-02 22:20:11.000000000","message":"The ability to have TripleO run a command like the following, enabled by this feature, satisfies this todo.\n\nceph config set mgr mgr/cephadm/autotune_memory_target_ratio 0.5","commit_id":"150155ff9f5f0eba6eedc23682466a707501cac1"},{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"a01a2273c7a86f8e4ddd419951e3197bf75fbeb9","unresolved":true,"context_lines":[{"line_number":49,"context_line":"tripleo_cephadm_nfs_rados_export_index: \u0027ganesha-export-index\u0027"},{"line_number":50,"context_line":"tripleo_cephadm_ceph_nfs_rados_backend: true"},{"line_number":51,"context_line":"tripleo_cephadm_certs: /etc/pki/tls"},{"line_number":52,"context_line":"tripleo_cephadm_ceph_config_set_map_path: \"/home/stack/ceph_config_set_map.yaml\""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3b3a754a_c38b2926","line":52,"range":{"start_line":52,"start_character":0,"end_line":52,"end_character":80},"updated":"2021-06-03 09:07:54.000000000","message":"This can be removed as long as the parameter exists in tripleo_run_cephadm and has a default.\nAt least we can add here:\n\ntripleo_cephadm_config_map: {} \n\nthat eventually makes molecule happy","commit_id":"0fc6e14fd3498d4eb9a5a9dc5a988cda65fa36b1"}],"tripleo_ansible/roles/tripleo_cephadm/tasks/ceph_config_set.yaml":[{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"a01a2273c7a86f8e4ddd419951e3197bf75fbeb9","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"# Copyright 2021 Red Hat, Inc."},{"line_number":3,"context_line":"# All Rights Reserved."},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"d34a25ee_b18c8cfd","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":3},"updated":"2021-06-03 09:07:54.000000000","message":"I think this can be reworked w/o having a bash script that should be generated, copied and executed.\nWe already have the dictionary providing the input here (that can be passed via tripleo_run_cephadm as an ansible var) and it\u0027s something like:\n\n```\ntripleo_cephadm_config_map: {\"mgr\": {\"mgr/cephadm/autotune_memory_target_ratio\": 0.5}, \"osd\": {\"osd_memory_target_autotune\": true, \"osd_numa_node\": 0}}\n```\n\nNow, if you just add a new ceph-ansible module that uses the same functions that are already implemented and used by the other components (rgw, mds, monitoring stack, ceph_fs, keys), you can just add it here the following task:\n\n- name: Config map\n  ceph_config:\n    cluster: \"ceph\"\n    data: \"{{ tripleo_cephadm_config_map | to_json }}\"\n  environment:\n    CEPH_CONTAINER_IMAGE: \"{{ tripleo_cephadm_container_ns + \u0027/\u0027 + tripleo_cephadm_container_image + \u0027:\u0027 + tripleo_cephadm_container_tag }}\"\n    CEPH_CONTAINER_BINARY: \"{{ tripleo_cephadm_container_cli }}\"\n\n \nwhich is able to apply the settings against the ceph cluster.\nI created a quick module [1] that can be used for this purpose.\n\nThe advantage of using an ansible module instead of rendering a bash script here is minimize the extra logic (just 1 ansible task \"to rule them all\"), you can easily extend it in the future providing more parameters (e.g. you need additional config options) and you can improve the module relying on the data structure passed as an input instead of working with multiple parts.\nIn addition, this maintain consistency on the approach used for the other components, other than the style adopted in the playbook.\nLet\u0027s talk more about it, but I basically tested this way and work pretty well. \n\n[1] https://github.com/fmount/tripleo-xena/blob/master/scripts/ceph_config_module.py","commit_id":"0fc6e14fd3498d4eb9a5a9dc5a988cda65fa36b1"}],"tripleo_ansible/roles/tripleo_run_cephadm/tasks/prepare.yml":[{"author":{"_account_id":25402,"name":"Francesco Pantano","email":"fpantano@redhat.com","username":"fmount"},"change_message_id":"a01a2273c7a86f8e4ddd419951e3197bf75fbeb9","unresolved":true,"context_lines":[{"line_number":119,"context_line":"      tripleo_cephadm_spec_ansible_host: \"{{ tripleo_run_cephadm_spec_path }}\""},{"line_number":120,"context_line":"      tripleo_cephadm_internal_tls_enabled: \"{{ enable_internal_tls }}\""},{"line_number":121,"context_line":"      tripleo_cephadm_num_osd_expected: \"{{ groups[\u0027ceph_osd\u0027] | default([]) | length }}\""},{"line_number":122,"context_line":"      tripleo_cephadm_ceph_config_set_map_path: \"{{ playbook_dir }}/cephadm/ceph_config_set_map.yml\""},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"- name: generate ceph_config_set_map.yml file for running tripleo_cephadm role"},{"line_number":125,"context_line":"  copy:"},{"line_number":126,"context_line":"    dest: \"{{ playbook_dir }}/cephadm/ceph_config_set_map.yml\""},{"line_number":127,"context_line":"    content: \"{{ ceph_config_set_map | to_nice_yaml }}\""},{"line_number":128,"context_line":"  when:"},{"line_number":129,"context_line":"    - ceph_config_set_map is defined"},{"line_number":130,"context_line":"    - ceph_config_set_map | length \u003e 0"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"42dfa00d_e655fb5f","line":130,"range":{"start_line":122,"start_character":0,"end_line":130,"end_character":38},"updated":"2021-06-03 09:07:54.000000000","message":"You don\u0027t need this, you can just propagate the tht parameter adding on L122:\n\ntripleo_cephadm_config_map: {{ ceph_config_set_map | to_json | default({}) }}\n\nThis dictionary will then be visible to the cephadm playbook and can be processed in terms of sections, keys and values, that can be applied in a separated task","commit_id":"0fc6e14fd3498d4eb9a5a9dc5a988cda65fa36b1"}]}
