)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c699dd4f4fbe93072fc1fd6ccbecc38585edbdba","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Delete iSCSI devices after volume detached"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Previously, after detching from a volume, the iSCSI device"},{"line_number":10,"context_line":"remains attached on the compute node until all LUNs for a given"},{"line_number":11,"context_line":"IQN are detached -- causing issues when LUNs are reused for"},{"line_number":12,"context_line":"different volumes. This change will delete the device(s)"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"AAAAS3%2F%2FtD8%3D","line":9,"updated":"2013-09-20 22:23:18.000000000","message":"\u0027detaching\u0027 is misspelled","commit_id":"de6b9004687fedf7dc4f009d399d89bf65854d5d"}],"nova/virt/libvirt/volume.py":[{"author":{"_account_id":1561,"name":"Russell Bryant","email":"rbryant@redhat.com","username":"russellb"},"change_message_id":"3062275f5dac0529595b6e04409fe0eeaadca969","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        delete_control \u003d \u0027/sys/block/\u0027 + device_name + \u0027/device/delete\u0027"},{"line_number":314,"context_line":"        if os.path.exists(delete_control):"},{"line_number":315,"context_line":"            utils.execute(\u0027cp\u0027, \u0027/dev/stdin\u0027, delete_control,"},{"line_number":316,"context_line":"                          process_input\u003d\u00271\u0027, run_as_root\u003dTrue)"},{"line_number":317,"context_line":"        else:"},{"line_number":318,"context_line":"            LOG.warn(_(\"Unable to delete volume device %s\"), device_name)"},{"line_number":319,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FQVY%3D","line":316,"updated":"2013-08-03 14:41:31.000000000","message":"Using cp /dev/stdin like this doesn\u0027t look right to me.  Can you explain why this is used?\n\nPresumably you just need to write something to this special file, yes?","commit_id":"d835a5b4975e7f728662e3fd05a158fdb37180d4"},{"author":{"_account_id":7231,"name":"Jason Dillaman","username":"jdillaman","inactive":true},"change_message_id":"adf485191d708a1af37f2ac41ac03b6107036e8e","unresolved":false,"context_lines":[{"line_number":313,"context_line":"        delete_control \u003d \u0027/sys/block/\u0027 + device_name + \u0027/device/delete\u0027"},{"line_number":314,"context_line":"        if os.path.exists(delete_control):"},{"line_number":315,"context_line":"            utils.execute(\u0027cp\u0027, \u0027/dev/stdin\u0027, delete_control,"},{"line_number":316,"context_line":"                          process_input\u003d\u00271\u0027, run_as_root\u003dTrue)"},{"line_number":317,"context_line":"        else:"},{"line_number":318,"context_line":"            LOG.warn(_(\"Unable to delete volume device %s\"), device_name)"},{"line_number":319,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAQn%2F%2FNdA%3D","line":316,"in_reply_to":"AAAAQn%2F%2FQVY%3D","updated":"2013-08-05 13:06:36.000000000","message":"Correct, and I agree that it looks weird.  /dev/stdin is a symlink to your current process\u0027s stdin pipe.  Therefore, the \"process_input\u003d1\" will copy \u00271\u0027 to the stdin pipe and the cp will copy that \u00271\u0027 to the delete control file.  An alternative would be to run something like \u0027sh -c \"echo 1 \u003e %s\"\u0027.","commit_id":"d835a5b4975e7f728662e3fd05a158fdb37180d4"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"3179c9f39854efb22906797a4f0d06a396f2be37","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        devices \u003d [dev for dev in devices if dev.startswith(device_prefix)]"},{"line_number":315,"context_line":"        if not devices:"},{"line_number":316,"context_line":"            self._disconnect_from_iscsi_portal(iscsi_properties)"},{"line_number":317,"context_line":"        elif not [dev for dev in devices if dev \u003d\u003d host_device]:"},{"line_number":318,"context_line":"            # Delete device if LUN is not in use by another instance"},{"line_number":319,"context_line":"            self._delete_device(host_device)"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FdBg%3D","line":317,"updated":"2013-09-04 15:45:14.000000000","message":"Why not something simpler like \"elif host_device not in devices\"?\n\nOr does \"in\" fail due to an identity vs. equality difference?","commit_id":"211681f9f2b79e9a20f02f2f8031b9017220c8a8"},{"author":{"_account_id":5652,"name":"David Ripton","email":"dripton@redhat.com","username":"dripton"},"change_message_id":"3179c9f39854efb22906797a4f0d06a396f2be37","unresolved":false,"context_lines":[{"line_number":457,"context_line":"        devs \u003d [\u0027/dev/disk/by-path/%s\u0027 % dev for dev in entries"},{"line_number":458,"context_line":"                if iqn_lun in dev]"},{"line_number":459,"context_line":"        for dev in devs:"},{"line_number":460,"context_line":"            self._delete_device(dev)"},{"line_number":461,"context_line":""},{"line_number":462,"context_line":"        self._rescan_multipath()"},{"line_number":463,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAASn%2F%2FdBY%3D","line":460,"updated":"2013-09-04 15:45:14.000000000","message":"Why build a list just to iterate over it and throw it away?  I\u0027d just use a for loop here and avoid creating the list.","commit_id":"211681f9f2b79e9a20f02f2f8031b9017220c8a8"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c699dd4f4fbe93072fc1fd6ccbecc38585edbdba","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        if os.path.exists(delete_control):"},{"line_number":348,"context_line":"            # Copy \u00271\u0027 from stdin to the device delete control file"},{"line_number":349,"context_line":"            utils.execute(\u0027cp\u0027, \u0027/dev/stdin\u0027, delete_control,"},{"line_number":350,"context_line":"                          process_input\u003d\u00271\u0027, run_as_root\u003dTrue)"},{"line_number":351,"context_line":"        else:"},{"line_number":352,"context_line":"            LOG.warn(_(\"Unable to delete volume device %s\"), device_name)"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAS3%2F%2FtDY%3D","line":350,"updated":"2013-09-20 22:23:18.000000000","message":"This smells a lot like a hack to me. I\u0027ve read the bug, and I understand that there\u0027s some weird behavior here. It seems unnatural to me that an iSCSI target would change the size or orientation of a LUN while a client was logged into the target. Do you have any references that indicate that this is indeed the desired way to solve this and that it is indeed a valid bug in the iSCSI initiator tool?","commit_id":"de6b9004687fedf7dc4f009d399d89bf65854d5d"},{"author":{"_account_id":7231,"name":"Jason Dillaman","username":"jdillaman","inactive":true},"change_message_id":"b1a88acd324db15a9cb380bbebae6ff7e4539442","unresolved":false,"context_lines":[{"line_number":347,"context_line":"        if os.path.exists(delete_control):"},{"line_number":348,"context_line":"            # Copy \u00271\u0027 from stdin to the device delete control file"},{"line_number":349,"context_line":"            utils.execute(\u0027cp\u0027, \u0027/dev/stdin\u0027, delete_control,"},{"line_number":350,"context_line":"                          process_input\u003d\u00271\u0027, run_as_root\u003dTrue)"},{"line_number":351,"context_line":"        else:"},{"line_number":352,"context_line":"            LOG.warn(_(\"Unable to delete volume device %s\"), device_name)"},{"line_number":353,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAATn%2F%2B6Lc%3D","line":350,"in_reply_to":"AAAAS3%2F%2FtDY%3D","updated":"2013-11-18 17:32:45.000000000","message":"The issue is that unlike the Linux iSCSI target service which will only associate a single LUN with a single target, Netapp will associate multiple LUNs with a single target.  So the Linux iSCSI initiator will automatically make all LUNs available on a given target.  So if LUN 1 was previously used for unmounted volume A, it gets deleted, and a new volume B is created -- it will be assigned the empty LUN 1 by default.  Since the Linux iSCSI initiator thinks LUN 1 is already exposed as a device, it won\u0027t notice the change.  That is one reason why we force the removal of the device after the volume is detached, so that an iSCSI initiator refresh will pick up the new volume B LUN.","commit_id":"de6b9004687fedf7dc4f009d399d89bf65854d5d"}]}
