)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6fd51859c28dbea335ee76874bad86648c15dc2a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Tom Patzig \u003ctom.patzig@sap.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-09-07 18:22:32 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"refresh instances_path in shared stor testfile chk"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When doing Live migration with shared storage, it happens erratically,"},{"line_number":10,"context_line":"that the check for the shared storage test_file fails. Because the shared"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a8ec9b2_8ef87ce7","line":7,"range":{"start_line":7,"start_character":26,"end_line":7,"end_character":50},"updated":"2016-09-14 12:26:43.000000000","message":"I don\u0027t know what this means. Typo(s)?","commit_id":"45139b56a06e98c15d06cbd2c49475cbe912429f"},{"author":{"_account_id":15371,"name":"Tom Patzig","email":"tom.patzig@sap.com","username":"tpatzig"},"change_message_id":"5cb336e1e60c6c0c1470f4c097113a3c54885e23","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Tom Patzig \u003ctom.patzig@sap.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-09-07 18:22:32 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"refresh instances_path in shared stor testfile chk"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When doing Live migration with shared storage, it happens erratically,"},{"line_number":10,"context_line":"that the check for the shared storage test_file fails. Because the shared"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7a8ec9b2_6cf79cf5","line":7,"range":{"start_line":7,"start_character":26,"end_line":7,"end_character":50},"in_reply_to":"7a8ec9b2_8ef87ce7","updated":"2016-09-14 19:10:11.000000000","message":"maybe too much abbreviations ;)\ni changed that","commit_id":"45139b56a06e98c15d06cbd2c49475cbe912429f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"cdcc8ebac66577180ece15b9304289e71687d250","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This can be fixed if the client is forced to refresh the directories"},{"line_number":15,"context_line":"content, which can be achieved by \u0027touch\u0027 on the directory. Doing so,"},{"line_number":16,"context_line":"the test_file is visibile instantly, within ms."},{"line_number":17,"context_line":"The patch adds a \u0027touch\u0027 on instances_path in check_shared_storage_test_file,"},{"line_number":18,"context_line":"before checking the existence of the file."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: I16be39142278517f43e6eca3441a56cbc9561113"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"3a98d1f4_84b3354c","line":17,"range":{"start_line":17,"start_character":18,"end_line":17,"end_character":23},"updated":"2016-10-04 09:00:25.000000000","message":"Nit: we actually add a utime thingy, but its the same kind of thing I guess.","commit_id":"1af73d1fb3169c5b3cce77d94316922496bbaf9a"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6fd51859c28dbea335ee76874bad86648c15dc2a","unresolved":false,"context_lines":[{"line_number":5658,"context_line":""},{"line_number":5659,"context_line":"        Cannot confirm tmpfile return False."},{"line_number":5660,"context_line":"        \"\"\""},{"line_number":5661,"context_line":"        # NOTE(tpatzig): if instances_path is a shared volume, that is"},{"line_number":5662,"context_line":"        # under heavy IO (many instances on many compute nodes), it happens,"},{"line_number":5663,"context_line":"        # that checking the existence of the testfile fails,"},{"line_number":5664,"context_line":"        # just because it takes longer until the client refreshes and new"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_aef9b8ca","line":5661,"range":{"start_line":5661,"start_character":61,"end_line":5661,"end_character":62},"updated":"2016-09-14 12:26:43.000000000","message":"supernit: drop this comma :)","commit_id":"45139b56a06e98c15d06cbd2c49475cbe912429f"},{"author":{"_account_id":15371,"name":"Tom Patzig","email":"tom.patzig@sap.com","username":"tpatzig"},"change_message_id":"5cb336e1e60c6c0c1470f4c097113a3c54885e23","unresolved":false,"context_lines":[{"line_number":5658,"context_line":""},{"line_number":5659,"context_line":"        Cannot confirm tmpfile return False."},{"line_number":5660,"context_line":"        \"\"\""},{"line_number":5661,"context_line":"        # NOTE(tpatzig): if instances_path is a shared volume, that is"},{"line_number":5662,"context_line":"        # under heavy IO (many instances on many compute nodes), it happens,"},{"line_number":5663,"context_line":"        # that checking the existence of the testfile fails,"},{"line_number":5664,"context_line":"        # just because it takes longer until the client refreshes and new"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_ece3ac31","line":5661,"range":{"start_line":5661,"start_character":61,"end_line":5661,"end_character":62},"in_reply_to":"7a8ec9b2_aef9b8ca","updated":"2016-09-14 19:10:11.000000000","message":"Done","commit_id":"45139b56a06e98c15d06cbd2c49475cbe912429f"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"6fd51859c28dbea335ee76874bad86648c15dc2a","unresolved":false,"context_lines":[{"line_number":5659,"context_line":"        Cannot confirm tmpfile return False."},{"line_number":5660,"context_line":"        \"\"\""},{"line_number":5661,"context_line":"        # NOTE(tpatzig): if instances_path is a shared volume, that is"},{"line_number":5662,"context_line":"        # under heavy IO (many instances on many compute nodes), it happens,"},{"line_number":5663,"context_line":"        # that checking the existence of the testfile fails,"},{"line_number":5664,"context_line":"        # just because it takes longer until the client refreshes and new"},{"line_number":5665,"context_line":"        # content gets visible."},{"line_number":5666,"context_line":"        # os.utime (like touch) on the directory forces the client to refresh."}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_aece1881","line":5663,"range":{"start_line":5662,"start_character":65,"end_line":5663,"end_character":14},"updated":"2016-09-14 12:26:43.000000000","message":"nit: s/it happens, that/then/","commit_id":"45139b56a06e98c15d06cbd2c49475cbe912429f"},{"author":{"_account_id":15371,"name":"Tom Patzig","email":"tom.patzig@sap.com","username":"tpatzig"},"change_message_id":"5cb336e1e60c6c0c1470f4c097113a3c54885e23","unresolved":false,"context_lines":[{"line_number":5659,"context_line":"        Cannot confirm tmpfile return False."},{"line_number":5660,"context_line":"        \"\"\""},{"line_number":5661,"context_line":"        # NOTE(tpatzig): if instances_path is a shared volume, that is"},{"line_number":5662,"context_line":"        # under heavy IO (many instances on many compute nodes), it happens,"},{"line_number":5663,"context_line":"        # that checking the existence of the testfile fails,"},{"line_number":5664,"context_line":"        # just because it takes longer until the client refreshes and new"},{"line_number":5665,"context_line":"        # content gets visible."},{"line_number":5666,"context_line":"        # os.utime (like touch) on the directory forces the client to refresh."}],"source_content_type":"text/x-python","patch_set":1,"id":"7a8ec9b2_4ccbc0a5","line":5663,"range":{"start_line":5662,"start_character":65,"end_line":5663,"end_character":14},"in_reply_to":"7a8ec9b2_aece1881","updated":"2016-09-14 19:10:11.000000000","message":"Done","commit_id":"45139b56a06e98c15d06cbd2c49475cbe912429f"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"cb2f7531f34e570a8f1d980aef3fdaaef602bdb5","unresolved":false,"context_lines":[{"line_number":5664,"context_line":"        # just because it takes longer until the client refreshes and new"},{"line_number":5665,"context_line":"        # content gets visible."},{"line_number":5666,"context_line":"        # os.utime (like touch) on the directory forces the client to refresh."},{"line_number":5667,"context_line":"        os.utime(CONF.instances_path, None)"},{"line_number":5668,"context_line":""},{"line_number":5669,"context_line":"        tmp_file \u003d os.path.join(CONF.instances_path, filename)"},{"line_number":5670,"context_line":"        if not os.path.exists(tmp_file):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_a8388d3e","line":5667,"range":{"start_line":5667,"start_character":11,"end_line":5667,"end_character":16},"updated":"2016-09-21 06:19:11.000000000","message":"This is safe only for operating systems that implement directories as files. AFAIK libvirt hyper-v does not support live migration, so we don\u0027t have to worry about (yet).\n\nI think whether this can be replaced by \u0027with open(filename)\u0027. This should enforce NFS to refresh its cache as open() should guarantee to return a consistent handle to particular filer and it\u0027s something that works under every OS.","commit_id":"84aef5b1fa193013169ba0d45269257aaa88b648"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"34ebb98519fa5d7846cc8b10a21db98a49e1c3dc","unresolved":false,"context_lines":[{"line_number":5664,"context_line":"        # just because it takes longer until the client refreshes and new"},{"line_number":5665,"context_line":"        # content gets visible."},{"line_number":5666,"context_line":"        # os.utime (like touch) on the directory forces the client to refresh."},{"line_number":5667,"context_line":"        os.utime(CONF.instances_path, None)"},{"line_number":5668,"context_line":""},{"line_number":5669,"context_line":"        tmp_file \u003d os.path.join(CONF.instances_path, filename)"},{"line_number":5670,"context_line":"        if not os.path.exists(tmp_file):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_50ab9cd6","line":5667,"range":{"start_line":5667,"start_character":11,"end_line":5667,"end_character":16},"in_reply_to":"3a98d1f4_c31c08c4","updated":"2016-10-04 12:35:10.000000000","message":"The Linux NFS client will cache dentry lookups, for a period of time determined by the NFS mount options. Since 2.6.28, it will cache both positive and negative lookup results. Hence when you open() and it returns ENOENT, that error will be cached until the attribute cache timeout is reached, hence the 30 second delay. \n\nCalling os.utime() on the directory updates atime + mtime on the directory, the latter forcing an update on the NFS server, which triggers flushing of the dentry cache. Thus the newly created file is now visible to the NFS client.\n\nYou can avoid the dentry cache with the mount option lookupcache\u003dnone, but that has a performance penalty\n\nThe NFS close-to-open semantics only come into play *after* the file has been successfully opened, so that\u0027s not relevant here.\n\nSo to sum up, I think the os.utime() hack here is optimal for NFS","commit_id":"84aef5b1fa193013169ba0d45269257aaa88b648"},{"author":{"_account_id":15371,"name":"Tom Patzig","email":"tom.patzig@sap.com","username":"tpatzig"},"change_message_id":"abb8e540af8abe815e268325530f42a56f69babd","unresolved":false,"context_lines":[{"line_number":5664,"context_line":"        # just because it takes longer until the client refreshes and new"},{"line_number":5665,"context_line":"        # content gets visible."},{"line_number":5666,"context_line":"        # os.utime (like touch) on the directory forces the client to refresh."},{"line_number":5667,"context_line":"        os.utime(CONF.instances_path, None)"},{"line_number":5668,"context_line":""},{"line_number":5669,"context_line":"        tmp_file \u003d os.path.join(CONF.instances_path, filename)"},{"line_number":5670,"context_line":"        if not os.path.exists(tmp_file):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_a6716846","line":5667,"range":{"start_line":5667,"start_character":11,"end_line":5667,"end_character":16},"in_reply_to":"5a8bc5a2_06d640c5","updated":"2016-09-26 12:49:39.000000000","message":"We\u0027ve tested that in our lab. On one client we started a reader process, that invoked os.open(file,\u0027r+\u0027) in a loop; on the other node we started a writer process, that created a temp file in an NFS directory.\nThe result is, that \u0027open (with mode r+)\u0027 will not refresh the clients NFS cache - it took up to 30s until the reader process \u0027saw\u0027 the file in the folder.\nPutting a os.utime before makes the file appear immediately in ms (less than a second).\nI vote for utime ;)","commit_id":"84aef5b1fa193013169ba0d45269257aaa88b648"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"3b18d8b53958a06e82c05858ad13e4995f4a2f07","unresolved":false,"context_lines":[{"line_number":5664,"context_line":"        # just because it takes longer until the client refreshes and new"},{"line_number":5665,"context_line":"        # content gets visible."},{"line_number":5666,"context_line":"        # os.utime (like touch) on the directory forces the client to refresh."},{"line_number":5667,"context_line":"        os.utime(CONF.instances_path, None)"},{"line_number":5668,"context_line":""},{"line_number":5669,"context_line":"        tmp_file \u003d os.path.join(CONF.instances_path, filename)"},{"line_number":5670,"context_line":"        if not os.path.exists(tmp_file):"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a98d1f4_c31c08c4","line":5667,"range":{"start_line":5667,"start_character":11,"end_line":5667,"end_character":16},"in_reply_to":"5a8bc5a2_a6716846","updated":"2016-09-29 13:06:58.000000000","message":"Thanks for testing this. Let\u0027s keep utime there then","commit_id":"84aef5b1fa193013169ba0d45269257aaa88b648"},{"author":{"_account_id":12299,"name":"Paweł Koniszewski","email":"pawel.koniszewski@gmail.com","username":"pawel.koniszewski"},"change_message_id":"df3a0425335ba289a1bfa178855ddb89d865e9d6","unresolved":false,"context_lines":[{"line_number":5664,"context_line":"        # just because it takes longer until the client refreshes and new"},{"line_number":5665,"context_line":"        # content gets visible."},{"line_number":5666,"context_line":"        # os.utime (like touch) on the directory forces the client to refresh."},{"line_number":5667,"context_line":"        os.utime(CONF.instances_path, None)"},{"line_number":5668,"context_line":""},{"line_number":5669,"context_line":"        tmp_file \u003d os.path.join(CONF.instances_path, filename)"},{"line_number":5670,"context_line":"        if not os.path.exists(tmp_file):"}],"source_content_type":"text/x-python","patch_set":2,"id":"5a8bc5a2_06d640c5","line":5667,"range":{"start_line":5667,"start_character":11,"end_line":5667,"end_character":16},"in_reply_to":"7a8ec9b2_09dea310","updated":"2016-09-22 06:37:51.000000000","message":"I shouldn\u0027t add this \u0027yet\u0027. We don\u0027t really need to care about Windows here and your point is correct. I never wanted to say that we need to care about it, just wanted to articulate that touching directories might not run everywhere in the same way, but nothing to care about.\n\nSo I read a bit more how we can handle this situation and both approaches are correct, as both will refresh NFS cache. With utime we just need to make sure that it is called with correct arguments and never tries to modify accesses to instances path.","commit_id":"84aef5b1fa193013169ba0d45269257aaa88b648"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"804e663c198a36b2ad621bca583217512bf2b247","unresolved":false,"context_lines":[{"line_number":5664,"context_line":"        # just because it takes longer until the client refreshes and new"},{"line_number":5665,"context_line":"        # content gets visible."},{"line_number":5666,"context_line":"        # os.utime (like touch) on the directory forces the client to refresh."},{"line_number":5667,"context_line":"        os.utime(CONF.instances_path, None)"},{"line_number":5668,"context_line":""},{"line_number":5669,"context_line":"        tmp_file \u003d os.path.join(CONF.instances_path, filename)"},{"line_number":5670,"context_line":"        if not os.path.exists(tmp_file):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a8ec9b2_09dea310","line":5667,"range":{"start_line":5667,"start_character":11,"end_line":5667,"end_character":16},"in_reply_to":"7a8ec9b2_a8388d3e","updated":"2016-09-22 00:41:48.000000000","message":"Pawel, why would we care about hyper-v in this case since this is the libvirt driver which doesn\u0027t run on windows?\n\nAs for the \u0027open\u0027 question, that\u0027s not a bad idea, we\u0027d have to handle the IOError that the file doesn\u0027t exist, but that would tell us what we want to know also.","commit_id":"84aef5b1fa193013169ba0d45269257aaa88b648"}]}
