)]}'
{"releasenotes/notes/add-ha-support-b9042255e5b76e42.yaml":[{"author":{"_account_id":24501,"name":"sue","display_name":"suzhengwei","email":"sugar-2008@163.com","username":"suzhengwei"},"change_message_id":"5fb14cf37f3294346d028c9cbf8c10eea3f80ad3","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Watcher services can be launched in HA mode. From now on Watcher Decision"},{"line_number":4,"context_line":"    Engine and Watcher Applier services may be deployed on different nodes to"},{"line_number":5,"context_line":"    run in active-active or active-passive mode. Any ONGOING Audits or Action Plans"},{"line_number":6,"context_line":"    will be CANCELLED if service they are executed on is restarted."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"5f7c97a3_78a5f400","line":6,"range":{"start_line":5,"start_character":49,"end_line":6,"end_character":66},"updated":"2018-07-24 08:15:51.000000000","message":"What will happend if the service is stopped for a long time? Will the audit or actionplan been scheduled to other host?","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"83e711467d3a9dc0b849048fbae1a834ad92eb4e","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Watcher services can be launched in HA mode. From now on Watcher Decision"},{"line_number":4,"context_line":"    Engine and Watcher Applier services may be deployed on different nodes to"},{"line_number":5,"context_line":"    run in active-active or active-passive mode. Any ONGOING Audits or Action Plans"},{"line_number":6,"context_line":"    will be CANCELLED if service they are executed on is restarted."}],"source_content_type":"text/x-yaml","patch_set":12,"id":"5f7c97a3_e75b9d86","line":6,"range":{"start_line":5,"start_character":49,"end_line":6,"end_character":66},"in_reply_to":"5f7c97a3_78a5f400","updated":"2018-07-25 09:24:16.000000000","message":"ONESHOT Audit and Action Plans will not be scheduled since they will be in CANCELLED state.","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"}],"watcher/api/controllers/v1/action_plan.py":[{"author":{"_account_id":24501,"name":"sue","display_name":"suzhengwei","email":"sugar-2008@163.com","username":"suzhengwei"},"change_message_id":"5fb14cf37f3294346d028c9cbf8c10eea3f80ad3","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    \"\"\"A list containing a self link and associated action links\"\"\""},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    hostname \u003d wsme.wsattr(wtypes.text, mandatory\u003dFalse)"},{"line_number":234,"context_line":"    \"\"\"Hostname the audit is running on\"\"\""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def __init__(self, **kwargs):"},{"line_number":237,"context_line":"        super(ActionPlan, self).__init__()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_385a1c1e","line":234,"range":{"start_line":234,"start_character":20,"end_line":234,"end_character":25},"updated":"2018-07-24 08:15:51.000000000","message":"actionplan","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"83e711467d3a9dc0b849048fbae1a834ad92eb4e","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    \"\"\"A list containing a self link and associated action links\"\"\""},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    hostname \u003d wsme.wsattr(wtypes.text, mandatory\u003dFalse)"},{"line_number":234,"context_line":"    \"\"\"Hostname the audit is running on\"\"\""},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def __init__(self, **kwargs):"},{"line_number":237,"context_line":"        super(ActionPlan, self).__init__()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_671b0d1d","line":234,"range":{"start_line":234,"start_character":20,"end_line":234,"end_character":25},"in_reply_to":"5f7c97a3_385a1c1e","updated":"2018-07-25 09:24:16.000000000","message":"Done","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"}],"watcher/applier/sync.py":[{"author":{"_account_id":21692,"name":"licanwei","email":"li.canwei2@zte.com.cn","username":"licanwei"},"change_message_id":"8ba9456da2ba2a39a7d0799e0f027e7b64c68154","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            for a in actions:"},{"line_number":67,"context_line":"                a.state \u003d objects.action.State.CANCELLED"},{"line_number":68,"context_line":"                a.save()"},{"line_number":69,"context_line":"            LOG.info(\"Action Plan %(uuid)s along with appropriate Actions \""},{"line_number":70,"context_line":"                     \"has been cancelled because it was in %(state)s state \""},{"line_number":71,"context_line":"                     \"when Applier had been stopped on %(hostname)s host.\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_6f53483b","line":71,"range":{"start_line":69,"start_character":21,"end_line":71,"end_character":74},"updated":"2018-07-19 11:24:11.000000000","message":"{\u0027uuid\u0027: audit.uuid,\n                      \u0027state\u0027: objects.audit.State.ONGOING,\n                      \u0027hostname\u0027: audit.hostname}","commit_id":"7fb802cad6b90ce725a8935df1f8db59b51ab292"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"a9044a34f6813e3fbb7d6b33c8aec0e31c5911da","unresolved":false,"context_lines":[{"line_number":66,"context_line":"            for a in actions:"},{"line_number":67,"context_line":"                a.state \u003d objects.action.State.CANCELLED"},{"line_number":68,"context_line":"                a.save()"},{"line_number":69,"context_line":"            LOG.info(\"Action Plan %(uuid)s along with appropriate Actions \""},{"line_number":70,"context_line":"                     \"has been cancelled because it was in %(state)s state \""},{"line_number":71,"context_line":"                     \"when Applier had been stopped on %(hostname)s host.\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_0a9f22b3","line":71,"range":{"start_line":69,"start_character":21,"end_line":71,"end_character":74},"in_reply_to":"5f7c97a3_6f53483b","updated":"2018-07-19 13:19:22.000000000","message":"Done","commit_id":"7fb802cad6b90ce725a8935df1f8db59b51ab292"},{"author":{"_account_id":13111,"name":"Hidekazu Nakamura","email":"hidekazuna@gmail.com","username":"hid-nakamura"},"change_message_id":"11bc9d392ee1fd53c6656bf31aed9bb6fe90072e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        actions_plans \u003d objects.ActionPlan.list("},{"line_number":56,"context_line":"            context,"},{"line_number":57,"context_line":"            filters\u003d{\u0027state\u0027: objects.action_plan.State.ONGOING,"},{"line_number":58,"context_line":"                     \u0027hostname\u0027: CONF.host})"},{"line_number":59,"context_line":"        for ap in actions_plans:"},{"line_number":60,"context_line":"            ap.state \u003d objects.action_plan.State.CANCELLED"},{"line_number":61,"context_line":"            ap.save()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_f8d02455","line":58,"updated":"2018-07-24 07:46:38.000000000","message":"Add \"eager\u003dTrue\"","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"83e711467d3a9dc0b849048fbae1a834ad92eb4e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        actions_plans \u003d objects.ActionPlan.list("},{"line_number":56,"context_line":"            context,"},{"line_number":57,"context_line":"            filters\u003d{\u0027state\u0027: objects.action_plan.State.ONGOING,"},{"line_number":58,"context_line":"                     \u0027hostname\u0027: CONF.host})"},{"line_number":59,"context_line":"        for ap in actions_plans:"},{"line_number":60,"context_line":"            ap.state \u003d objects.action_plan.State.CANCELLED"},{"line_number":61,"context_line":"            ap.save()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_e7271d66","line":58,"in_reply_to":"5f7c97a3_f8d02455","updated":"2018-07-25 09:24:16.000000000","message":"Done","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"}],"watcher/decision_engine/audit/continuous.py":[{"author":{"_account_id":21692,"name":"licanwei","email":"li.canwei2@zte.com.cn","username":"licanwei"},"change_message_id":"8ba9456da2ba2a39a7d0799e0f027e7b64c68154","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        audit_context \u003d context.RequestContext(is_admin\u003dTrue)"},{"line_number":122,"context_line":"        audit_filters \u003d {"},{"line_number":123,"context_line":"            \u0027audit_type\u0027: objects.audit.AuditType.CONTINUOUS.value,"},{"line_number":124,"context_line":"            \u0027state__in\u0027: (objects.audit.State.PENDING,"},{"line_number":125,"context_line":"                          objects.audit.State.ONGOING,"},{"line_number":126,"context_line":"                          objects.audit.State.SUCCEEDED)"},{"line_number":127,"context_line":"        }"},{"line_number":128,"context_line":"        audits \u003d objects.Audit.list("},{"line_number":129,"context_line":"            audit_context, filters\u003daudit_filters, eager\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_0f6ad4ea","line":126,"range":{"start_line":124,"start_character":13,"end_line":126,"end_character":56},"updated":"2018-07-19 11:24:11.000000000","message":"If audit state is ONGOING or SUCCEEDED, we just need audits which  audit.hostname equal to this CONF.host.","commit_id":"7fb802cad6b90ce725a8935df1f8db59b51ab292"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"a9044a34f6813e3fbb7d6b33c8aec0e31c5911da","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        audit_context \u003d context.RequestContext(is_admin\u003dTrue)"},{"line_number":122,"context_line":"        audit_filters \u003d {"},{"line_number":123,"context_line":"            \u0027audit_type\u0027: objects.audit.AuditType.CONTINUOUS.value,"},{"line_number":124,"context_line":"            \u0027state__in\u0027: (objects.audit.State.PENDING,"},{"line_number":125,"context_line":"                          objects.audit.State.ONGOING,"},{"line_number":126,"context_line":"                          objects.audit.State.SUCCEEDED)"},{"line_number":127,"context_line":"        }"},{"line_number":128,"context_line":"        audits \u003d objects.Audit.list("},{"line_number":129,"context_line":"            audit_context, filters\u003daudit_filters, eager\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5f7c97a3_eabe66fe","line":126,"range":{"start_line":124,"start_character":13,"end_line":126,"end_character":56},"in_reply_to":"5f7c97a3_0f6ad4ea","updated":"2018-07-19 13:19:22.000000000","message":"Done","commit_id":"7fb802cad6b90ce725a8935df1f8db59b51ab292"},{"author":{"_account_id":21692,"name":"licanwei","email":"li.canwei2@zte.com.cn","username":"licanwei"},"change_message_id":"6d116e4579c12f921bb21e873876de72f0fcb60a","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            \u0027state__in\u0027: (objects.audit.State.PENDING,"},{"line_number":125,"context_line":"                          objects.audit.State.ONGOING,"},{"line_number":126,"context_line":"                          objects.audit.State.SUCCEEDED),"},{"line_number":127,"context_line":"            \u0027hostname\u0027: CONF.host"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":"        audits \u003d objects.Audit.list("},{"line_number":130,"context_line":"            audit_context, filters\u003daudit_filters, eager\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_4a82bf01","line":127,"range":{"start_line":127,"start_character":13,"end_line":127,"end_character":33},"updated":"2018-07-23 03:53:22.000000000","message":"There are two cases, If audit has been running ,its state is ONGOING, hostname is CONF.host; If this is the first running, audit state is PENDING, hostname will be None.","commit_id":"f6444a8589050b81823a7775b4c87aa4644a994e"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"1fa6bcaa5fa7aa64cbb1d1e2b8b58242f5c4cc5d","unresolved":false,"context_lines":[{"line_number":124,"context_line":"            \u0027state__in\u0027: (objects.audit.State.PENDING,"},{"line_number":125,"context_line":"                          objects.audit.State.ONGOING,"},{"line_number":126,"context_line":"                          objects.audit.State.SUCCEEDED),"},{"line_number":127,"context_line":"            \u0027hostname\u0027: CONF.host"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":"        audits \u003d objects.Audit.list("},{"line_number":130,"context_line":"            audit_context, filters\u003daudit_filters, eager\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":11,"id":"5f7c97a3_2dc6786b","line":127,"range":{"start_line":127,"start_character":13,"end_line":127,"end_character":33},"in_reply_to":"5f7c97a3_4a82bf01","updated":"2018-07-23 09:05:03.000000000","message":"Done","commit_id":"f6444a8589050b81823a7775b4c87aa4644a994e"},{"author":{"_account_id":24501,"name":"sue","display_name":"suzhengwei","email":"sugar-2008@163.com","username":"suzhengwei"},"change_message_id":"5fb14cf37f3294346d028c9cbf8c10eea3f80ad3","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                               **trigger_args)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def launch_audits_periodically(self):"},{"line_number":121,"context_line":"        audit_context \u003d context.RequestContext(is_admin\u003dTrue)"},{"line_number":122,"context_line":"        audit_filters \u003d {"},{"line_number":123,"context_line":"            \u0027audit_type\u0027: objects.audit.AuditType.CONTINUOUS.value,"},{"line_number":124,"context_line":"            \u0027state__in\u0027: (objects.audit.State.PENDING,"},{"line_number":125,"context_line":"                          objects.audit.State.ONGOING,"},{"line_number":126,"context_line":"                          objects.audit.State.SUCCEEDED),"},{"line_number":127,"context_line":"            \u0027hostname__in\u0027: (None, CONF.host)"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":"        audits \u003d objects.Audit.list("},{"line_number":130,"context_line":"            audit_context, filters\u003daudit_filters, eager\u003dTrue)"},{"line_number":131,"context_line":"        for audit in audits:"},{"line_number":132,"context_line":"            # If continuous audit doesn\u0027t have a hostname yet,"},{"line_number":133,"context_line":"            # Watcher will set current CONF.host value."},{"line_number":134,"context_line":"            if audit.hostname is None:"},{"line_number":135,"context_line":"                audit.hostname \u003d CONF.host"},{"line_number":136,"context_line":"                audit.save()"},{"line_number":137,"context_line":"        scheduler_job_args \u003d ["},{"line_number":138,"context_line":"            (job.args[0].uuid, job) for job"},{"line_number":139,"context_line":"            in self.scheduler.get_jobs()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_f8ba64de","line":136,"range":{"start_line":121,"start_character":0,"end_line":136,"end_character":28},"updated":"2018-07-24 08:15:51.000000000","message":"Multi desion-engines maybe enter into such process nearly at the same time, and they will all get the audit with hostname \"None\".It\u0027s not a reasonable solution.\n\nwe can rely on rpc to select an active desion-engine:\nif audit type is continus, also trigger it by de_client. \nhttps://github.com/openstack/watcher/blob/master/watcher/api/controllers/v1/audit.py#L579\nthe rpc call will received by an active desion engine, and \nsync audit.hostname here.\nhttps://github.com/openstack/watcher/blob/master/watcher/decision_engine/messaging/audit_endpoint.py#L47","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"73ca937b1b6fdaa3900198c92a10bc77bae0fe76","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                               **trigger_args)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def launch_audits_periodically(self):"},{"line_number":121,"context_line":"        audit_context \u003d context.RequestContext(is_admin\u003dTrue)"},{"line_number":122,"context_line":"        audit_filters \u003d {"},{"line_number":123,"context_line":"            \u0027audit_type\u0027: objects.audit.AuditType.CONTINUOUS.value,"},{"line_number":124,"context_line":"            \u0027state__in\u0027: (objects.audit.State.PENDING,"},{"line_number":125,"context_line":"                          objects.audit.State.ONGOING,"},{"line_number":126,"context_line":"                          objects.audit.State.SUCCEEDED),"},{"line_number":127,"context_line":"            \u0027hostname__in\u0027: (None, CONF.host)"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":"        audits \u003d objects.Audit.list("},{"line_number":130,"context_line":"            audit_context, filters\u003daudit_filters, eager\u003dTrue)"},{"line_number":131,"context_line":"        for audit in audits:"},{"line_number":132,"context_line":"            # If continuous audit doesn\u0027t have a hostname yet,"},{"line_number":133,"context_line":"            # Watcher will set current CONF.host value."},{"line_number":134,"context_line":"            if audit.hostname is None:"},{"line_number":135,"context_line":"                audit.hostname \u003d CONF.host"},{"line_number":136,"context_line":"                audit.save()"},{"line_number":137,"context_line":"        scheduler_job_args \u003d ["},{"line_number":138,"context_line":"            (job.args[0].uuid, job) for job"},{"line_number":139,"context_line":"            in self.scheduler.get_jobs()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_95c6779c","line":136,"range":{"start_line":121,"start_character":0,"end_line":136,"end_character":28},"in_reply_to":"5f7c97a3_7abb880f","updated":"2018-07-25 10:23:15.000000000","message":"with HA patch, Watcher DEs shouldn\u0027t run the same audit","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":24501,"name":"sue","display_name":"suzhengwei","email":"sugar-2008@163.com","username":"suzhengwei"},"change_message_id":"78cd2afbd446eb96bc89024c69a06022f5a8a172","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                               **trigger_args)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def launch_audits_periodically(self):"},{"line_number":121,"context_line":"        audit_context \u003d context.RequestContext(is_admin\u003dTrue)"},{"line_number":122,"context_line":"        audit_filters \u003d {"},{"line_number":123,"context_line":"            \u0027audit_type\u0027: objects.audit.AuditType.CONTINUOUS.value,"},{"line_number":124,"context_line":"            \u0027state__in\u0027: (objects.audit.State.PENDING,"},{"line_number":125,"context_line":"                          objects.audit.State.ONGOING,"},{"line_number":126,"context_line":"                          objects.audit.State.SUCCEEDED),"},{"line_number":127,"context_line":"            \u0027hostname__in\u0027: (None, CONF.host)"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":"        audits \u003d objects.Audit.list("},{"line_number":130,"context_line":"            audit_context, filters\u003daudit_filters, eager\u003dTrue)"},{"line_number":131,"context_line":"        for audit in audits:"},{"line_number":132,"context_line":"            # If continuous audit doesn\u0027t have a hostname yet,"},{"line_number":133,"context_line":"            # Watcher will set current CONF.host value."},{"line_number":134,"context_line":"            if audit.hostname is None:"},{"line_number":135,"context_line":"                audit.hostname \u003d CONF.host"},{"line_number":136,"context_line":"                audit.save()"},{"line_number":137,"context_line":"        scheduler_job_args \u003d ["},{"line_number":138,"context_line":"            (job.args[0].uuid, job) for job"},{"line_number":139,"context_line":"            in self.scheduler.get_jobs()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_7abb880f","line":136,"range":{"start_line":121,"start_character":0,"end_line":136,"end_character":28},"in_reply_to":"5f7c97a3_87fae941","updated":"2018-07-25 09:54:08.000000000","message":"I have report one bug about this problem.\nhttps://bugs.launchpad.net/watcher/+bug/1737674\n\nIf two DEs runnig the same audit, they will generate two actionplans. And the actionplans may conflict.","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":21692,"name":"licanwei","email":"li.canwei2@zte.com.cn","username":"licanwei"},"change_message_id":"6761c435fe0cf02ae83cb622a5dcd3c615b5bd3e","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                               **trigger_args)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def launch_audits_periodically(self):"},{"line_number":121,"context_line":"        audit_context \u003d context.RequestContext(is_admin\u003dTrue)"},{"line_number":122,"context_line":"        audit_filters \u003d {"},{"line_number":123,"context_line":"            \u0027audit_type\u0027: objects.audit.AuditType.CONTINUOUS.value,"},{"line_number":124,"context_line":"            \u0027state__in\u0027: (objects.audit.State.PENDING,"},{"line_number":125,"context_line":"                          objects.audit.State.ONGOING,"},{"line_number":126,"context_line":"                          objects.audit.State.SUCCEEDED),"},{"line_number":127,"context_line":"            \u0027hostname__in\u0027: (None, CONF.host)"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":"        audits \u003d objects.Audit.list("},{"line_number":130,"context_line":"            audit_context, filters\u003daudit_filters, eager\u003dTrue)"},{"line_number":131,"context_line":"        for audit in audits:"},{"line_number":132,"context_line":"            # If continuous audit doesn\u0027t have a hostname yet,"},{"line_number":133,"context_line":"            # Watcher will set current CONF.host value."},{"line_number":134,"context_line":"            if audit.hostname is None:"},{"line_number":135,"context_line":"                audit.hostname \u003d CONF.host"},{"line_number":136,"context_line":"                audit.save()"},{"line_number":137,"context_line":"        scheduler_job_args \u003d ["},{"line_number":138,"context_line":"            (job.args[0].uuid, job) for job"},{"line_number":139,"context_line":"            in self.scheduler.get_jobs()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_87fae941","line":136,"range":{"start_line":121,"start_character":0,"end_line":136,"end_character":28},"in_reply_to":"5f7c97a3_f8ba64de","updated":"2018-07-24 11:41:43.000000000","message":"I don\u0027t think this is a problem. Even there are two DEs running the same audit. It\u0027s not a problem because only one actionplan will be running.","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"83e711467d3a9dc0b849048fbae1a834ad92eb4e","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                               **trigger_args)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def launch_audits_periodically(self):"},{"line_number":121,"context_line":"        audit_context \u003d context.RequestContext(is_admin\u003dTrue)"},{"line_number":122,"context_line":"        audit_filters \u003d {"},{"line_number":123,"context_line":"            \u0027audit_type\u0027: objects.audit.AuditType.CONTINUOUS.value,"},{"line_number":124,"context_line":"            \u0027state__in\u0027: (objects.audit.State.PENDING,"},{"line_number":125,"context_line":"                          objects.audit.State.ONGOING,"},{"line_number":126,"context_line":"                          objects.audit.State.SUCCEEDED),"},{"line_number":127,"context_line":"            \u0027hostname__in\u0027: (None, CONF.host)"},{"line_number":128,"context_line":"        }"},{"line_number":129,"context_line":"        audits \u003d objects.Audit.list("},{"line_number":130,"context_line":"            audit_context, filters\u003daudit_filters, eager\u003dTrue)"},{"line_number":131,"context_line":"        for audit in audits:"},{"line_number":132,"context_line":"            # If continuous audit doesn\u0027t have a hostname yet,"},{"line_number":133,"context_line":"            # Watcher will set current CONF.host value."},{"line_number":134,"context_line":"            if audit.hostname is None:"},{"line_number":135,"context_line":"                audit.hostname \u003d CONF.host"},{"line_number":136,"context_line":"                audit.save()"},{"line_number":137,"context_line":"        scheduler_job_args \u003d ["},{"line_number":138,"context_line":"            (job.args[0].uuid, job) for job"},{"line_number":139,"context_line":"            in self.scheduler.get_jobs()"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_9fe776ac","line":136,"range":{"start_line":121,"start_character":0,"end_line":136,"end_character":28},"in_reply_to":"5f7c97a3_f8ba64de","updated":"2018-07-25 09:24:16.000000000","message":"In most cases, it\u0027s not a problem. BTW, we can remove Audit that just got a hostname out of audit list (line 136, just after saving). In such case, even if two concurrent decision engine will update audit with their own hostnames, this audit will be removed from current iteration of \u0027launch_audits_periodically\u0027 and will be executed later as usual audit with hostname.","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"}],"watcher/decision_engine/scheduling.py":[{"author":{"_account_id":24501,"name":"sue","display_name":"suzhengwei","email":"sugar-2008@163.com","username":"suzhengwei"},"change_message_id":"5fb14cf37f3294346d028c9cbf8c10eea3f80ad3","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":113,"context_line":"        self.add_sync_jobs()"},{"line_number":114,"context_line":"        self.add_checkstate_job()"},{"line_number":115,"context_line":"        self.cancel_ongoing_audits()"},{"line_number":116,"context_line":"        super(DecisionEngineSchedulingService, self).start()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def stop(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_b8fe2c68","line":115,"range":{"start_line":115,"start_character":0,"end_line":115,"end_character":36},"updated":"2018-07-24 08:15:51.000000000","message":"the current audit will not be influenced by the audit once before, so we could:\n1.not cancel ongoing audits; just continus to ongoing the audits if this desion-engine stop for a very short time.\n2.add a backgroundjob to motitor the audits. If one ongoing audit didn\u0027t update for a long time, such as 3  periods, just schedule it to other host.","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"83e711467d3a9dc0b849048fbae1a834ad92eb4e","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":113,"context_line":"        self.add_sync_jobs()"},{"line_number":114,"context_line":"        self.add_checkstate_job()"},{"line_number":115,"context_line":"        self.cancel_ongoing_audits()"},{"line_number":116,"context_line":"        super(DecisionEngineSchedulingService, self).start()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def stop(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_3fe182fe","line":115,"range":{"start_line":115,"start_character":0,"end_line":115,"end_character":36},"in_reply_to":"5f7c97a3_67c54d3e","updated":"2018-07-25 09:24:16.000000000","message":"why not? ONESHOT Audit is disposable thing, we can easily recreate it using Audit Template","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"73ca937b1b6fdaa3900198c92a10bc77bae0fe76","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":113,"context_line":"        self.add_sync_jobs()"},{"line_number":114,"context_line":"        self.add_checkstate_job()"},{"line_number":115,"context_line":"        self.cancel_ongoing_audits()"},{"line_number":116,"context_line":"        super(DecisionEngineSchedulingService, self).start()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def stop(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_15ba670a","line":115,"range":{"start_line":115,"start_character":0,"end_line":115,"end_character":36},"in_reply_to":"5f7c97a3_7a986866","updated":"2018-07-25 10:23:15.000000000","message":"I propose the following plan:\n1. We will try to merge it by R-3 milestone without including rescheduling CONTINUOUS audits fix\n2. We can consider rescheduling of continuous audit as fix for HA feature so we can work on it after rocky-3 deadline but before release candidate","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"83e711467d3a9dc0b849048fbae1a834ad92eb4e","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":113,"context_line":"        self.add_sync_jobs()"},{"line_number":114,"context_line":"        self.add_checkstate_job()"},{"line_number":115,"context_line":"        self.cancel_ongoing_audits()"},{"line_number":116,"context_line":"        super(DecisionEngineSchedulingService, self).start()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def stop(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_ffed4ab8","line":115,"range":{"start_line":115,"start_character":0,"end_line":115,"end_character":36},"in_reply_to":"5f7c97a3_b8fe2c68","updated":"2018-07-25 09:24:16.000000000","message":"1. We don\u0027t know whether Node has been removed at all or not.\n2. Time of strategy execution depends on strategy input data. In some cases it may take 30-60 minutes.","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":21692,"name":"licanwei","email":"li.canwei2@zte.com.cn","username":"licanwei"},"change_message_id":"6761c435fe0cf02ae83cb622a5dcd3c615b5bd3e","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":113,"context_line":"        self.add_sync_jobs()"},{"line_number":114,"context_line":"        self.add_checkstate_job()"},{"line_number":115,"context_line":"        self.cancel_ongoing_audits()"},{"line_number":116,"context_line":"        super(DecisionEngineSchedulingService, self).start()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def stop(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_67c54d3e","line":115,"range":{"start_line":115,"start_character":0,"end_line":115,"end_character":36},"in_reply_to":"5f7c97a3_b8fe2c68","updated":"2018-07-24 11:41:43.000000000","message":"I think we don\u0027t need to stop the ongoing audit when service restart.","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"},{"author":{"_account_id":24501,"name":"sue","display_name":"suzhengwei","email":"sugar-2008@163.com","username":"suzhengwei"},"change_message_id":"78cd2afbd446eb96bc89024c69a06022f5a8a172","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        \"\"\"Start service.\"\"\""},{"line_number":113,"context_line":"        self.add_sync_jobs()"},{"line_number":114,"context_line":"        self.add_checkstate_job()"},{"line_number":115,"context_line":"        self.cancel_ongoing_audits()"},{"line_number":116,"context_line":"        super(DecisionEngineSchedulingService, self).start()"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    def stop(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_7a986866","line":115,"range":{"start_line":115,"start_character":0,"end_line":115,"end_character":36},"in_reply_to":"5f7c97a3_ffed4ab8","updated":"2018-07-25 09:54:08.000000000","message":"1.We can cancel ONESHOT audit.But to CONTINUS audit, is it better to schedule it to other host?\n2.30-60m, do you mean periods or the time it run the audit?If the audit every once time take 30-60m, it is unreliable, because the env may change very much. And when actionplan executes, it may be not efficient for optimizing. \nThat\u0027s why we would remove actionplans out of date.","commit_id":"42391cea77a6b65a587ef99b94d59daf28db5709"}]}
