)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":12549,"name":"gnuoy","email":"liam.young@canonical.com","username":"gnuoy"},"change_message_id":"378b4117323546ae3a7fa25a51af64a0b91ebaed","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"463aa4bf_e8815d8d","updated":"2022-07-20 08:15:31.000000000","message":"LGTM, thank for the fix!","commit_id":"1fef3793f5b4f089969a746ba8be33972ef58f10"},{"author":{"_account_id":34959,"name":"Francesco De Simone","email":"francesco.desimone@canonical.com","username":"fdesi"},"change_message_id":"632c7332c68f9211799900a909d72580031d3c2e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"06047ba9_490cac7c","updated":"2022-07-19 09:25:06.000000000","message":"charm-recheck","commit_id":"1fef3793f5b4f089969a746ba8be33972ef58f10"},{"author":{"_account_id":34959,"name":"Francesco De Simone","email":"francesco.desimone@canonical.com","username":"fdesi"},"change_message_id":"a3c1a80e07d2c3dad234c388cc8a437c86710c90","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"2402bb0f_9dfe3e49","updated":"2022-07-19 06:21:17.000000000","message":"charm-recheck","commit_id":"1fef3793f5b4f089969a746ba8be33972ef58f10"},{"author":{"_account_id":34959,"name":"Francesco De Simone","email":"francesco.desimone@canonical.com","username":"fdesi"},"change_message_id":"0131d959e6be2a42beb83ad490178769f58b6c40","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"57707218_8567a1a4","updated":"2022-07-18 20:46:54.000000000","message":"charm-recheck","commit_id":"1fef3793f5b4f089969a746ba8be33972ef58f10"}],"src/reactive/designate_handlers.py":[{"author":{"_account_id":12549,"name":"gnuoy","email":"liam.young@canonical.com","username":"gnuoy"},"change_message_id":"3f3110055cf23db9f6d767a2d9b6d3bcff8d8d51","unresolved":true,"context_lines":[{"line_number":96,"context_line":"    \"\"\"Set the config.rendered when the configuration"},{"line_number":97,"context_line":"    has been rendered"},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    reactive.set_state(\u0027config.rendered\u0027)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"@reactive.when(\u0027config.rendered\u0027, \u0027base-config.rendered\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"df001a39_158a8bf4","line":99,"updated":"2022-07-18 08:52:40.000000000","message":"Ideally this pattern would be in charms.openstack but I\u0027m not going to block on it. Can change the doc string to be the same as https://github.com/openstack/charm-manila/blob/b75e6ed3ce6b2c061105ac8226a778e1ec3685d4/src/reactive/manila_handlers.py#L178 otherwise the method seems very odd.","commit_id":"6125bcb702a94fcb496e2f1c1e291b83f795756f"},{"author":{"_account_id":34959,"name":"Francesco De Simone","email":"francesco.desimone@canonical.com","username":"fdesi"},"change_message_id":"d2a1d5a11c792a501c6c268bb05d31e96c9eb892","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    \"\"\"Set the config.rendered when the configuration"},{"line_number":97,"context_line":"    has been rendered"},{"line_number":98,"context_line":"    \"\"\""},{"line_number":99,"context_line":"    reactive.set_state(\u0027config.rendered\u0027)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"@reactive.when(\u0027config.rendered\u0027, \u0027base-config.rendered\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"2f362217_91b1ab6a","line":99,"in_reply_to":"df001a39_158a8bf4","updated":"2022-07-18 13:37:08.000000000","message":"Done","commit_id":"6125bcb702a94fcb496e2f1c1e291b83f795756f"},{"author":{"_account_id":12549,"name":"gnuoy","email":"liam.young@canonical.com","username":"gnuoy"},"change_message_id":"3f3110055cf23db9f6d767a2d9b6d3bcff8d8d51","unresolved":true,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"@reactive.when(\u0027config.rendered\u0027, \u0027base-config.rendered\u0027)"},{"line_number":103,"context_line":"def start_designate_mdns():"},{"line_number":104,"context_line":"    host.service_start(\u0027designate-mdns\u0027)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"@reactive.when(\u0027shared-db.connected\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"cd7a1e8a_2c8d9958","line":104,"updated":"2022-07-18 08:52:40.000000000","message":"Unfortunately the method in charms.openstack which runs the db sync does not raise a flag to indicate that the db sync is done, however we do not want to try and start the services until that happens.\nAlso, I don\u0027t think there is any reason to limit this to the `designate-mdns` service, I think the same logic should apply to all designate services. `disable_services` and `enable_services` can be used to manage this.\n\nI think you can achieve this with something like:\n\n```\n    with charm.provide_charm_instance() as instance:\n        if instance.db_sync_done():\n            instance.enable_services()\n        else:\n            hookenv.log(\n                \"Services not enabled, waiting for db sync\",\n                 level\u003dhookenv.WARNING)\n```","commit_id":"6125bcb702a94fcb496e2f1c1e291b83f795756f"},{"author":{"_account_id":34959,"name":"Francesco De Simone","email":"francesco.desimone@canonical.com","username":"fdesi"},"change_message_id":"d2a1d5a11c792a501c6c268bb05d31e96c9eb892","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"@reactive.when(\u0027config.rendered\u0027, \u0027base-config.rendered\u0027)"},{"line_number":103,"context_line":"def start_designate_mdns():"},{"line_number":104,"context_line":"    host.service_start(\u0027designate-mdns\u0027)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"@reactive.when(\u0027shared-db.connected\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"a0e6d2c6_b9fb01db","line":104,"in_reply_to":"cd7a1e8a_2c8d9958","updated":"2022-07-18 13:37:08.000000000","message":"Done","commit_id":"6125bcb702a94fcb496e2f1c1e291b83f795756f"},{"author":{"_account_id":12549,"name":"gnuoy","email":"liam.young@canonical.com","username":"gnuoy"},"change_message_id":"3f3110055cf23db9f6d767a2d9b6d3bcff8d8d51","unresolved":true,"context_lines":[{"line_number":152,"context_line":"        args \u003d args + (dns_backend, )"},{"line_number":153,"context_line":"    with charm.provide_charm_instance() as instance:"},{"line_number":154,"context_line":"        instance.render_base_config(args)"},{"line_number":155,"context_line":"    host.service_stop(\u0027designate-mdns\u0027)"},{"line_number":156,"context_line":"    reactive.set_state(\u0027base-config.rendered\u0027)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"8fea7322_66899a4f","line":155,"updated":"2022-07-18 08:52:40.000000000","message":"As mentioned above lets not make the `designate-mdns` service a special case unless we have to. Since you already have a instance of the charm class you can change this to:\n\n```\n    instance.disable_services()\n```","commit_id":"6125bcb702a94fcb496e2f1c1e291b83f795756f"},{"author":{"_account_id":34959,"name":"Francesco De Simone","email":"francesco.desimone@canonical.com","username":"fdesi"},"change_message_id":"d2a1d5a11c792a501c6c268bb05d31e96c9eb892","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        args \u003d args + (dns_backend, )"},{"line_number":153,"context_line":"    with charm.provide_charm_instance() as instance:"},{"line_number":154,"context_line":"        instance.render_base_config(args)"},{"line_number":155,"context_line":"    host.service_stop(\u0027designate-mdns\u0027)"},{"line_number":156,"context_line":"    reactive.set_state(\u0027base-config.rendered\u0027)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"888d435e_671c6146","line":155,"in_reply_to":"8fea7322_66899a4f","updated":"2022-07-18 13:37:08.000000000","message":"Done","commit_id":"6125bcb702a94fcb496e2f1c1e291b83f795756f"}]}
