)]}'
{"tacker/vm/infra_drivers/heat/heat.py":[{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"19fc8e76b312b119b2ec2936971308e67c6f2c54","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        if \u0027stack_name\u0027 not in fields:"},{"line_number":400,"context_line":"            name \u003d device[\u0027name\u0027]"},{"line_number":401,"context_line":"            if device[\u0027attributes\u0027].get(\u0027failure_count\u0027):"},{"line_number":402,"context_line":"                name +\u003d (\u0027-RESPAWN-%s\u0027) % str(device[\u0027attributes\u0027]["},{"line_number":403,"context_line":"                    \u0027failure_count\u0027])"},{"line_number":404,"context_line":"            fields[\u0027stack_name\u0027] \u003d name"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # service context is ignored"},{"line_number":407,"context_line":"        LOG.debug(_(\u0027service_context: %s\u0027), device.get(\u0027service_context\u0027, []))"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a9d85d2_d43492fc","line":404,"range":{"start_line":401,"start_character":12,"end_line":404,"end_character":39},"updated":"2016-06-21 05:49:20.000000000","message":"In case of device[\u0027name\u0027] with max length(i.e. 255) and failure, we append more string in name which makes fields[\u0027stack_name\u0027] size beyond the limit(255).\n\nhttps://github.com/openstack/heat/blob/master/heat/db/sqlalchemy/models.py#L163\n\nI think we should have unit tests to catch those cases in future.","commit_id":"ebe38b32fd457398ac9e5cdea2666938b3ddf833"},{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"793841511256569aa6e75bc47d7306bffa74f96f","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        if \u0027stack_name\u0027 not in fields:"},{"line_number":400,"context_line":"            name \u003d device[\u0027name\u0027]"},{"line_number":401,"context_line":"            if device[\u0027attributes\u0027].get(\u0027failure_count\u0027):"},{"line_number":402,"context_line":"                name +\u003d (\u0027-RESPAWN-%s\u0027) % str(device[\u0027attributes\u0027]["},{"line_number":403,"context_line":"                    \u0027failure_count\u0027])"},{"line_number":404,"context_line":"            fields[\u0027stack_name\u0027] \u003d name"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # service context is ignored"},{"line_number":407,"context_line":"        LOG.debug(_(\u0027service_context: %s\u0027), device.get(\u0027service_context\u0027, []))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_763cd293","line":404,"range":{"start_line":401,"start_character":12,"end_line":404,"end_character":39},"in_reply_to":"3aaa91ec_3bcee383","updated":"2016-06-22 11:31:38.000000000","message":"As per database [1], length of vnf-name can be upto 255.\n(Which is also be going to fixed as [2])\n\nSo in that case if vnf-name length is 255 then length of \u003cvnf-name-\u003e-RESPAWN-1 will go beyond 255, and will cause issue in heat as they also have the db field for stack_name 255 char.\n\n\n\n[1]: https://github.com/openstack/tacker/blob/master/tacker/db/vm/vm_db.py#L49\n\n[2]: https://bugs.launchpad.net/tacker/+bug/1594626","commit_id":"ebe38b32fd457398ac9e5cdea2666938b3ddf833"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"db78048874a5c73672a4668088e851dd1dd76730","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        if \u0027stack_name\u0027 not in fields:"},{"line_number":400,"context_line":"            name \u003d device[\u0027name\u0027]"},{"line_number":401,"context_line":"            if device[\u0027attributes\u0027].get(\u0027failure_count\u0027):"},{"line_number":402,"context_line":"                name +\u003d (\u0027-RESPAWN-%s\u0027) % str(device[\u0027attributes\u0027]["},{"line_number":403,"context_line":"                    \u0027failure_count\u0027])"},{"line_number":404,"context_line":"            fields[\u0027stack_name\u0027] \u003d name"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # service context is ignored"},{"line_number":407,"context_line":"        LOG.debug(_(\u0027service_context: %s\u0027), device.get(\u0027service_context\u0027, []))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_d8f630f8","line":404,"range":{"start_line":401,"start_character":12,"end_line":404,"end_character":39},"in_reply_to":"3aaa91ec_763cd293","updated":"2016-06-23 21:50:12.000000000","message":"thanks for bringing it. this edge case has been there. . it is not specifically related to the change that is being made in the patch. in fact with this new change, the 255 limit edge case probability is further reduced since stack names will now NOT have the lengthy class path uuid based names. \n\nto address this edge case, \nwe could probably check the stack name length before attaching the -\"RESPAWN-\u003cno.\u003e\"  and if it exceeds, prune it to 255- (\"RESPAWN-\u003cno.\u003e\") length and then attach the string. What do you think?","commit_id":"ebe38b32fd457398ac9e5cdea2666938b3ddf833"},{"author":{"_account_id":18955,"name":"dharmendra","email":"dharmendra.kushwaha@gmail.com","username":"dharmendra"},"change_message_id":"7b49bc3761fb09dce007523fa691094e1d819b76","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        if \u0027stack_name\u0027 not in fields:"},{"line_number":400,"context_line":"            name \u003d device[\u0027name\u0027]"},{"line_number":401,"context_line":"            if device[\u0027attributes\u0027].get(\u0027failure_count\u0027):"},{"line_number":402,"context_line":"                name +\u003d (\u0027-RESPAWN-%s\u0027) % str(device[\u0027attributes\u0027]["},{"line_number":403,"context_line":"                    \u0027failure_count\u0027])"},{"line_number":404,"context_line":"            fields[\u0027stack_name\u0027] \u003d name"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # service context is ignored"},{"line_number":407,"context_line":"        LOG.debug(_(\u0027service_context: %s\u0027), device.get(\u0027service_context\u0027, []))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_fa1f9c05","line":404,"range":{"start_line":401,"start_character":12,"end_line":404,"end_character":39},"in_reply_to":"3aaa91ec_d8f630f8","updated":"2016-06-24 01:34:22.000000000","message":"I think, it should be fine. \n\nAlthough in my opinion:\n1: Isn\u0027t good if we use a fix length hash value of name instead of name directly?\nEx: fields[\u0027stack_name\u0027] \u003d \u003c32B hash value of vnf name\u003e_RESPAWN_\u003cno.\u003e\n\nOr\n\n2: Can we not use device[\u0027id\u0027] only instead of adding class and file name?(Please correct me, as I think I am missing something about the background of this bug).","commit_id":"ebe38b32fd457398ac9e5cdea2666938b3ddf833"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"a3bd03c4febc97fc2fa15ccb8752a2bda5bfe5c8","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        if \u0027stack_name\u0027 not in fields:"},{"line_number":400,"context_line":"            name \u003d device[\u0027name\u0027]"},{"line_number":401,"context_line":"            if device[\u0027attributes\u0027].get(\u0027failure_count\u0027):"},{"line_number":402,"context_line":"                name +\u003d (\u0027-RESPAWN-%s\u0027) % str(device[\u0027attributes\u0027]["},{"line_number":403,"context_line":"                    \u0027failure_count\u0027])"},{"line_number":404,"context_line":"            fields[\u0027stack_name\u0027] \u003d name"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # service context is ignored"},{"line_number":407,"context_line":"        LOG.debug(_(\u0027service_context: %s\u0027), device.get(\u0027service_context\u0027, []))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_69b2c995","line":404,"range":{"start_line":401,"start_character":12,"end_line":404,"end_character":39},"in_reply_to":"3aaa91ec_e9d4f920","updated":"2016-06-24 04:20:06.000000000","message":"RESPAWN_\u003cno\u003e is the way we identify a new stack has been created for an existing VNF. Not sure why we need to get rid of respawn in stack names.","commit_id":"ebe38b32fd457398ac9e5cdea2666938b3ddf833"},{"author":{"_account_id":10487,"name":"Kanagaraj Manickam","email":"mkr1481@gmail.com","username":"kanagarajm"},"change_message_id":"e323c01e9af81455b4c529bb94b20e708430d755","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        if \u0027stack_name\u0027 not in fields:"},{"line_number":400,"context_line":"            name \u003d device[\u0027name\u0027]"},{"line_number":401,"context_line":"            if device[\u0027attributes\u0027].get(\u0027failure_count\u0027):"},{"line_number":402,"context_line":"                name +\u003d (\u0027-RESPAWN-%s\u0027) % str(device[\u0027attributes\u0027]["},{"line_number":403,"context_line":"                    \u0027failure_count\u0027])"},{"line_number":404,"context_line":"            fields[\u0027stack_name\u0027] \u003d name"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # service context is ignored"},{"line_number":407,"context_line":"        LOG.debug(_(\u0027service_context: %s\u0027), device.get(\u0027service_context\u0027, []))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_e9d4f920","line":404,"range":{"start_line":401,"start_character":12,"end_line":404,"end_character":39},"in_reply_to":"3aaa91ec_fa1f9c05","updated":"2016-06-24 03:58:14.000000000","message":"please get rid of using the RESPAWN in stack names if possible, instead use the logic metioned in the other comment.","commit_id":"ebe38b32fd457398ac9e5cdea2666938b3ddf833"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"a3bd03c4febc97fc2fa15ccb8752a2bda5bfe5c8","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        if \u0027stack_name\u0027 not in fields:"},{"line_number":400,"context_line":"            name \u003d device[\u0027name\u0027]"},{"line_number":401,"context_line":"            if device[\u0027attributes\u0027].get(\u0027failure_count\u0027):"},{"line_number":402,"context_line":"                name +\u003d (\u0027-RESPAWN-%s\u0027) % str(device[\u0027attributes\u0027]["},{"line_number":403,"context_line":"                    \u0027failure_count\u0027])"},{"line_number":404,"context_line":"            fields[\u0027stack_name\u0027] \u003d name"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # service context is ignored"},{"line_number":407,"context_line":"        LOG.debug(_(\u0027service_context: %s\u0027), device.get(\u0027service_context\u0027, []))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_49da6de9","line":404,"range":{"start_line":401,"start_character":12,"end_line":404,"end_character":39},"in_reply_to":"3aaa91ec_fa1f9c05","updated":"2016-06-24 04:20:06.000000000","message":"the main reason behind using vnf names as stack names is to \"identify\" stacks and vdus associated with a vnf which could not be done previously. if we use id or hash algos we are only making the identification harder.","commit_id":"ebe38b32fd457398ac9e5cdea2666938b3ddf833"},{"author":{"_account_id":13485,"name":"Sripriya Seetharam","email":"sseetha@brocade.com","username":"Sripriya"},"change_message_id":"8c7d682670d110490443b0b332191eac726f8c52","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        if \u0027stack_name\u0027 not in fields:"},{"line_number":400,"context_line":"            name \u003d device[\u0027name\u0027]"},{"line_number":401,"context_line":"            if device[\u0027attributes\u0027].get(\u0027failure_count\u0027):"},{"line_number":402,"context_line":"                name +\u003d (\u0027-RESPAWN-%s\u0027) % str(device[\u0027attributes\u0027]["},{"line_number":403,"context_line":"                    \u0027failure_count\u0027])"},{"line_number":404,"context_line":"            fields[\u0027stack_name\u0027] \u003d name"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # service context is ignored"},{"line_number":407,"context_line":"        LOG.debug(_(\u0027service_context: %s\u0027), device.get(\u0027service_context\u0027, []))"}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_3bcee383","line":404,"range":{"start_line":401,"start_character":12,"end_line":404,"end_character":39},"in_reply_to":"5a9d85d2_d43492fc","updated":"2016-06-21 17:44:06.000000000","message":"no name will not go beyond 255 limit. it will always take the name from device name property (which is never modified) and then append a number to it for stack_name. so for each failure, name would be :\n\u003cvnf-name-\u003e-RESPAWN-1\n\n\u003cvnf-name\u003e-RESPAWN-2\n\nvnf-name\u003e--RESPAWN-3  and so on..","commit_id":"ebe38b32fd457398ac9e5cdea2666938b3ddf833"}],"tacker/vm/plugin.py":[{"author":{"_account_id":10487,"name":"Kanagaraj Manickam","email":"mkr1481@gmail.com","username":"kanagarajm"},"change_message_id":"e323c01e9af81455b4c529bb94b20e708430d755","unresolved":false,"context_lines":[{"line_number":253,"context_line":"    def _create_device(self, context, device, vim_auth):"},{"line_number":254,"context_line":"        def _validate_vnf_name(name):"},{"line_number":255,"context_line":"            try:"},{"line_number":256,"context_line":"                if not re.match(\"[a-zA-Z][a-zA-Z0-9_.-]{0,254}$\", name):"},{"line_number":257,"context_line":"                    message \u003d _(\"VNF name \u0027%(name)s\u0027 must contain only \""},{"line_number":258,"context_line":"                                \"alphanumeric or \\\"_-.\\\" characters, \""},{"line_number":259,"context_line":"                                \"must start with alpha and must be 255 \""}],"source_content_type":"text/x-python","patch_set":3,"id":"3aaa91ec_09122509","line":256,"updated":"2016-06-24 03:58:14.000000000","message":"IMO, let us not repeat the logic of stack naming here and it will break when heat changes the constraints on the name.\n\ninstead, let us free the user to give any sort of names for vnf and while naming the stack in heat, we could name like \n\ntacker-\u003cuuid\u003e and what ever the addition details we want to associate with stack in heat, please use stack tags. And on tacker as we knew, we could add the required attributes of stack in the device[\u0027attributes\u0027].","commit_id":"ebe38b32fd457398ac9e5cdea2666938b3ddf833"}]}
