)]}'
{"tasks/ceilometer_db_post_setup.yml":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"5eb26c2b023eb97a2e4048d467219735eb621885","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5f7c97a3_f78e1332","updated":"2018-07-11 07:52:25.000000000","message":"Please add the Apache2 license boilerplate to the top of this file. See the other files for reference.\n\nI\u0027d suggest renaming this file ceilometer_gnocchi_db_setup.yml to make its purpose a bit more explicit.","commit_id":"47e1b7479c43eeea77355d2243a38f69d5d0a613"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"5eb26c2b023eb97a2e4048d467219735eb621885","unresolved":false,"context_lines":[{"line_number":9,"context_line":"  command: \"{{ ceilometer_bin }}/ceilometer-upgrade --skip-metering-database\""},{"line_number":10,"context_line":"  become: yes"},{"line_number":11,"context_line":"  become_user: \"{{ ceilometer_system_user_name }}\""},{"line_number":12,"context_line":"  changed_when: false"},{"line_number":13,"context_line":"  when: gnocchi_resource_file.stat.exists"},{"line_number":14,"context_line":"  notify:"},{"line_number":15,"context_line":"    - Restart ceilometer services"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"5f7c97a3_d76e7763","line":15,"range":{"start_line":12,"start_character":0,"end_line":15,"end_character":33},"updated":"2018-07-11 07:52:25.000000000","message":"I realise that this was part of the original task which moved, but I\u0027ve just noticed a fault here.\n\nWith changed_when: false, this notify never gets fired. Do the ceilometer services need to restart when the db is initialised? If so then removing the changed_when will cause this to always restart the service unless there\u0027s some way of detecting a real change. If not then remove the notify.","commit_id":"47e1b7479c43eeea77355d2243a38f69d5d0a613"}],"tasks/ceilometer_db_setup.yml":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"f8e97adf72035bf850a6d47e36657599110d8165","unresolved":false,"context_lines":[{"line_number":19,"context_line":"  register: gnocchi_resource_file"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Initialize Gnocchi database by creating ceilometer resources"},{"line_number":22,"context_line":"  command: \"{{ ceilometer_bin }}/ceilometer-upgrade --skip-metering-database\""},{"line_number":23,"context_line":"  become: yes"},{"line_number":24,"context_line":"  become_user: \"{{ ceilometer_system_user_name }}\""},{"line_number":25,"context_line":"  when: gnocchi_resource_file.stat.exists"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_925d6456","line":22,"updated":"2018-07-11 15:06:22.000000000","message":"Is there a way to detect whether this changed anything? Maybe a different RC code or some sort of output?\n\nAs it stands right now every time this tasks executes it will show as changed and restart ceilometer. That\u0027s not great, and the lint check won\u0027t like it. We either need to tag it to skip lint checks on this task, or we need a condition for when it should show as changed.","commit_id":"6ddd269f443ada88c9aec1b4744850cb1c567b0d"},{"author":{"_account_id":23182,"name":"kourosh vivan","email":"kourosh.vivan@ovhcloud.com","username":"KouroshVivan"},"change_message_id":"f27d69603d2440e4964a5deb7cbb404ff9b0880c","unresolved":false,"context_lines":[{"line_number":19,"context_line":"  register: gnocchi_resource_file"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Initialize Gnocchi database by creating ceilometer resources"},{"line_number":22,"context_line":"  command: \"{{ ceilometer_bin }}/ceilometer-upgrade --skip-metering-database\""},{"line_number":23,"context_line":"  become: yes"},{"line_number":24,"context_line":"  become_user: \"{{ ceilometer_system_user_name }}\""},{"line_number":25,"context_line":"  when: gnocchi_resource_file.stat.exists"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_d212cab3","line":22,"in_reply_to":"5f7c97a3_925d6456","updated":"2018-07-13 08:59:17.000000000","message":"I checked:\n- output is always the same\n- restart is needed\n\nWe can check if this command change anything by comparing the number of resource-type before and after excecution, like this:\nroot@ctl-ns6534888-utility-container-38180b67:~# gnocchi resource-type list | wc -l","commit_id":"6ddd269f443ada88c9aec1b4744850cb1c567b0d"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"4225ca3c0e1d9548a86a87094a5ad11baef1592f","unresolved":false,"context_lines":[{"line_number":19,"context_line":"  register: gnocchi_resource_file"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"- name: Initialize Gnocchi database by creating ceilometer resources"},{"line_number":22,"context_line":"  command: \"{{ ceilometer_bin }}/ceilometer-upgrade --skip-metering-database\""},{"line_number":23,"context_line":"  become: yes"},{"line_number":24,"context_line":"  become_user: \"{{ ceilometer_system_user_name }}\""},{"line_number":25,"context_line":"  when: gnocchi_resource_file.stat.exists"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_a6db4f4c","line":22,"in_reply_to":"5f7c97a3_d212cab3","updated":"2018-07-13 09:33:40.000000000","message":"Alright, I guess best to just leave it as-is then. We can improve at a later time.","commit_id":"6ddd269f443ada88c9aec1b4744850cb1c567b0d"}],"tasks/main.yml":[{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"19d92559ab8b6ec9c82da29419167c6fcc57d08e","unresolved":false,"context_lines":[{"line_number":92,"context_line":"  tags:"},{"line_number":93,"context_line":"    - ceilometer-config"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"- include: ceilometer_db_setup.yml"},{"line_number":96,"context_line":"  tags:"},{"line_number":97,"context_line":"    - ceilometer-config"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_d228bc99","line":95,"updated":"2018-07-11 15:07:38.000000000","message":"Must this run for all ceilometer hosts, or just once? If once, then it should have a group scope conditional similar to the above task.","commit_id":"6ddd269f443ada88c9aec1b4744850cb1c567b0d"},{"author":{"_account_id":23182,"name":"kourosh vivan","email":"kourosh.vivan@ovhcloud.com","username":"KouroshVivan"},"change_message_id":"abf4f453f91b37e45be67662dac58e67a687edad","unresolved":false,"context_lines":[{"line_number":92,"context_line":"  tags:"},{"line_number":93,"context_line":"    - ceilometer-config"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"- include: ceilometer_db_setup.yml"},{"line_number":96,"context_line":"  tags:"},{"line_number":97,"context_line":"    - ceilometer-config"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_e604e77f","line":95,"in_reply_to":"5f7c97a3_06c5635c","updated":"2018-07-13 09:43:15.000000000","message":"Can be run on central and agent\n\nI\u0027ll remove the notify and put again the changed_when false because service are restart at the end anyway (don\u0027t see a flush_meta in ceilometer role)","commit_id":"6ddd269f443ada88c9aec1b4744850cb1c567b0d"},{"author":{"_account_id":6816,"name":"Jesse Pretorius","email":"jesse@odyssey4.me","username":"jesse-pretorius"},"change_message_id":"4225ca3c0e1d9548a86a87094a5ad11baef1592f","unresolved":false,"context_lines":[{"line_number":92,"context_line":"  tags:"},{"line_number":93,"context_line":"    - ceilometer-config"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"- include: ceilometer_db_setup.yml"},{"line_number":96,"context_line":"  tags:"},{"line_number":97,"context_line":"    - ceilometer-config"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_06c5635c","line":95,"in_reply_to":"5f7c97a3_92b0d2de","updated":"2018-07-13 09:33:40.000000000","message":"Well, it depends. This role runs against the control plane and the agents as far as I know - and I would think you only want to run this once on one of the control plane nodes, because the agents need this running by the time they\u0027re setup, right?\n\nIf so, then matching the same condition as the task above will do.\n\nIf it doesn\u0027t matter when it\u0027s run and where it executes from, then run_once: yes should do the trick.","commit_id":"6ddd269f443ada88c9aec1b4744850cb1c567b0d"},{"author":{"_account_id":23182,"name":"kourosh vivan","email":"kourosh.vivan@ovhcloud.com","username":"KouroshVivan"},"change_message_id":"f27d69603d2440e4964a5deb7cbb404ff9b0880c","unresolved":false,"context_lines":[{"line_number":92,"context_line":"  tags:"},{"line_number":93,"context_line":"    - ceilometer-config"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"- include: ceilometer_db_setup.yml"},{"line_number":96,"context_line":"  tags:"},{"line_number":97,"context_line":"    - ceilometer-config"}],"source_content_type":"text/x-yaml","patch_set":2,"id":"5f7c97a3_92b0d2de","line":95,"in_reply_to":"5f7c97a3_d228bc99","updated":"2018-07-13 08:59:17.000000000","message":"only one, should i add a run_once ?","commit_id":"6ddd269f443ada88c9aec1b4744850cb1c567b0d"}]}
