)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"15221469a4b13ffa89aee7474121637f4ff6059e","unresolved":false,"context_lines":[{"line_number":11,"context_line":""},{"line_number":12,"context_line":"APIImpact"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Previously-approved: newton"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I2f3e0f5a6ec72f77226483a533b738a1d7c4639d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a629dbe_d6085e30","line":14,"updated":"2016-11-14 14:54:36.000000000","message":"This spec is very different from what was approved before:\nhttp://specs.openstack.org/openstack/nova-specs/specs/newton/approved/console-log-offset.html\n\nPlease remove this tag, or restore the original version.","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"}],"specs/ocata/approved/console-log-offset.rst":[{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"63a61bf6e940f7933bc435f2841af06fe296749f","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When user triggers console-log command it gets all logs from the end."},{"line_number":21,"context_line":"It might be not useful to get all log content when you observe your system"},{"line_number":22,"context_line":"activity and want to see logs about event that happened in the past. Scrolling"},{"line_number":23,"context_line":"thousands of lines might be annoying."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_20877cb6","line":22,"range":{"start_line":21,"start_character":55,"end_line":22,"end_character":8},"updated":"2016-10-28 07:47:04.000000000","message":"Observing the activity inside an instance seems to be the real problem you want to solve with this spec. I\u0027m not sure if this is properly done with querying the \"console.log\" file. Assumed this spec is implemented with the suggested proposal of an offset, how would that be used? Will it be a periodic API call to \"getConsole\" (with an offset) which emulates a stream? In pseudo-code:\n\n    while true:\n        activity \u003d novaclient.get_console(instance)\n        print(activity)\n        time.sleep(2)\n\nIn other words, it would be great if you could go more into detail what the current problem is and what the workflow looks like you want to support with this spec.","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"4278bb9398021ac8bbb0ca0204a8e370a2dcf024","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When user triggers console-log command it gets all logs from the end."},{"line_number":21,"context_line":"It might be not useful to get all log content when you observe your system"},{"line_number":22,"context_line":"activity and want to see logs about event that happened in the past. Scrolling"},{"line_number":23,"context_line":"thousands of lines might be annoying."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_d2b04b8e","line":22,"range":{"start_line":21,"start_character":55,"end_line":22,"end_character":8},"in_reply_to":"ba5da102_20877cb6","updated":"2016-10-28 12:29:16.000000000","message":"I\u0027m not sure there it is useful to implement such log streaming, you can use VNC, serial or another type of console instead, but of course you need a tools parse this data(at least browser). But this seems interesting to me implement something like tail -f with instance console logs, but I think this is out of scope of my spec.","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"2b3748447cc5fc9d4a55645a7101c84d6f296c9b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When user triggers console-log command it gets all logs from the end."},{"line_number":21,"context_line":"It might be not useful to get all log content when you observe your system"},{"line_number":22,"context_line":"activity and want to see logs about event that happened in the past. Scrolling"},{"line_number":23,"context_line":"thousands of lines might be annoying."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_e3182487","line":22,"range":{"start_line":21,"start_character":55,"end_line":22,"end_character":8},"in_reply_to":"ba5da102_d2b04b8e","updated":"2016-10-28 13:34:33.000000000","message":"TIL this will be a replacement for the existing readConsole(N lines). Maybe add that to this spec for clarification.","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"2b27c7b91e613465854bfcb87d537fb89cb5c83b","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When user triggers console-log command it gets all logs from the end."},{"line_number":21,"context_line":"It might be not useful to get all log content when you observe your system"},{"line_number":22,"context_line":"activity and want to see logs about event that happened in the past. Scrolling"},{"line_number":23,"context_line":"thousands of lines might be annoying."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_6fe592da","line":22,"range":{"start_line":21,"start_character":55,"end_line":22,"end_character":8},"in_reply_to":"ba5da102_e3182487","updated":"2016-11-01 14:44:23.000000000","message":"Ok, so currently idea is to replace and line api with byte api, where client requests for amount of bytes and for particular offset.","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"63a61bf6e940f7933bc435f2841af06fe296749f","unresolved":false,"context_lines":[{"line_number":30,"context_line":"Proposed change"},{"line_number":31,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Additional optional parameter offset should be added to handle the problem"},{"line_number":34,"context_line":"when operator want to show part of log."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_c0440076","line":33,"range":{"start_line":33,"start_character":20,"end_line":33,"end_character":36},"updated":"2016-10-28 07:47:04.000000000","message":"Assumed we have \"offset\u003d5\", does this mean:\n* 5 lines?\n* 5 chars?\n* 5 bytes?\n\nAnd just to double-check, we\u0027re talking about an offset from the start of the \"console.log\" file?","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"4278bb9398021ac8bbb0ca0204a8e370a2dcf024","unresolved":false,"context_lines":[{"line_number":30,"context_line":"Proposed change"},{"line_number":31,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Additional optional parameter offset should be added to handle the problem"},{"line_number":34,"context_line":"when operator want to show part of log."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_321ee7ba","line":33,"range":{"start_line":33,"start_character":20,"end_line":33,"end_character":36},"in_reply_to":"ba5da102_c0440076","updated":"2016-10-28 12:29:16.000000000","message":"I\u0027ve assumed offset in lines from the last line appended to console.log, of course it needs more work because in case of log rotation if offset is big enough we have to extract data from rotated files console.log.1,2 etc.","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"79a5583dbad0e3cdbdede9c72086342784b3a509","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Additional optional parameter offset should be added to handle the problem"},{"line_number":34,"context_line":"when operator want to show part of log."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Alternatives"},{"line_number":37,"context_line":"------------"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_e374a49d","line":35,"updated":"2016-10-28 13:05:57.000000000","message":"IMHO it is really unfortunate that the current length limiting is done in lines and not bytes, because it makes the nova hypervisor impl very inefficient - you have to scan the file contents looking for newlines. Adding in offset in lines, instead of bytes, makes this inefficiency even worse for large log files. If we were byte based, we can extract the right region of the file instantly.\n\nI\u0027d suggest that we deprecate/discourage usage of \"lines\" and add \"offset\" and \"length\" parameters both measured in bytes.","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"2b27c7b91e613465854bfcb87d537fb89cb5c83b","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Additional optional parameter offset should be added to handle the problem"},{"line_number":34,"context_line":"when operator want to show part of log."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Alternatives"},{"line_number":37,"context_line":"------------"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_af416aab","line":35,"in_reply_to":"ba5da102_438710d7","updated":"2016-11-01 14:44:23.000000000","message":"Yeah, that is it.","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"9fee28ba6f8aa44aa565f97cad43c58a1cb91e57","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Additional optional parameter offset should be added to handle the problem"},{"line_number":34,"context_line":"when operator want to show part of log."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Alternatives"},{"line_number":37,"context_line":"------------"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_438710d7","line":35,"in_reply_to":"ba5da102_c368808a","updated":"2016-10-28 13:22:09.000000000","message":"If you want to enable a \"tail -f\" like tool to be built on top of this, then I think usage of bytes is fundamental otherwise it\u0027d be dos\u0027ing nova by forcing it to parse the entire config file every time it queries to look for further data.","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"501a0043dcaf4170b774cceda34b40a9e6700085","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"Additional optional parameter offset should be added to handle the problem"},{"line_number":34,"context_line":"when operator want to show part of log."},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"Alternatives"},{"line_number":37,"context_line":"------------"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_c368808a","line":35,"in_reply_to":"ba5da102_e374a49d","updated":"2016-10-28 13:10:56.000000000","message":"Yes, but I think this is not convenient from operator point of view, it is hard to remember how many bytes you have to skip to get right position. Also logs are essentially line oriented, instead of bytes.","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"63a61bf6e940f7933bc435f2841af06fe296749f","unresolved":false,"context_lines":[{"line_number":92,"context_line":"python nova client will be updated with new optional parameter"},{"line_number":93,"context_line":"to console-logs command. New command will looks like:"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"nova console-logs \u003cinstanced-id\u003e --length 10 --offset 100"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Performance Impact"},{"line_number":98,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_9b043916","line":95,"range":{"start_line":95,"start_character":33,"end_line":95,"end_character":57},"updated":"2016-10-28 07:47:04.000000000","message":"Assumed \"offset 100\" means 100 lines, and the \"console.log\" file has 80 lines, what will be returned? \n* 0 lines? (because the offset is bigger than the file)\n* 10 lines (because we said we want exactly 10 lines)","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"4278bb9398021ac8bbb0ca0204a8e370a2dcf024","unresolved":false,"context_lines":[{"line_number":92,"context_line":"python nova client will be updated with new optional parameter"},{"line_number":93,"context_line":"to console-logs command. New command will looks like:"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"nova console-logs \u003cinstanced-id\u003e --length 10 --offset 100"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"Performance Impact"},{"line_number":98,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba5da102_72ccdf35","line":95,"range":{"start_line":95,"start_character":33,"end_line":95,"end_character":57},"in_reply_to":"ba5da102_9b043916","updated":"2016-10-28 12:29:16.000000000","message":"I thought about that, I\u0027ve been writing this spec before virtlod is merged, I think I need a little bit more time to think about that.","commit_id":"f664efad2fe54691a03bde416aba176a30988f08"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"8fc57b85db24c8d49ef4c181f1db59dafd9d6689","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When user triggers console-log command it gets all logs from the end."},{"line_number":21,"context_line":"It might be not useful to get all log content when you observe your system"},{"line_number":22,"context_line":"activity and want to see logs about event that happened in the past. Scrolling"},{"line_number":23,"context_line":"thousands of lines might be annoying."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_97f0dbca","line":23,"range":{"start_line":22,"start_character":69,"end_line":23,"end_character":37},"updated":"2016-11-11 18:00:53.000000000","message":"IIRC jaypipes said at the summit that dealing with huge log files can also be a security risk? *That* would be a good problem description which convinces me that someone should spend resources/time/effort on solving that issue. I mean, AFAIK operators deal each day with thousands of lines of logs and have their tooling/knowledge how to deal with that.","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"c271d99f26a7e179bd91f160fcd1bfb842705c0b","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When user triggers console-log command it gets all logs from the end."},{"line_number":21,"context_line":"It might be not useful to get all log content when you observe your system"},{"line_number":22,"context_line":"activity and want to see logs about event that happened in the past. Scrolling"},{"line_number":23,"context_line":"thousands of lines might be annoying."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_880b1f7d","line":23,"range":{"start_line":22,"start_character":69,"end_line":23,"end_character":37},"in_reply_to":"9a629dbe_1655761c","updated":"2016-11-14 17:15:24.000000000","message":"Thanks, this is good point and I we shouldn\u0027t consider the case with rotation -  it will make the problem a bit easier.","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"15221469a4b13ffa89aee7474121637f4ff6059e","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When user triggers console-log command it gets all logs from the end."},{"line_number":21,"context_line":"It might be not useful to get all log content when you observe your system"},{"line_number":22,"context_line":"activity and want to see logs about event that happened in the past. Scrolling"},{"line_number":23,"context_line":"thousands of lines might be annoying."},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"Use Cases"},{"line_number":26,"context_line":"---------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_1655761c","line":23,"range":{"start_line":22,"start_character":69,"end_line":23,"end_character":37},"in_reply_to":"9a629dbe_97f0dbca","updated":"2016-11-14 14:54:36.000000000","message":"Its the bit about log rotation that confuses me.\n\nI don\u0027t think Nova intents to ever return things that have been rotated. We can only ever return part of what we are currently storing.\n\nthere is no way to go back to the beginning.","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"8fc57b85db24c8d49ef4c181f1db59dafd9d6689","unresolved":false,"context_lines":[{"line_number":48,"context_line":"---------------"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"The proposal will add two new optional parameters \u0027offset and \u0027origin\u0027 for"},{"line_number":51,"context_line":"request and change API from lines to bytes. As far as file content can be"},{"line_number":52,"context_line":"changed between two related requests for logs to nova-api we have to introduce"},{"line_number":53,"context_line":"new argument origin to have an ability to request data both from the end,"},{"line_number":54,"context_line":"begin and middle of the log file. Two new fields will be added to response"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_5428019a","line":51,"range":{"start_line":51,"start_character":12,"end_line":51,"end_character":42},"updated":"2016-11-11 18:00:53.000000000","message":"I\u0027m no API expert; can we simply drop a parameter from an API request when we bump the microversion? There\u0027s no deprecation cycle or something like that?","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"15221469a4b13ffa89aee7474121637f4ff6059e","unresolved":false,"context_lines":[{"line_number":48,"context_line":"---------------"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"The proposal will add two new optional parameters \u0027offset and \u0027origin\u0027 for"},{"line_number":51,"context_line":"request and change API from lines to bytes. As far as file content can be"},{"line_number":52,"context_line":"changed between two related requests for logs to nova-api we have to introduce"},{"line_number":53,"context_line":"new argument origin to have an ability to request data both from the end,"},{"line_number":54,"context_line":"begin and middle of the log file. Two new fields will be added to response"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_96ec2691","line":51,"range":{"start_line":51,"start_character":12,"end_line":51,"end_character":42},"in_reply_to":"9a629dbe_5428019a","updated":"2016-11-14 14:54:36.000000000","message":"Thats totally allowed with microversions, because the old behaviour must still be implemented for the older versions.","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"8fc57b85db24c8d49ef4c181f1db59dafd9d6689","unresolved":false,"context_lines":[{"line_number":51,"context_line":"request and change API from lines to bytes. As far as file content can be"},{"line_number":52,"context_line":"changed between two related requests for logs to nova-api we have to introduce"},{"line_number":53,"context_line":"new argument origin to have an ability to request data both from the end,"},{"line_number":54,"context_line":"begin and middle of the log file. Two new fields will be added to response"},{"line_number":55,"context_line":"\u0027position\u0027 - position in the file since begin and \u0027inode\u0027 - hash of current"},{"line_number":56,"context_line":"file inode number will allow to track if rotation happens between related"},{"line_number":57,"context_line":"requests. This change will need bump in API microversion. In case of empty"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_f7ee7720","line":54,"range":{"start_line":54,"start_character":10,"end_line":54,"end_character":32},"updated":"2016-11-11 18:00:53.000000000","message":"When we start from the middle of a log file, do we still apply an offset before we read? When we start reading, in which direction do we read (to the start of the file or to the end of the file)?","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"c271d99f26a7e179bd91f160fcd1bfb842705c0b","unresolved":false,"context_lines":[{"line_number":51,"context_line":"request and change API from lines to bytes. As far as file content can be"},{"line_number":52,"context_line":"changed between two related requests for logs to nova-api we have to introduce"},{"line_number":53,"context_line":"new argument origin to have an ability to request data both from the end,"},{"line_number":54,"context_line":"begin and middle of the log file. Two new fields will be added to response"},{"line_number":55,"context_line":"\u0027position\u0027 - position in the file since begin and \u0027inode\u0027 - hash of current"},{"line_number":56,"context_line":"file inode number will allow to track if rotation happens between related"},{"line_number":57,"context_line":"requests. This change will need bump in API microversion. In case of empty"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_bcd90486","line":54,"range":{"start_line":54,"start_character":10,"end_line":54,"end_character":32},"in_reply_to":"9a629dbe_f7ee7720","updated":"2016-11-14 17:15:24.000000000","message":"When origin is begin - offset means offset from the beginning of the file. We always read from begin to head. So if we want to read new 10 bytes in second request we should have offset \u003d last_byte_read(from the beginning) - 10","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"8fc57b85db24c8d49ef4c181f1db59dafd9d6689","unresolved":false,"context_lines":[{"line_number":72,"context_line":"         \"os-getConsoleOutput\": {"},{"line_number":73,"context_line":"            \"length\": 2,"},{"line_number":74,"context_line":"            \"offset\": 10,"},{"line_number":75,"context_line":"            \"origin\": 1"},{"line_number":76,"context_line":"          }"},{"line_number":77,"context_line":"      }"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_17984b69","line":75,"range":{"start_line":75,"start_character":13,"end_line":75,"end_character":19},"updated":"2016-11-11 18:00:53.000000000","message":"Could you explain \"origin\" a little more please? Is this an enum value? Example:\n* 1 \u003d start from file\n* 2 \u003d middle of file\n* 3 \u003d end of file\n\nOr is this the position (calculated in bytes from start/end)?\n\nOr something else?","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"c271d99f26a7e179bd91f160fcd1bfb842705c0b","unresolved":false,"context_lines":[{"line_number":72,"context_line":"         \"os-getConsoleOutput\": {"},{"line_number":73,"context_line":"            \"length\": 2,"},{"line_number":74,"context_line":"            \"offset\": 10,"},{"line_number":75,"context_line":"            \"origin\": 1"},{"line_number":76,"context_line":"          }"},{"line_number":77,"context_line":"      }"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_dcbdd803","line":75,"range":{"start_line":75,"start_character":13,"end_line":75,"end_character":19},"in_reply_to":"9a629dbe_17984b69","updated":"2016-11-14 17:15:24.000000000","message":"Yeah, origin is just an enum value.","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"8fc57b85db24c8d49ef4c181f1db59dafd9d6689","unresolved":false,"context_lines":[{"line_number":79,"context_line":"   Response:"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"      {"},{"line_number":82,"context_line":"         \"output\": \"ANOTHER\\nLAST LINE\","},{"line_number":83,"context_line":"         \"position\": \"422\","},{"line_number":84,"context_line":"         \"inode\": \"abcde\""},{"line_number":85,"context_line":"      }"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_17af6b7d","line":82,"range":{"start_line":82,"start_character":20,"end_line":82,"end_character":38},"updated":"2016-11-11 18:00:53.000000000","message":"That response doesn\u0027t fit anymore to the example request (which changes \"lines\" to \"length\").","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"c271d99f26a7e179bd91f160fcd1bfb842705c0b","unresolved":false,"context_lines":[{"line_number":79,"context_line":"   Response:"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"      {"},{"line_number":82,"context_line":"         \"output\": \"ANOTHER\\nLAST LINE\","},{"line_number":83,"context_line":"         \"position\": \"422\","},{"line_number":84,"context_line":"         \"inode\": \"abcde\""},{"line_number":85,"context_line":"      }"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_dce4f8ad","line":82,"range":{"start_line":82,"start_character":20,"end_line":82,"end_character":38},"in_reply_to":"9a629dbe_17af6b7d","updated":"2016-11-14 17:15:24.000000000","message":"Yeah, I need to change from \"example\" to b\"example\"","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"8fc57b85db24c8d49ef4c181f1db59dafd9d6689","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"      {"},{"line_number":82,"context_line":"         \"output\": \"ANOTHER\\nLAST LINE\","},{"line_number":83,"context_line":"         \"position\": \"422\","},{"line_number":84,"context_line":"         \"inode\": \"abcde\""},{"line_number":85,"context_line":"      }"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_2a596635","line":83,"range":{"start_line":83,"start_character":10,"end_line":83,"end_character":18},"updated":"2016-11-11 18:00:53.000000000","message":"Is a client supposed to use this position in another request for the parameter \"origin\"? IOW, I don\u0027t understand what a client does with that value. \nAlso, is it really a string or maybe an int?","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"c271d99f26a7e179bd91f160fcd1bfb842705c0b","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"      {"},{"line_number":82,"context_line":"         \"output\": \"ANOTHER\\nLAST LINE\","},{"line_number":83,"context_line":"         \"position\": \"422\","},{"line_number":84,"context_line":"         \"inode\": \"abcde\""},{"line_number":85,"context_line":"      }"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_9f127257","line":83,"range":{"start_line":83,"start_character":10,"end_line":83,"end_character":18},"in_reply_to":"9a629dbe_2a596635","updated":"2016-11-14 17:15:24.000000000","message":"Thanks, this is really an integer. Position is last byte read from the beginning of the file. It helps to determine from where to read even though append has been occured.","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"8fc57b85db24c8d49ef4c181f1db59dafd9d6689","unresolved":false,"context_lines":[{"line_number":81,"context_line":"      {"},{"line_number":82,"context_line":"         \"output\": \"ANOTHER\\nLAST LINE\","},{"line_number":83,"context_line":"         \"position\": \"422\","},{"line_number":84,"context_line":"         \"inode\": \"abcde\""},{"line_number":85,"context_line":"      }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_57572357","line":84,"range":{"start_line":84,"start_character":19,"end_line":84,"end_character":24},"updated":"2016-11-11 18:00:53.000000000","message":"I assume you want this use in a client to detect if a change happened since the last \"osGetConsoleOutput\" action? For a client, this can only used in a boolean way, right? Example pseudocode:\n\n    last_hash \u003d \"\"\n    for i in range(5):\n        hash \u003d response.get(\"inode\")\n        if last_hash and last_hash !\u003d hash:\n            print(\"a change happened\")\n            # do what?\n        last_hash \u003d hash","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"c271d99f26a7e179bd91f160fcd1bfb842705c0b","unresolved":false,"context_lines":[{"line_number":81,"context_line":"      {"},{"line_number":82,"context_line":"         \"output\": \"ANOTHER\\nLAST LINE\","},{"line_number":83,"context_line":"         \"position\": \"422\","},{"line_number":84,"context_line":"         \"inode\": \"abcde\""},{"line_number":85,"context_line":"      }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_5fc9baab","line":84,"range":{"start_line":84,"start_character":19,"end_line":84,"end_character":24},"in_reply_to":"9a629dbe_57572357","updated":"2016-11-14 17:15:24.000000000","message":"Yep, Client compares last inode hash with current to detech rotation.","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"15221469a4b13ffa89aee7474121637f4ff6059e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"         \"inode\": \"abcde\""},{"line_number":85,"context_line":"      }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"Security impact"},{"line_number":89,"context_line":"---------------"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_995b772e","line":87,"updated":"2016-11-14 14:54:36.000000000","message":"I don\u0027t understand these additions from the originally approved spec:\nhttp://specs.openstack.org/openstack/nova-specs/specs/newton/approved/console-log-offset.html\n\nYou need to describe what they mean, and give use cases for why they are important.\n\nAs Nova is only storing a small number of the most recent lines / characters, I don\u0027t think these use cases are valid, but its hard to review that without seeing them made explicit.","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":12712,"name":"Gleb Stepanov","email":"gstepanov@mirantis.com","username":"stgleb"},"change_message_id":"c271d99f26a7e179bd91f160fcd1bfb842705c0b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"         \"inode\": \"abcde\""},{"line_number":85,"context_line":"      }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"Security impact"},{"line_number":89,"context_line":"---------------"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_7f5cbeed","line":87,"in_reply_to":"9a629dbe_995b772e","updated":"2016-11-14 17:15:24.000000000","message":"Alright, this is  because on summit we\u0027ve concluded to change API from lines as it was before to bytes for the sake of performance.","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":11303,"name":"Markus Zoeller (markus_z)","email":"mzoeller@linux.vnet.ibm.com","username":"mzoeller"},"change_message_id":"8fc57b85db24c8d49ef4c181f1db59dafd9d6689","unresolved":false,"context_lines":[{"line_number":101,"context_line":"python nova client will be updated with new optional parameter"},{"line_number":102,"context_line":"offset to console-logs command. New command will looks like:"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"nova console-logs \u003cinstanced-id\u003e --length 10 --offset 100"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"Performance Impact"},{"line_number":107,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":2,"id":"9a629dbe_34d38dd6","line":104,"range":{"start_line":104,"start_character":34,"end_line":104,"end_character":57},"updated":"2016-11-11 18:00:53.000000000","message":"copy/paste of my question in ps1:\n\nAssumed \"offset 100\" means 100 lines, and the \"console.log\" file has 80 lines, what will be returned? \n\n* 0 lines? (because the offset is bigger than the file)\n* 10 lines (because we said we want exactly 10 lines)","commit_id":"33193ccac389bd99eb70338abcccd290b5c42c3e"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"224034bc1babbf896aa8a6265d9a85bf35d3db00","unresolved":false,"context_lines":[{"line_number":11,"context_line":"https://blueprints.launchpad.net/nova/+spec/console-log-offset"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In order to observe console logs from specified position we need to add new"},{"line_number":14,"context_line":"optional argument to console logs command that allows to list logs from"},{"line_number":15,"context_line":"specified position."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_b025a1c3","line":14,"range":{"start_line":14,"start_character":47,"end_line":14,"end_character":71},"updated":"2016-11-15 15:43:54.000000000","message":"nit: tautology makes it sound a bit weird :)","commit_id":"2404ec22324be6c006bb5c32d20e89ef09d85e34"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"224034bc1babbf896aa8a6265d9a85bf35d3db00","unresolved":false,"context_lines":[{"line_number":27,"context_line":"Use Cases"},{"line_number":28,"context_line":"---------"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Operator wants to observe logs from specified offset."},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_8becf6c8","line":30,"range":{"start_line":30,"start_character":0,"end_line":30,"end_character":8},"updated":"2016-11-15 15:43:54.000000000","message":"nit: we allow reading VM console logs to arbitrary users, so it\u0027s not only operators","commit_id":"2404ec22324be6c006bb5c32d20e89ef09d85e34"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"224034bc1babbf896aa8a6265d9a85bf35d3db00","unresolved":false,"context_lines":[{"line_number":32,"context_line":"Proposed change"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Change console log api from lines to bytes, that allow to use it in os.seek"},{"line_number":36,"context_line":"manner. As soon as lines cannot be directly mapped to bytes, one request for"},{"line_number":37,"context_line":"logs might make several requests to API that need mechanism of preserving"},{"line_number":38,"context_line":"state between requests. For this purpose two new arguments will be added."}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_2b2be2ec","line":35,"range":{"start_line":35,"start_character":68,"end_line":35,"end_character":75},"updated":"2016-11-15 15:43:54.000000000","message":"nit: the rendered HTML looks better if you put function or parameter names into backticks, e.g.\n\n  ``os.seek()``","commit_id":"2404ec22324be6c006bb5c32d20e89ef09d85e34"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"224034bc1babbf896aa8a6265d9a85bf35d3db00","unresolved":false,"context_lines":[{"line_number":48,"context_line":"with inode parameter that presents hash of logfile inode number. Each"},{"line_number":49,"context_line":"following request will have optional field inode with hashcode of inode from"},{"line_number":50,"context_line":"previous response so we can simply check whether rotation has happens both on"},{"line_number":51,"context_line":"client side or server side."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Alternatives"},{"line_number":54,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_eb900a98","line":51,"range":{"start_line":51,"start_character":0,"end_line":51,"end_character":11},"updated":"2016-11-15 15:43:54.000000000","message":"IMO we should respond with 409 (Conflict) in this case and let the user make another series of HTTP requests to get the desired console log part.\n\nAh, I see, your point is that the value in response can be used in the same way, but on the client side. I think, we should just pick one of two ways and document the decision here.","commit_id":"2404ec22324be6c006bb5c32d20e89ef09d85e34"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"224034bc1babbf896aa8a6265d9a85bf35d3db00","unresolved":false,"context_lines":[{"line_number":90,"context_line":"         \"os-getConsoleOutput\": {"},{"line_number":91,"context_line":"            \"length\": 2,"},{"line_number":92,"context_line":"            \"offset\": 10,"},{"line_number":93,"context_line":"            \"origin\": 1"},{"line_number":94,"context_line":"          }"},{"line_number":95,"context_line":"      }"},{"line_number":96,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_2bee828b","line":93,"range":{"start_line":93,"start_character":13,"end_line":93,"end_character":19},"updated":"2016-11-15 15:43:54.000000000","message":"please document possible values of origin param here. Maybe use symbolic names instead of numeric values (\"BEGIN\", \"END\")?","commit_id":"2404ec22324be6c006bb5c32d20e89ef09d85e34"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"224034bc1babbf896aa8a6265d9a85bf35d3db00","unresolved":false,"context_lines":[{"line_number":99,"context_line":"      {"},{"line_number":100,"context_line":"         \"output\": b\"bytes read from the log file\","},{"line_number":101,"context_line":"         \"position\": 422,"},{"line_number":102,"context_line":"         \"inode\": \"abcde\""},{"line_number":103,"context_line":"      }"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_ab0c5243","line":102,"range":{"start_line":102,"start_character":10,"end_line":102,"end_character":15},"updated":"2016-11-15 15:43:54.000000000","message":"nit: I think using of inode values for detection of log rotation is an implementation detail. We could probably give it a different name (log_id? log_tag?)","commit_id":"2404ec22324be6c006bb5c32d20e89ef09d85e34"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"224034bc1babbf896aa8a6265d9a85bf35d3db00","unresolved":false,"context_lines":[{"line_number":117,"context_line":"---------------------"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"python nova client will be updated with new optional parameter"},{"line_number":120,"context_line":"offset to console-logs command. New command will looks like:"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"nova console-logs \u003cinstanced-id\u003e --length 10 --offset 100"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_4b681ef6","line":120,"range":{"start_line":120,"start_character":10,"end_line":120,"end_character":22},"updated":"2016-11-15 15:43:54.000000000","message":"nit: console-log","commit_id":"2404ec22324be6c006bb5c32d20e89ef09d85e34"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"224034bc1babbf896aa8a6265d9a85bf35d3db00","unresolved":false,"context_lines":[{"line_number":119,"context_line":"python nova client will be updated with new optional parameter"},{"line_number":120,"context_line":"offset to console-logs command. New command will looks like:"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"nova console-logs \u003cinstanced-id\u003e --length 10 --offset 100"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"Performance Impact"},{"line_number":125,"context_line":"------------------"}],"source_content_type":"text/x-rst","patch_set":3,"id":"7a77a97e_2ba122aa","line":122,"range":{"start_line":122,"start_character":5,"end_line":122,"end_character":17},"updated":"2016-11-15 15:43:54.000000000","message":"nit: console-log","commit_id":"2404ec22324be6c006bb5c32d20e89ef09d85e34"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"96e849a068441f8a575a0eddab98c255d8031e95","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"In order to observe console logs from specified position we need to add new"},{"line_number":14,"context_line":"optional argument to console logs command that allows to get it from"},{"line_number":15,"context_line":"specified position."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Problem description"},{"line_number":18,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_20c38d39","line":15,"updated":"2016-11-17 15:02:02.000000000","message":"This still sounds a bit weird :)","commit_id":"37881e9ff03c74eb01d8538683ab4aaac1f494a1"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"96e849a068441f8a575a0eddab98c255d8031e95","unresolved":false,"context_lines":[{"line_number":36,"context_line":"``os.seek()`` manner. As soon as lines cannot be directly mapped to bytes,"},{"line_number":37,"context_line":"one request for logs might make several requests to API that need mechanism"},{"line_number":38,"context_line":"of preserving state between requests. For this purpose two new arguments will"},{"line_number":39,"context_line":"be added. Offset shows distance in bytes from specified direction, origin -"},{"line_number":40,"context_line":"enum type that  explains from where offset is made, can be either begin or"},{"line_number":41,"context_line":"end of the file. First request will be usually made from end, but this"},{"line_number":42,"context_line":"position is not stable since file can be appended with new data between"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_602d85fd","line":39,"range":{"start_line":39,"start_character":10,"end_line":39,"end_character":16},"updated":"2016-11-17 15:02:02.000000000","message":"nit: ``offset``","commit_id":"37881e9ff03c74eb01d8538683ab4aaac1f494a1"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"96e849a068441f8a575a0eddab98c255d8031e95","unresolved":false,"context_lines":[{"line_number":36,"context_line":"``os.seek()`` manner. As soon as lines cannot be directly mapped to bytes,"},{"line_number":37,"context_line":"one request for logs might make several requests to API that need mechanism"},{"line_number":38,"context_line":"of preserving state between requests. For this purpose two new arguments will"},{"line_number":39,"context_line":"be added. Offset shows distance in bytes from specified direction, origin -"},{"line_number":40,"context_line":"enum type that  explains from where offset is made, can be either begin or"},{"line_number":41,"context_line":"end of the file. First request will be usually made from end, but this"},{"line_number":42,"context_line":"position is not stable since file can be appended with new data between"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_003f7124","line":39,"range":{"start_line":39,"start_character":67,"end_line":39,"end_character":73},"updated":"2016-11-17 15:02:02.000000000","message":"nit: ``origin``","commit_id":"37881e9ff03c74eb01d8538683ab4aaac1f494a1"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"96e849a068441f8a575a0eddab98c255d8031e95","unresolved":false,"context_lines":[{"line_number":42,"context_line":"position is not stable since file can be appended with new data between"},{"line_number":43,"context_line":"requests, so next if needed next requests will be made from begin. To make it"},{"line_number":44,"context_line":"possible each response will be enriched with position parameter that shows"},{"line_number":45,"context_line":"offset in bytes from begin of the file. This starting point is more stable"},{"line_number":46,"context_line":"since append will occur more often that rotation. The last edge case if log"},{"line_number":47,"context_line":"file rotation happens between two related requests, to handle this response"},{"line_number":48,"context_line":"will be enriched with log_id parameter that presents hash of logfile inode"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_40732915","line":45,"range":{"start_line":45,"start_character":21,"end_line":45,"end_character":26},"updated":"2016-11-17 15:02:02.000000000","message":"nit: beginning","commit_id":"37881e9ff03c74eb01d8538683ab4aaac1f494a1"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"96e849a068441f8a575a0eddab98c255d8031e95","unresolved":false,"context_lines":[{"line_number":45,"context_line":"offset in bytes from begin of the file. This starting point is more stable"},{"line_number":46,"context_line":"since append will occur more often that rotation. The last edge case if log"},{"line_number":47,"context_line":"file rotation happens between two related requests, to handle this response"},{"line_number":48,"context_line":"will be enriched with log_id parameter that presents hash of logfile inode"},{"line_number":49,"context_line":"number. Each following request will have optional field log_id with log_id"},{"line_number":50,"context_line":"value from previous response in case of rotation nova api will respond"},{"line_number":51,"context_line":"with 409 error code."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_ca64b7ba","line":48,"range":{"start_line":48,"start_character":22,"end_line":48,"end_character":28},"updated":"2016-11-17 15:02:02.000000000","message":"nit: ``log_id``","commit_id":"37881e9ff03c74eb01d8538683ab4aaac1f494a1"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"96e849a068441f8a575a0eddab98c255d8031e95","unresolved":false,"context_lines":[{"line_number":48,"context_line":"will be enriched with log_id parameter that presents hash of logfile inode"},{"line_number":49,"context_line":"number. Each following request will have optional field log_id with log_id"},{"line_number":50,"context_line":"value from previous response in case of rotation nova api will respond"},{"line_number":51,"context_line":"with 409 error code."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"Alternatives"},{"line_number":54,"context_line":"------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_6a6ac382","line":51,"updated":"2016-11-17 15:02:02.000000000","message":"nit: 409 Conflict","commit_id":"37881e9ff03c74eb01d8538683ab4aaac1f494a1"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"96e849a068441f8a575a0eddab98c255d8031e95","unresolved":false,"context_lines":[{"line_number":54,"context_line":"------------"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"An alternative would be to load all log file as before, but add offset"},{"line_number":57,"context_line":"parameter that allows to skip specified amount of lines."},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"Data model impact"},{"line_number":60,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a77a97e_eada534a","line":57,"updated":"2016-11-17 15:02:02.000000000","message":"I guess we could leave a comment why this is undesirable (i.e. due to possibility of a DoS attack).","commit_id":"37881e9ff03c74eb01d8538683ab4aaac1f494a1"}]}
