heat-specs/7888aecf10cf6a2d0f76d0f8532...

391 lines
21 KiB
Plaintext

{
"comments": [
{
"key": {
"uuid": "5f7c97a3_0e76a8a4",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 58,
"author": {
"id": 12404
},
"writtenOn": "2018-07-03T14:58:59Z",
"side": 1,
"message": "same here",
"range": {
"startLine": 58,
"startChar": 9,
"endLine": 58,
"endChar": 25
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_fb753001",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 12404
},
"writtenOn": "2018-07-03T14:58:59Z",
"side": 1,
"message": "Not in proposed property, do you mean to add this? If we really need this I think we can use `stack` and allow name or ID as input. Heat can translate it to ID before parsing it down to Vitrage:)",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_31b97b15",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 19159
},
"writtenOn": "2018-07-04T07:31:04Z",
"side": 1,
"message": "I didn\u0027t fully understand your comment... I copied this line from https://github.com/openstack/heat-templates/blob/master/hot/autohealing/autohealing_server.yaml (Line 133). \n\nHow would you write it instead?",
"parentUuid": "5f7c97a3_fb753001",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_a4a467b9",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 12404
},
"writtenOn": "2018-07-04T08:30:56Z",
"side": 1,
"message": "I think what you looking for is:\n\n resources:\n execute_healing:\n type: OS::Vitrage::Template\n properties:\n description: Execute Mistral healing workflow if the instance is down\n alarm_name: Instance down\n workflow_id: auto_heal\n workflow_input:\n stack_id: {get_param: \"OS::stack_id\"}",
"parentUuid": "5f7c97a3_31b97b15",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_042e7bf9",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 19159
},
"writtenOn": "2018-07-04T08:38:00Z",
"side": 1,
"message": "You removed stack_id from the properties, and renamed the one under workflow_input. Were these your only changes, or am I missing something?\n\nI wrote the stack_id in two places, because it is needed both for Vitrage template and as an input to the Mistral workflow. It won\u0027t necessarily have the same name. If I understand correctly, the property under workflow_input is not predefined in the code, so it could be anything.",
"parentUuid": "5f7c97a3_a4a467b9",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_0763ddb2",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 12404
},
"writtenOn": "2018-07-04T09:08:38Z",
"side": 1,
"message": "Why OS::Vitrage::Template require stack_id? you hope to use it as a template input or other way?",
"parentUuid": "5f7c97a3_042e7bf9",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_62507f2d",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 19159
},
"writtenOn": "2018-07-04T10:12:52Z",
"side": 1,
"message": "Actually, there are two alternatives for writing the Vitrage template:\n\n1. If an instance X is down -\u003e execute a Mistral healing workflow for instance X and stack Y\n\n2. If an instance that belongs to stack Y is down -\u003e execute a Mistral healing workflow for that instance and stack Y\n\nX should be Y are specific ids. In the second alternative, the check is for *any* instance that belongs to the stack.\n\nWhich option is better in your opinion?\nThe input for Vitrage template should be: alarm name, optional instance id, Heat stack id, and Mistral workflow details\n\n(BTW, in the future we will also have options 3,4,... for templates of network failures)",
"parentUuid": "5f7c97a3_0763ddb2",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_e97a2123",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 12404
},
"writtenOn": "2018-07-05T11:04:36Z",
"side": 1,
"message": "For a glance, I think option 1 is better since we should focus our care in that instance.:)\n\nI think we should also plan to implement this resource as a general Vitrage resource, so other use cases can use this too. So user can provide their own properties and achieve option 1 or 2(or other use cases) from their own mind.\n\nIf we provide a property like `input` we can put whatever we need for our use case (self-healing) also for other Vitrage use cases.\n\nSo the properties list might looks like:\n - description\n - alarm_name\n - input\n - workflow_id\n - workflow_input\n\n\nwich the example might looks like:\n execute_healing:\n type: OS::Vitrage::Template\n properties:\n description: Execute Mistral healing workflow if the instance is down\n alarm_name: Instance down\n input:\n instance: {get_param: instance_id}\n stack_id: {get_param: \"OS::stack_id\"}\n workflow_id: auto_heal\n workflow_input:\n heat_stack_id: {get_param: \"OS::stack_id\"}\n\nMake sense?\n\nSorry for my lack of knowledge of Vitrage, but I still trying to figure out how this resource works. So correct me if I\u0027m wrong in any way!\nIf this resource will generate a template(from scratch), will it make sense if we only have two properties `template` and `inputs` for this resource, and will feed in inputs to template? Try to figure out what is a basice Vitrage template required(if not consider self-healing cases)?",
"parentUuid": "5f7c97a3_62507f2d",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_0f50bd5d",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 19159
},
"writtenOn": "2018-07-05T12:15:14Z",
"side": 1,
"message": "Thanks for the details response. I\u0027m also still trying to figure out how this resource works ;-) I\u0027ve already written part of the code, it is still WIP, but will it help if I push it to gerrit, so you could see what I\u0027m trying to do?\n\nAs for your questions:\n\n1. For option 1, we need only the instance_id and not the stack_id. But it means that you will need to duplicate the VitrageTemplate block for every instance you want to have self-healing for, instead of writing it once for the entire stack. Alternatively, we could write a list of instances as an input. In option 2, the same healing process will work for every instance in the stack. What do you think?\n\n2. We definitely want to allow different use cases. However, this requires extra development in Vitrage that we won\u0027t have time to do in Rocky. Basically, you can write any topology condition in a Vitrage template. We noticed that there are a few patterns that keep repeating themselves. We would like to allow easily generating Vitrage templates based on a pattern, input and output. But this requires a thorough design that will take time. \n\nSo for Rocky I thought of supporting only one use case using a semi hard-coded Vitrage template. The goal is to \"tie everything together\", and then as a phase 2 we can support different Vitrage templates.\n\n3. I think that defining an \u0027input\u0027 is a good idea. The alarm_name should also be part of the input. It might also be a good idea to define a property for \u0027execute_workflow\u0027 that holds the workflow_id and workflow_input inside.",
"parentUuid": "5f7c97a3_e97a2123",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_783499ac",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 12404
},
"writtenOn": "2018-07-06T05:52:25Z",
"side": 1,
"message": "\u003e I\u0027ve already written part of the\n \u003e code, it is still WIP, but will it help if I push it to gerrit, so\n \u003e you could see what I\u0027m trying to do?\n \u003e \n\nFeel free to push it up, maybe mark the title with [WIP] or -1 on the workflow will be great\n\n\n \u003e As for your questions:\n \u003e \n \u003e 1. For option 1, we need only the instance_id and not the stack_id.\n \u003e But it means that you will need to duplicate the VitrageTemplate\n \u003e block for every instance you want to have self-healing for, instead\n \u003e of writing it once for the entire stack. Alternatively, we could\n \u003e write a list of instances as an input. In option 2, the same\n \u003e healing process will work for every instance in the stack. What do\n \u003e you think?\n\nIf it\u0027s not a huge burden, I do prefer we go with option 1. that way, ops get more flex on the range of instances. Also we get to define this vitrage template resource within that Stack template\n\nAnd we can also create a auto-scaling group on top of a auto-healing template (vitrage+instance+mistral) like what you see in heat-template\n\n\n \u003e \n \u003e So for Rocky I thought of supporting only one use case using a semi\n \u003e hard-coded Vitrage template. The goal is to \"tie everything\n \u003e together\", and then as a phase 2 we can support different Vitrage\n \u003e templates.\n\nSo maybe we can add one more property call `template_type` and currently only allow `self-healing-instance`(or some better name ;) )? So once we add more kind of support, It won\u0027t conflict or backport imcompatabile.\n\n\n \u003e It might also be a good idea to\n \u003e define a property for \u0027execute_workflow\u0027 that holds the workflow_id\n \u003e and workflow_input inside.\n\nThat\u0027s good idea:)",
"parentUuid": "5f7c97a3_0f50bd5d",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_aa406e33",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 19159
},
"writtenOn": "2018-07-08T13:45:53Z",
"side": 1,
"message": "\u003e If it\u0027s not a huge burden, I do prefer we go with option 1. that\n \u003e way, ops get more flex on the range of instances. Also we get to\n \u003e define this vitrage template resource within that Stack template\n \u003e \n \u003e And we can also create a auto-scaling group on top of a\n \u003e auto-healing template (vitrage+instance+mistral) like what you see\n \u003e in heat-template\n \nOk, I changed it.\n \n \u003e So maybe we can add one more property call `template_type` and\n \u003e currently only allow `self-healing-instance`(or some better name ;)\n \u003e )? So once we add more kind of support, It won\u0027t conflict or\n \u003e backport imcompatabile.\n\nI added \u0027type\u0027, although I\u0027m not so sure it\u0027s the right direction. We did not yet design how it will work in Vitrage in phase 2, so I\u0027m not 100% sure that we will create a template by a type parameter. On the other hand, I really want to push something in Rocky, even as a POC. What is the impact of changing some of the properties later on, in Stein? (hopefully we won\u0027t need to do that, but still)\n\nAnd thinking of what you said, I decided to add some more specific properties, that will also allow us in the future to generate templates that perform other actions, not only execute_mistral.\n\n \u003e \u003e It might also be a good idea to\n \u003e \u003e define a property for \u0027execute_workflow\u0027 that holds the\n \u003e workflow_id\n \u003e \u003e and workflow_input inside.\n \u003e \n \u003e That\u0027s good idea:)\n\nDone",
"parentUuid": "5f7c97a3_783499ac",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_7b8d4ad2",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 12404
},
"writtenOn": "2018-07-09T04:14:08Z",
"side": 1,
"message": "\u003e I added \u0027type\u0027, although I\u0027m not so sure it\u0027s the right direction.\n \u003e We did not yet design how it will work in Vitrage in phase 2, so\n \u003e I\u0027m not 100% sure that we will create a template by a type\n \u003e parameter. On the other hand, I really want to push something in\n \u003e Rocky, even as a POC. What is the impact of changing some of the\n \u003e properties later on, in Stein? (hopefully we won\u0027t need to do that,\n \u003e but still)\n\nSure, we can. but, if we do so, that means the default behavior of `Vitrage::Template` will be auto-healing if `type`(or whatever it\u0027s we going to use to separate cases) was not provided.\n\nThe best way IMO, if current properties(without `type`) already can tell it\u0027s asking to create an auto-healing template and other cases can use the same patten to decide. In this case, we don\u0027t actually need a type at all.:)\n\nWe can also deprecate or translate `type` if we gonna change it later. That will be fine.\n\nAnd yes, agree with you that we should not do more stuff, before Rocky release and let\u0027s focus on our current goal. For the more further plan, we can talk about it later.:)\n\n \u003e \n \u003e And thinking of what you said, I decided to add some more specific\n \u003e properties, that will also allow us in the future to generate\n \u003e templates that perform other actions, not only execute_mistral.\n \u003e \n\nThat\u0027s cool",
"parentUuid": "5f7c97a3_aa406e33",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_0ea86dd6",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 19159
},
"writtenOn": "2018-07-10T12:57:05Z",
"side": 1,
"message": "\u003e Sure, we can. but, if we do so, that means the default behavior of\n \u003e `Vitrage::Template` will be auto-healing if `type`(or whatever it\u0027s\n \u003e we going to use to separate cases) was not provided.\n \u003e \n \u003e The best way IMO, if current properties(without `type`) already can\n \u003e tell it\u0027s asking to create an auto-healing template and other cases\n \u003e can use the same patten to decide. In this case, we don\u0027t actually\n \u003e need a type at all.:)\n\nWell, there are two areas where Vitrage templates can differ from one another:\n\n1. The type of action(s) to be taken. In Rocky we will only support executing a Mistral workflow. It can be a healing workflow, or any other kind of workflow - it doesn\u0027t matter. The type of action is explicitly defined in the VitrageTemplate resource. Vitrage supports other types of actions (e.g. raise a deduced alarm), but they will not be reflected in Heat.\n\n2. The kind of topology involved. This is where Vitrage can provide additional value over the existing solution with Aodh. In Rocky, it will be a trivial topology: if there is an alarm on an instance, execute a self-healing workflow. But in phase 2, we would like support a network failure use case as well, and for that we need a more complex Vitrage template. This has to be specified explicitly and cannot be determined by the existing properties.\n\nMy feeling is that for now we should drop the type property and support the single use case. In the next phase we can decide what property is missing and keep the existing behaviour (with no property) as default.",
"parentUuid": "5f7c97a3_7b8d4ad2",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_e17731d1",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 84,
"author": {
"id": 12404
},
"writtenOn": "2018-07-11T06:48:42Z",
"side": 1,
"message": "Thx for the information. As long as that works for Vitrage ops and develop(which \n I think you speak for both) we can drop that property.",
"parentUuid": "5f7c97a3_0ea86dd6",
"range": {
"startLine": 84,
"startChar": 10,
"endLine": 84,
"endChar": 46
},
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_0e84685c",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 128,
"author": {
"id": 12404
},
"writtenOn": "2018-07-03T14:58:59Z",
"side": 1,
"message": "We also need a Vitrage client plugin in heat\nlike https://github.com/openstack/heat/commit/d0787393ce1ba073a317c3dccff8251068a707ac#diff-61f981252762ef354a4398789b86e830",
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_f13463ae",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 128,
"author": {
"id": 19159
},
"writtenOn": "2018-07-04T07:31:04Z",
"side": 1,
"message": "Sure, I\u0027ll add it",
"parentUuid": "5f7c97a3_0e84685c",
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
},
{
"key": {
"uuid": "5f7c97a3_0a52c212",
"filename": "specs/rocky/vitrage-resources.rst",
"patchSetId": 1
},
"lineNbr": 128,
"author": {
"id": 19159
},
"writtenOn": "2018-07-08T13:45:53Z",
"side": 1,
"message": "Done",
"parentUuid": "5f7c97a3_f13463ae",
"revId": "7888aecf10cf6a2d0f76d0f8532e6b49114ad4ff",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
"unresolved": false
}
]
}