)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"1402e3166a999ca41e0474160e9fe3fbbfc970d8","unresolved":false,"context_lines":[{"line_number":10,"context_line":"executing partprobe may meet error. To solve this problem, we can"},{"line_number":11,"context_line":"execute udevadm settle before partprobe to wait for udevd to"},{"line_number":12,"context_line":"process the device creation events for disks. If partprobe still"},{"line_number":13,"context_line":"meet error, waiting for 60 seconds and trying again is a good"},{"line_number":14,"context_line":"solution."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Depends-On: I223d4ff74e789b78116c4d34918e1b98ee6fee06"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ffe62b97_3367ad50","line":13,"updated":"2017-03-24 22:07:18.000000000","message":"s/meet error, waiting for 60 seconds and trying again is a good solution./meets an error, retry will be performed after 60 seconds./","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"73027fdda8b5f424791e40db47ae72a52b8e7844","unresolved":false,"context_lines":[{"line_number":10,"context_line":"executing partprobe may meet error. To solve this problem, we can"},{"line_number":11,"context_line":"execute udevadm settle before partprobe to wait for udevd to"},{"line_number":12,"context_line":"process the device creation events for disks. If partprobe still"},{"line_number":13,"context_line":"meet error, waiting for 60 seconds and trying again is a good"},{"line_number":14,"context_line":"solution."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Depends-On: I223d4ff74e789b78116c4d34918e1b98ee6fee06"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bff0334d_b8a9e27c","line":13,"in_reply_to":"ffe62b97_3367ad50","updated":"2017-04-11 01:54:20.000000000","message":"Thank you, good suggestion.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e65afc62aa176c43974da7a51cd2f74e949e298e","unresolved":false,"context_lines":[{"line_number":13,"context_line":"meet error, waiting for 60 seconds and trying again is a good"},{"line_number":14,"context_line":"solution."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Depends-On: I223d4ff74e789b78116c4d34918e1b98ee6fee06"},{"line_number":17,"context_line":"Change-Id: I4808c3c517c8f9d865bccbb00569905f81230392"},{"line_number":18,"context_line":"closes-Bug: #1670239"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"ffe62b97_1e2c7300","line":16,"updated":"2017-03-27 16:44:35.000000000","message":"I think it is the other way around. The changes to ironic-lib have to be done first, before any ironic changes. Also, even for the ironic patch, although it will depend on this patch, there will also be some other things that need to be done (I mentioned the list in your ironic patch.)","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7ca66bccda88bd0f5c50fe1f7f939fc725b86bda","unresolved":false,"context_lines":[{"line_number":13,"context_line":"meet error, waiting for 60 seconds and trying again is a good"},{"line_number":14,"context_line":"solution."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Depends-On: I223d4ff74e789b78116c4d34918e1b98ee6fee06"},{"line_number":17,"context_line":"Change-Id: I4808c3c517c8f9d865bccbb00569905f81230392"},{"line_number":18,"context_line":"closes-Bug: #1670239"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7ffa3b31_80c15631","line":16,"in_reply_to":"bff0334d_18e9eeb5","updated":"2017-04-18 21:14:20.000000000","message":"Yes, that\u0027s what I mean.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"73027fdda8b5f424791e40db47ae72a52b8e7844","unresolved":false,"context_lines":[{"line_number":13,"context_line":"meet error, waiting for 60 seconds and trying again is a good"},{"line_number":14,"context_line":"solution."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Depends-On: I223d4ff74e789b78116c4d34918e1b98ee6fee06"},{"line_number":17,"context_line":"Change-Id: I4808c3c517c8f9d865bccbb00569905f81230392"},{"line_number":18,"context_line":"closes-Bug: #1670239"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"bff0334d_18e9eeb5","line":16,"in_reply_to":"ffe62b97_1e2c7300","updated":"2017-04-11 01:54:20.000000000","message":"Thank you, you mean I should remove \"Depends-On: I223d4ff74e789b78116c4d34918e1b98ee6fee06\", and let this patch to be merged first?","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8fc919cf30bb7baec608ffdddc01cf6e15010079","unresolved":false,"context_lines":[{"line_number":10,"context_line":"executing partprobe may meet error. To solve this problem, we can"},{"line_number":11,"context_line":"execute udevadm settle before partprobe to wait for udevd to"},{"line_number":12,"context_line":"process the device creation events for disks. If partprobe still"},{"line_number":13,"context_line":"meet error, waiting for 60 seconds and trying again is a good"},{"line_number":14,"context_line":"solution."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I4808c3c517c8f9d865bccbb00569905f81230392"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"7ffa3b31_0082e64f","line":13,"updated":"2017-04-18 21:10:15.000000000","message":"I don\u0027t see that you addresed Joanna\u0027s comment (patch set 4).","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a6cd23a0c513797e84f009ea97ccb7cfc5a10b4d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Retry when execute partprobe cmd failed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After executing \"sgdisk -Z\" and \"qemu-img convert\" for cleaning"},{"line_number":10,"context_line":"out all partition data and install User-OS into harddisk,"},{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5ff73747_feee98b2","line":9,"updated":"2017-04-25 16:11:14.000000000","message":"this is from ironic_python_agent/shell/write_image.sh, right?","commit_id":"854d311b3c129f2cb93afd872eec2db18fbba3f8"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"0e9e2e643a844d40e2c912cb4cb477b7c066a4b9","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Retry when execute partprobe cmd failed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After executing \"sgdisk -Z\" and \"qemu-img convert\" for cleaning"},{"line_number":10,"context_line":"out all partition data and install User-OS into harddisk,"},{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5ff73747_9b8af018","line":9,"in_reply_to":"5ff73747_feee98b2","updated":"2017-04-26 01:48:59.000000000","message":"yes, that right~","commit_id":"854d311b3c129f2cb93afd872eec2db18fbba3f8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a6cd23a0c513797e84f009ea97ccb7cfc5a10b4d","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After executing \"sgdisk -Z\" and \"qemu-img convert\" for cleaning"},{"line_number":10,"context_line":"out all partition data and install User-OS into harddisk,"},{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"},{"line_number":13,"context_line":"could fail because the hard-disk device is blocked/busy. This"},{"line_number":14,"context_line":"situation occurs because kernel is still busy with the perceding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5ff73747_1e226401","line":11,"updated":"2017-04-25 16:11:14.000000000","message":"what do you mean by \u0027partitioning tool\u0027 ?","commit_id":"854d311b3c129f2cb93afd872eec2db18fbba3f8"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"0e9e2e643a844d40e2c912cb4cb477b7c066a4b9","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After executing \"sgdisk -Z\" and \"qemu-img convert\" for cleaning"},{"line_number":10,"context_line":"out all partition data and install User-OS into harddisk,"},{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"},{"line_number":13,"context_line":"could fail because the hard-disk device is blocked/busy. This"},{"line_number":14,"context_line":"situation occurs because kernel is still busy with the perceding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5ff73747_fbd574b8","line":11,"in_reply_to":"5ff73747_1e226401","updated":"2017-04-26 01:48:59.000000000","message":"I think \"qemu-img convert -t directsync -O host_device $IMAGEFILE $DEVICE\" in ironic_python_agent/shell/write_image.sh will create a new partitions in device.\nF.g. After executing \"qemu-img convert -t directsync -O host_device /tmp/centos7 /dev/sda\"\n/dev/sda1 has been created.","commit_id":"854d311b3c129f2cb93afd872eec2db18fbba3f8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a6cd23a0c513797e84f009ea97ccb7cfc5a10b4d","unresolved":false,"context_lines":[{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"},{"line_number":13,"context_line":"could fail because the hard-disk device is blocked/busy. This"},{"line_number":14,"context_line":"situation occurs because kernel is still busy with the perceding"},{"line_number":15,"context_line":"task that was triggered automatically by the partitioning tool."},{"line_number":16,"context_line":"If \"partprobe\" meets error, waiting for 60 seconds and trying"},{"line_number":17,"context_line":"again is a good solution."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5ff73747_cad31738","line":14,"updated":"2017-04-25 16:11:14.000000000","message":"nit s/perceding/preceding/","commit_id":"854d311b3c129f2cb93afd872eec2db18fbba3f8"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"0e9e2e643a844d40e2c912cb4cb477b7c066a4b9","unresolved":false,"context_lines":[{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"},{"line_number":13,"context_line":"could fail because the hard-disk device is blocked/busy. This"},{"line_number":14,"context_line":"situation occurs because kernel is still busy with the perceding"},{"line_number":15,"context_line":"task that was triggered automatically by the partitioning tool."},{"line_number":16,"context_line":"If \"partprobe\" meets error, waiting for 60 seconds and trying"},{"line_number":17,"context_line":"again is a good solution."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5ff73747_dbf3d89d","line":14,"in_reply_to":"5ff73747_cad31738","updated":"2017-04-26 01:48:59.000000000","message":"Done","commit_id":"854d311b3c129f2cb93afd872eec2db18fbba3f8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a6cd23a0c513797e84f009ea97ccb7cfc5a10b4d","unresolved":false,"context_lines":[{"line_number":13,"context_line":"could fail because the hard-disk device is blocked/busy. This"},{"line_number":14,"context_line":"situation occurs because kernel is still busy with the perceding"},{"line_number":15,"context_line":"task that was triggered automatically by the partitioning tool."},{"line_number":16,"context_line":"If \"partprobe\" meets error, waiting for 60 seconds and trying"},{"line_number":17,"context_line":"again is a good solution."},{"line_number":18,"context_line":"Why we had not used the \"udevadm settle\" before executing"},{"line_number":19,"context_line":"\"partprobe\". This is because \"udevadm settle\" is event driven,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5ff73747_3ed640c5","line":16,"updated":"2017-04-25 16:11:14.000000000","message":"I\u0027m concerned here by \u0027meets error\u0027. Should we blindly do this regardless of the error? I guess it isn\u0027t clear to me whether we\u0027re doing this retry cuz we\u0027re desperate and it could work if we wait, or if we\u0027re doing this retry because we know that the kernel is still busy...","commit_id":"854d311b3c129f2cb93afd872eec2db18fbba3f8"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"0e9e2e643a844d40e2c912cb4cb477b7c066a4b9","unresolved":false,"context_lines":[{"line_number":13,"context_line":"could fail because the hard-disk device is blocked/busy. This"},{"line_number":14,"context_line":"situation occurs because kernel is still busy with the perceding"},{"line_number":15,"context_line":"task that was triggered automatically by the partitioning tool."},{"line_number":16,"context_line":"If \"partprobe\" meets error, waiting for 60 seconds and trying"},{"line_number":17,"context_line":"again is a good solution."},{"line_number":18,"context_line":"Why we had not used the \"udevadm settle\" before executing"},{"line_number":19,"context_line":"\"partprobe\". This is because \"udevadm settle\" is event driven,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"5ff73747_3bd4fcbc","line":16,"in_reply_to":"5ff73747_3ed640c5","updated":"2017-04-26 01:48:59.000000000","message":"Only meet \"unable to inform the kernel of the change\" when executing \"partprobe\", We can wait and retry. Other errors I think we maybe should raise an exception directly.","commit_id":"854d311b3c129f2cb93afd872eec2db18fbba3f8"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"94b4f3da4ad150aa1d77a723456bb3a629cb9c50","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Retry when execute partprobe cmd failed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After executing \"sgdisk -Z\" and \"qemu-img convert\" for cleaning"},{"line_number":10,"context_line":"out all partition data and install User-OS into harddisk,"},{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5ff73747_8a5ba552","line":9,"updated":"2017-04-26 14:47:14.000000000","message":"maybe s/After/When using IPA shell/write_image.sh, after/","commit_id":"08ea27402c6a788441fb28ad2613ffe71c9297cf"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"a3c1c7610ba7c5dc11cb1c26a8256162e3b6f187","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Retry when execute partprobe cmd failed"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After executing \"sgdisk -Z\" and \"qemu-img convert\" for cleaning"},{"line_number":10,"context_line":"out all partition data and install User-OS into harddisk,"},{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5ff73747_3bd625f3","line":9,"in_reply_to":"5ff73747_8a5ba552","updated":"2017-04-26 15:53:07.000000000","message":"Done","commit_id":"08ea27402c6a788441fb28ad2613ffe71c9297cf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"94b4f3da4ad150aa1d77a723456bb3a629cb9c50","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After executing \"sgdisk -Z\" and \"qemu-img convert\" for cleaning"},{"line_number":10,"context_line":"out all partition data and install User-OS into harddisk,"},{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"},{"line_number":13,"context_line":"could fail because the hard-disk device is blocked/busy. This"},{"line_number":14,"context_line":"situation occurs because kernel is still busy with the preceding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5ff73747_0d2c4f97","line":11,"updated":"2017-04-26 14:47:14.000000000","message":"s/partitioning tool/\u0027qemu-img convert\u0027/","commit_id":"08ea27402c6a788441fb28ad2613ffe71c9297cf"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"a3c1c7610ba7c5dc11cb1c26a8256162e3b6f187","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"After executing \"sgdisk -Z\" and \"qemu-img convert\" for cleaning"},{"line_number":10,"context_line":"out all partition data and install User-OS into harddisk,"},{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"},{"line_number":13,"context_line":"could fail because the hard-disk device is blocked/busy. This"},{"line_number":14,"context_line":"situation occurs because kernel is still busy with the preceding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5ff73747_fb09dd94","line":11,"in_reply_to":"5ff73747_0d2c4f97","updated":"2017-04-26 15:53:07.000000000","message":"Done","commit_id":"08ea27402c6a788441fb28ad2613ffe71c9297cf"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"94b4f3da4ad150aa1d77a723456bb3a629cb9c50","unresolved":false,"context_lines":[{"line_number":9,"context_line":"After executing \"sgdisk -Z\" and \"qemu-img convert\" for cleaning"},{"line_number":10,"context_line":"out all partition data and install User-OS into harddisk,"},{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"},{"line_number":13,"context_line":"could fail because the hard-disk device is blocked/busy. This"},{"line_number":14,"context_line":"situation occurs because kernel is still busy with the preceding"},{"line_number":15,"context_line":"task that was triggered automatically by the partitioning tool."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5ff73747_2d382b9e","line":12,"updated":"2017-04-26 14:47:14.000000000","message":"I don\u0027t know what you mean, that \u0027qemu-img convert ...\u0027 does automatically what partprobe does.","commit_id":"08ea27402c6a788441fb28ad2613ffe71c9297cf"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"a3c1c7610ba7c5dc11cb1c26a8256162e3b6f187","unresolved":false,"context_lines":[{"line_number":9,"context_line":"After executing \"sgdisk -Z\" and \"qemu-img convert\" for cleaning"},{"line_number":10,"context_line":"out all partition data and install User-OS into harddisk,"},{"line_number":11,"context_line":"executing \"partprobe\" may meet error. Now partitioning tool does"},{"line_number":12,"context_line":"automatically what \"partprobe\" does. Explicit \"partprobe\" call"},{"line_number":13,"context_line":"could fail because the hard-disk device is blocked/busy. This"},{"line_number":14,"context_line":"situation occurs because kernel is still busy with the preceding"},{"line_number":15,"context_line":"task that was triggered automatically by the partitioning tool."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"5ff73747_d614b850","line":12,"in_reply_to":"5ff73747_2d382b9e","updated":"2017-04-26 15:53:07.000000000","message":"After use \"parted\" to make a new partition, \"parted\" will call \"partprobe\"(no direct call, but will call). So after \"parted\" a new partition, just test if the new partition is exist instead of calling \"partprobe\" manually. We can use \"udevadm settle --exit-if-exists\u003d\u003cnew-partition\u003e\" or test -e \u003cnew-partition\u003e.\n\"qemu-img convert -t directsync -O host_device $IMAGEFILE $DEVICE\" can also create a new partition, so I think, it will call some functions to inform the kernel that the partitions are changed. This is the guess I think, I will read the qemu-img source code, and find if it really call some functions or cmds which are same like \"partprobe\"","commit_id":"08ea27402c6a788441fb28ad2613ffe71c9297cf"}],"ironic_lib/disk_utils.py":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8ac5b9739b2367d19dd02a7a208c4a63b47f11b6","unresolved":false,"context_lines":[{"line_number":610,"context_line":"    \"\"\""},{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in (1, 2, 3):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_0e03f4b8","line":613,"range":{"start_line":613,"start_character":13,"end_line":613,"end_character":22},"updated":"2017-03-12 14:51:54.000000000","message":"Better to use range(1,3) instead.\nWould it be useful if this is configurable as this behavior may differ from system to system.","commit_id":"ca3db8c75ad06ff6d0a9733e8d58b2dce79cdd9d"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"e4275257fc5b63aec5dcc951b310a5f4e536dd16","unresolved":false,"context_lines":[{"line_number":610,"context_line":"    \"\"\""},{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in (1, 2, 3):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_043d8b8e","line":613,"range":{"start_line":613,"start_character":13,"end_line":613,"end_character":22},"in_reply_to":"9a30ddce_0e03f4b8","updated":"2017-03-13 09:48:01.000000000","message":"Thx, \nrange(1,3) is indeed better than (1,2,3)\nNow ironic ramdisk image is using CoreOS, so maybe just one system we should support","commit_id":"ca3db8c75ad06ff6d0a9733e8d58b2dce79cdd9d"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8ac5b9739b2367d19dd02a7a208c4a63b47f11b6","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        except (processutils.UnknownArgumentError,"},{"line_number":620,"context_line":"                processutils.ProcessExecutionError, OSError) as e:"},{"line_number":621,"context_line":"            error_msg \u003d e.stderr"},{"line_number":622,"context_line":"            if (\u0027unable to inform the kernel\u0027 not in error_msg and"},{"line_number":623,"context_line":"                \u0027Device or resource busy\u0027 not in error_msg):"},{"line_number":624,"context_line":"                msg \u003d (_(\u0027Failed to retrieve partition labels on disk \u0027"},{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_ee930059","line":623,"range":{"start_line":622,"start_character":12,"end_line":623,"end_character":60},"updated":"2017-03-12 14:51:54.000000000","message":"We normally do not rely on the error message strings, but I do not see any alternative in partprobe manpage for handling this.\nWould it serve, to keep this loop as is without checking for the specific error message but to loop for any failure in partprobe? This is assuming that partprobe would be a success for most of the case except this one.","commit_id":"ca3db8c75ad06ff6d0a9733e8d58b2dce79cdd9d"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"e4275257fc5b63aec5dcc951b310a5f4e536dd16","unresolved":false,"context_lines":[{"line_number":619,"context_line":"        except (processutils.UnknownArgumentError,"},{"line_number":620,"context_line":"                processutils.ProcessExecutionError, OSError) as e:"},{"line_number":621,"context_line":"            error_msg \u003d e.stderr"},{"line_number":622,"context_line":"            if (\u0027unable to inform the kernel\u0027 not in error_msg and"},{"line_number":623,"context_line":"                \u0027Device or resource busy\u0027 not in error_msg):"},{"line_number":624,"context_line":"                msg \u003d (_(\u0027Failed to retrieve partition labels on disk \u0027"},{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_04a74bbd","line":623,"range":{"start_line":622,"start_character":12,"end_line":623,"end_character":60},"in_reply_to":"9a30ddce_ee930059","updated":"2017-03-13 09:48:01.000000000","message":"The two errmsgs can be solved by waiting for about 60s. But other errors could not be repaired. So I rely on the error message strings to determine in which situation I should have a try. I also see the source code in ceph, it is also decide whether to retry by the errmsg.","commit_id":"ca3db8c75ad06ff6d0a9733e8d58b2dce79cdd9d"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8ac5b9739b2367d19dd02a7a208c4a63b47f11b6","unresolved":false,"context_lines":[{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":627,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":628,"context_line":"            LOG.debug(_(\u0027Partprobe %(disk)s failed %(times)d times: \u0027"},{"line_number":629,"context_line":"                        \u0027%(error)s (ignored, waiting 60s)\u0027) %"},{"line_number":630,"context_line":"                      {\u0027disk\u0027: device_path, \u0027times\u0027: i, \u0027error\u0027: error_msg})"},{"line_number":631,"context_line":"            time.sleep(60)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_2e9a786e","line":628,"range":{"start_line":628,"start_character":12,"end_line":628,"end_character":21},"updated":"2017-03-12 14:51:54.000000000","message":"May be you can change this to warning to let user know.","commit_id":"ca3db8c75ad06ff6d0a9733e8d58b2dce79cdd9d"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"e4275257fc5b63aec5dcc951b310a5f4e536dd16","unresolved":false,"context_lines":[{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":627,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":628,"context_line":"            LOG.debug(_(\u0027Partprobe %(disk)s failed %(times)d times: \u0027"},{"line_number":629,"context_line":"                        \u0027%(error)s (ignored, waiting 60s)\u0027) %"},{"line_number":630,"context_line":"                      {\u0027disk\u0027: device_path, \u0027times\u0027: i, \u0027error\u0027: error_msg})"},{"line_number":631,"context_line":"            time.sleep(60)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a30ddce_e48a371a","line":628,"range":{"start_line":628,"start_character":12,"end_line":628,"end_character":21},"in_reply_to":"9a30ddce_2e9a786e","updated":"2017-03-13 09:48:01.000000000","message":"That\u0027s a good idea. warning is better.","commit_id":"ca3db8c75ad06ff6d0a9733e8d58b2dce79cdd9d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"2f3ae146686ce1a2761aeed938f420865a2413f8","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":564,"context_line":"            LOG.error(_LE(\"Failed to detect %s\"), part)"},{"line_number":565,"context_line":""},{"line_number":566,"context_line":"    return uuids_to_return"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":""},{"line_number":569,"context_line":"def list_opts():"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_3fe06cfa","line":566,"updated":"2017-04-03 14:50:11.000000000","message":"Maybe we can wait somewhere here instead?","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"1402e3166a999ca41e0474160e9fe3fbbfc970d8","unresolved":false,"context_lines":[{"line_number":609,"context_line":"              returns None."},{"line_number":610,"context_line":"    \"\"\""},{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_13ea6974","line":612,"updated":"2017-03-24 22:07:18.000000000","message":"please remove this variable declaration from here and use this string explicitly in line 636. It will look more descriptive.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"b419bdccbfd95fe07feb7ebd5f0d81056f5cea83","unresolved":false,"context_lines":[{"line_number":609,"context_line":"              returns None."},{"line_number":610,"context_line":"    \"\"\""},{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_1e3317f8","line":612,"in_reply_to":"ffe62b97_13ea6974","updated":"2017-04-11 03:10:13.000000000","message":"Thank you for your suggestion, execute \"partprobe /dev/sda\" may meet error, there are two kinds of errors. One is that It may OK after retrying, Other is fatal error, we shoud raise exception. If no-fatal error retry 3 times, I think we should not retry and also raise an exception.\n\nIf moving the error_msg to line 636. It will make the error_msg is \"unknown error\" in line 636.  But actually, if the program is running into line 636, the error_msg is the error message when execute partprobe meets. \n\nI declare the error_msg in line 612 just want others know whatever the result of executing partprobe is the variable error_msg has been assigned.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"1402e3166a999ca41e0474160e9fe3fbbfc970d8","unresolved":false,"context_lines":[{"line_number":610,"context_line":"    \"\"\""},{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_b30a9d23","line":613,"updated":"2017-03-24 22:07:18.000000000","message":"why retry exactly 3 times? It is not mentioned in the commit message","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7ca66bccda88bd0f5c50fe1f7f939fc725b86bda","unresolved":false,"context_lines":[{"line_number":610,"context_line":"    \"\"\""},{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_6f8bd51e","line":613,"in_reply_to":"bff0334d_7ef583ec","updated":"2017-04-18 21:14:20.000000000","message":"Yes, a config. thx.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"b419bdccbfd95fe07feb7ebd5f0d81056f5cea83","unresolved":false,"context_lines":[{"line_number":610,"context_line":"    \"\"\""},{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_7ef583ec","line":613,"in_reply_to":"ffe62b97_1e96b3f1","updated":"2017-04-11 03:10:13.000000000","message":"Think you for your suggestion, you mean I should add an new configuration item on the top of this file,like :\n    cfg.IntOpt(\u0027partprobe_retry_attempts\u0027,\n               default\u003d3,\n               help\u003d\u0027Maximum attempts to execute partprobe to ensure executing is \u0027\n                    \u0027successful, sleeping 60 second between attempts.\u0027),","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e65afc62aa176c43974da7a51cd2f74e949e298e","unresolved":false,"context_lines":[{"line_number":610,"context_line":"    \"\"\""},{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_1e96b3f1","line":613,"in_reply_to":"ffe62b97_332f7b40","updated":"2017-03-27 16:44:35.000000000","message":"I really hate hard-coded values in libraries. I\u0027d prefer if this was configurable, either as a new parameter to this method, eg: (max_retries\u003d0 to keep default behaviour), or a new config option.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"b419bdccbfd95fe07feb7ebd5f0d81056f5cea83","unresolved":false,"context_lines":[{"line_number":610,"context_line":"    \"\"\""},{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_7e7223af","line":613,"in_reply_to":"ffe62b97_b30a9d23","updated":"2017-04-11 03:10:13.000000000","message":"Thank you for your suggestion. I will mention it in commit message.\n3 times is usually we loop 3 times for some oprations that maybe cause error, and I think ironic-lib is streamlined and practical, we don\u0027t need to add a configration item to controll how many times we shold retry.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"0f1741272242e1f763ced9878aa9c7f637290a91","unresolved":false,"context_lines":[{"line_number":610,"context_line":"    \"\"\""},{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_332f7b40","line":613,"in_reply_to":"ffe62b97_b30a9d23","updated":"2017-03-27 12:53:35.000000000","message":"oslo has built-ins to periodically poll status in oslo-service, would be better to use it instead.\n\nhttps://github.com/openstack/oslo.service/blob/d10c8fe38b7180ea602d641a628ee57640a45cdd/oslo_service/loopingcall.py#L52","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"0f1741272242e1f763ced9878aa9c7f637290a91","unresolved":false,"context_lines":[{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"},{"line_number":617,"context_line":"            partprobe_ok \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_13d7d725","line":614,"range":{"start_line":614,"start_character":46,"end_line":614,"end_character":53},"updated":"2017-03-27 12:53:35.000000000","message":"default timeout which is 120 sec should be enough.\nno need to run_as_root, it works for non-admin user too.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"1402e3166a999ca41e0474160e9fe3fbbfc970d8","unresolved":false,"context_lines":[{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"},{"line_number":617,"context_line":"            partprobe_ok \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_b3ae1d2c","line":614,"updated":"2017-03-24 22:07:18.000000000","message":"why 600s?\nSo it can take 3 * (600s + 60s) \u003d 1980s \u003d 33 minutes overall?","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"b419bdccbfd95fe07feb7ebd5f0d81056f5cea83","unresolved":false,"context_lines":[{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"},{"line_number":617,"context_line":"            partprobe_ok \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_9e0cc7ec","line":614,"range":{"start_line":614,"start_character":46,"end_line":614,"end_character":53},"in_reply_to":"ffe62b97_13d7d725","updated":"2017-04-11 03:10:13.000000000","message":"Thank you for your suggestion.\nWhat you mention is useful for me very much, I have seen a lot of codes which contains \"udevadm\". In these codes, the timeout is assigned to 600s. I think maybe 600s is a kind of standard.\nit works for non-root user, I try in CentOS, it\u0027s true. But I am afraid in other linux distribution maybe it didn\u0027t work.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"b419bdccbfd95fe07feb7ebd5f0d81056f5cea83","unresolved":false,"context_lines":[{"line_number":611,"context_line":"    partprobe_ok \u003d False"},{"line_number":612,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":613,"context_line":"    for i in range(1, 4):"},{"line_number":614,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":615,"context_line":"        try:"},{"line_number":616,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"},{"line_number":617,"context_line":"            partprobe_ok \u003d True"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_9ec967ad","line":614,"in_reply_to":"ffe62b97_b3ae1d2c","updated":"2017-04-11 03:10:13.000000000","message":"Thank you for your suggestion.\nI think I should use the default timeout which is 120s.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"1402e3166a999ca41e0474160e9fe3fbbfc970d8","unresolved":false,"context_lines":[{"line_number":620,"context_line":"                processutils.ProcessExecutionError, OSError) as e:"},{"line_number":621,"context_line":"            error_msg \u003d e.stderr"},{"line_number":622,"context_line":"            if (\u0027unable to inform the kernel\u0027 not in error_msg and"},{"line_number":623,"context_line":"                \u0027Device or resource busy\u0027 not in error_msg):"},{"line_number":624,"context_line":"                msg \u003d (_(\u0027Failed to retrieve partition labels on disk \u0027"},{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_d612af58","line":623,"updated":"2017-03-24 22:07:18.000000000","message":"if both of these messages come for specific exception it would be better to have 2 excepts than check for stderr.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"b419bdccbfd95fe07feb7ebd5f0d81056f5cea83","unresolved":false,"context_lines":[{"line_number":620,"context_line":"                processutils.ProcessExecutionError, OSError) as e:"},{"line_number":621,"context_line":"            error_msg \u003d e.stderr"},{"line_number":622,"context_line":"            if (\u0027unable to inform the kernel\u0027 not in error_msg and"},{"line_number":623,"context_line":"                \u0027Device or resource busy\u0027 not in error_msg):"},{"line_number":624,"context_line":"                msg \u003d (_(\u0027Failed to retrieve partition labels on disk \u0027"},{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_7e9b4365","line":623,"in_reply_to":"ffe62b97_d612af58","updated":"2017-04-11 03:10:13.000000000","message":"Thank you for your suggestions. Although the two specific error messages have different meanings. But the action is the same. In addition, we raise exception with the different error messages, users can see the error message to know why executing partprobe meets error.\nWhen calling utils.execute, the stderr is the only info we can determine why we meet error. So I don\u0027t know how to let utils.execute raise the specific exception.\nCan you tell me more? Thank you very much.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"1402e3166a999ca41e0474160e9fe3fbbfc970d8","unresolved":false,"context_lines":[{"line_number":624,"context_line":"                msg \u003d (_(\u0027Failed to retrieve partition labels on disk \u0027"},{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":627,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":628,"context_line":"            LOG.warning(_LW(\u0027Partprobe %(disk)s failed %(times)d times: \u0027"},{"line_number":629,"context_line":"                        \u0027%(error)s (ignored, waiting 60s)\u0027) %"},{"line_number":630,"context_line":"                        {\u0027disk\u0027: device_path, \u0027times\u0027: i, \u0027error\u0027: error_msg})"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_1657f704","line":627,"updated":"2017-03-24 22:07:18.000000000","message":"Shouldn\u0027t there be a retry if device is busy?","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"b419bdccbfd95fe07feb7ebd5f0d81056f5cea83","unresolved":false,"context_lines":[{"line_number":624,"context_line":"                msg \u003d (_(\u0027Failed to retrieve partition labels on disk \u0027"},{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":627,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":628,"context_line":"            LOG.warning(_LW(\u0027Partprobe %(disk)s failed %(times)d times: \u0027"},{"line_number":629,"context_line":"                        \u0027%(error)s (ignored, waiting 60s)\u0027) %"},{"line_number":630,"context_line":"                        {\u0027disk\u0027: device_path, \u0027times\u0027: i, \u0027error\u0027: error_msg})"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_5eb3df98","line":627,"in_reply_to":"ffe62b97_1657f704","updated":"2017-04-11 03:10:13.000000000","message":"Thank you for your suggestion. I think so.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"1402e3166a999ca41e0474160e9fe3fbbfc970d8","unresolved":false,"context_lines":[{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":627,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":628,"context_line":"            LOG.warning(_LW(\u0027Partprobe %(disk)s failed %(times)d times: \u0027"},{"line_number":629,"context_line":"                        \u0027%(error)s (ignored, waiting 60s)\u0027) %"},{"line_number":630,"context_line":"                        {\u0027disk\u0027: device_path, \u0027times\u0027: i, \u0027error\u0027: error_msg})"},{"line_number":631,"context_line":"            time.sleep(60)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_f626d3b7","line":628,"updated":"2017-03-24 22:07:18.000000000","message":"please remove _LW","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"7ca66bccda88bd0f5c50fe1f7f939fc725b86bda","unresolved":false,"context_lines":[{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":627,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":628,"context_line":"            LOG.warning(_LW(\u0027Partprobe %(disk)s failed %(times)d times: \u0027"},{"line_number":629,"context_line":"                        \u0027%(error)s (ignored, waiting 60s)\u0027) %"},{"line_number":630,"context_line":"                        {\u0027disk\u0027: device_path, \u0027times\u0027: i, \u0027error\u0027: error_msg})"},{"line_number":631,"context_line":"            time.sleep(60)"}],"source_content_type":"text/x-python","patch_set":4,"id":"7ffa3b31_0f88d11c","line":628,"in_reply_to":"bff0334d_9eaf277c","updated":"2017-04-18 21:14:20.000000000","message":"We\u0027re in the middle of removing the _L*() macros; the internationalization team isn\u0027t using them any more.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"b419bdccbfd95fe07feb7ebd5f0d81056f5cea83","unresolved":false,"context_lines":[{"line_number":625,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":626,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":627,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":628,"context_line":"            LOG.warning(_LW(\u0027Partprobe %(disk)s failed %(times)d times: \u0027"},{"line_number":629,"context_line":"                        \u0027%(error)s (ignored, waiting 60s)\u0027) %"},{"line_number":630,"context_line":"                        {\u0027disk\u0027: device_path, \u0027times\u0027: i, \u0027error\u0027: error_msg})"},{"line_number":631,"context_line":"            time.sleep(60)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_9eaf277c","line":628,"in_reply_to":"ffe62b97_f626d3b7","updated":"2017-04-11 03:10:13.000000000","message":"Thank you for your suggestion. I saw almost all LOG.warning using _LW. I don\u0027t know in which situation, I should add or remove. Can you tell me? Thank you.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"e65afc62aa176c43974da7a51cd2f74e949e298e","unresolved":false,"context_lines":[{"line_number":637,"context_line":"        LOG.error(msg)"},{"line_number":638,"context_line":"        raise exception.InstanceDeployFailure(msg)"},{"line_number":639,"context_line":"    utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    try:"},{"line_number":642,"context_line":"        # lsblk command"},{"line_number":643,"context_line":"        output, err \u003d utils.execute(\u0027lsblk\u0027, \u0027-Po\u0027, \u0027name,label\u0027, device_path,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ffe62b97_79aa79d2","line":640,"updated":"2017-03-27 16:44:35.000000000","message":"I\u0027m not convinced about the above logic. Why not fail if \u0027udevadm settle\u0027 times out? OR try partprobe once. I\u0027m not sure why we want to call partprobe again if it fails...","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"b419bdccbfd95fe07feb7ebd5f0d81056f5cea83","unresolved":false,"context_lines":[{"line_number":637,"context_line":"        LOG.error(msg)"},{"line_number":638,"context_line":"        raise exception.InstanceDeployFailure(msg)"},{"line_number":639,"context_line":"    utils.execute(\u0027udevadm\u0027, \u0027settle\u0027, \u0027--timeout\u003d600\u0027, run_as_root\u003dTrue)"},{"line_number":640,"context_line":""},{"line_number":641,"context_line":"    try:"},{"line_number":642,"context_line":"        # lsblk command"},{"line_number":643,"context_line":"        output, err \u003d utils.execute(\u0027lsblk\u0027, \u0027-Po\u0027, \u0027name,label\u0027, device_path,"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_3e87fbb7","line":640,"in_reply_to":"ffe62b97_79aa79d2","updated":"2017-04-11 03:10:13.000000000","message":"Thank you for your suggestions.\nWhen I rebuild an baremetal node through \"nova rebuild\", it meets error when ramdisk(IPA) call create_config_drive_partition. The reason is:\n2017-03-05 11:30:00.841 11081 ERROR ironic.drivers.modules.agent [-] node 74f7fd91-83ea-49a6-8e49-8385a02c47df command status errored: {u\u0027message\u0027: u\"Command execution failed: Failed to retrieve partition labels on disk /dev/sda for node 74f7fd91-83ea-49a6-8e49-8385a02c47df. Error: Unexpected error while running command.\\nCommand: partprobe /dev/sda\\nExit code: 1\\nStdout: u\u0027\u0027\\nStderr: u\u0027Error: Partition(s) 1 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.\\\\n\u0027\", u\u0027code\u0027: 500, u\u0027type\u0027: u\u0027CommandExecutionError\u0027, u\u0027details\u0027: u\"Failed to retrieve partition labels on disk /dev/sda for node 74f7fd91-83ea-49a6-8e49-8385a02c47df. Error: Unexpected error while running command.\\nCommand: partprobe /dev/sda\\nExit code: 1\\nStdout: u\u0027\u0027\\nStderr: u\u0027Error: Partition(s) 1 on /dev/sda have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use.  As a result, the old partition(s) will remain in use.  You should reboot now before making further changes.\\\\n\u0027\"}\n\nBut when I login the system and running \"partprobe /dev/sda\", there is no error. So I think if we retry some times when execute \"partprobe /dev/sda\", the rebuild process can continue. I think this code will improve the robustness.\n\nAfter merging these code, I found partprobe meet the same error, but after retry, partprobe works well and can continue distribute the baremetal node.","commit_id":"4b9687b6d93414476e221e787b95ebd04820f536"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8fc919cf30bb7baec608ffdddc01cf6e15010079","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    cfg.IntOpt(\u0027partprobe_retry_attempts\u0027,"},{"line_number":62,"context_line":"               default\u003d3,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027executing is successful, sleeping 60 second \u0027"},{"line_number":65,"context_line":"                    \u0027between attempts.\u0027),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_80d6f6f0","line":64,"updated":"2017-04-18 21:10:15.000000000","message":"s/second/seconds/","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    cfg.IntOpt(\u0027partprobe_retry_attempts\u0027,"},{"line_number":62,"context_line":"               default\u003d3,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027executing is successful, sleeping 60 second \u0027"},{"line_number":65,"context_line":"                    \u0027between attempts.\u0027),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_e7de9bd8","line":64,"in_reply_to":"7ffa3b31_80d6f6f0","updated":"2017-04-21 01:40:53.000000000","message":"Thx, it is my mistake","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c52f7ca11e9efbe8e200419780fab64a38924b42","unresolved":false,"context_lines":[{"line_number":568,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":569,"context_line":"            LOG.error(_LE(\"Failed to detect %s\"), part)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"    return uuids_to_return"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":""},{"line_number":574,"context_line":"def list_opts():"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_cfcb0970","line":571,"updated":"2017-04-18 21:14:13.000000000","message":"Vlad asked about maybe waiting here, in patch set 4. What do you think?","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":568,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":569,"context_line":"            LOG.error(_LE(\"Failed to detect %s\"), part)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"    return uuids_to_return"},{"line_number":572,"context_line":""},{"line_number":573,"context_line":""},{"line_number":574,"context_line":"def list_opts():"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_6a0b7223","line":571,"in_reply_to":"7ffa3b31_cfcb0970","updated":"2017-04-21 01:40:53.000000000","message":"thx, you mean wait in def work_on_disk() function?","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8fc919cf30bb7baec608ffdddc01cf6e15010079","unresolved":false,"context_lines":[{"line_number":613,"context_line":"    :returns: block device file for partition if it exists; otherwise it"},{"line_number":614,"context_line":"              returns None."},{"line_number":615,"context_line":"    \"\"\""},{"line_number":616,"context_line":"    partprobe_ok \u003d False"},{"line_number":617,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":618,"context_line":"    attempts \u003d CONF.disk_utils.partprobe_retry_attempts"},{"line_number":619,"context_line":"    for attempt in range(attempts):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_639c14c0","line":616,"updated":"2017-04-18 21:10:15.000000000","message":"I looked at this a bit more. \u0027partprobe\u0027 is called in other places besides this method, see L128, L718.\n\nIf this is really an issue with partprobe not always succeeding, maybe your fix should be in a separate method that is used in all the places where we use \u0027partprobe\u0027 now.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"69681192f64a5a7ac2ebf84816a5d11c67c540c1","unresolved":false,"context_lines":[{"line_number":613,"context_line":"    :returns: block device file for partition if it exists; otherwise it"},{"line_number":614,"context_line":"              returns None."},{"line_number":615,"context_line":"    \"\"\""},{"line_number":616,"context_line":"    partprobe_ok \u003d False"},{"line_number":617,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":618,"context_line":"    attempts \u003d CONF.disk_utils.partprobe_retry_attempts"},{"line_number":619,"context_line":"    for attempt in range(attempts):"}],"source_content_type":"text/x-python","patch_set":6,"id":"5ff73747_0ee6e945","line":616,"in_reply_to":"7ffa3b31_2a3a0acb","updated":"2017-04-24 06:09:28.000000000","message":"I have seen the ironic-lib code, partprobe will be called in 3 positions.\n1. in count_mbr_partitions\noutput, err \u003d utils.execute(\u0027partprobe\u0027, \u0027-d\u0027, \u0027-s\u0027, device,\n                                run_as_root\u003dTrue, use_standard_locale\u003dTrue)\nCall partprobe -d -s /dev/sda could not meet any error. Because -d means --dry-run, it will not update the kernel. So will not meet error.\nSo, I think, we possible do not change the code.\n\n2. in _fix_gpt_structs\nthis fucnion maybe meet error. But the most important thing is that partprobe execute with error will raise an exception. So:\n        output, err \u003d utils.execute(\u0027partprobe\u0027, device,\n                                    use_standard_locale\u003dTrue,\n                                    run_as_root\u003dTrue)\n        err should not be assigned when executing meet error. So I think this is a bug.\n\n3. in _get_labelled_partition\nthis is what I changed.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":613,"context_line":"    :returns: block device file for partition if it exists; otherwise it"},{"line_number":614,"context_line":"              returns None."},{"line_number":615,"context_line":"    \"\"\""},{"line_number":616,"context_line":"    partprobe_ok \u003d False"},{"line_number":617,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":618,"context_line":"    attempts \u003d CONF.disk_utils.partprobe_retry_attempts"},{"line_number":619,"context_line":"    for attempt in range(attempts):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_2a3a0acb","line":616,"in_reply_to":"7ffa3b31_639c14c0","updated":"2017-04-21 01:40:53.000000000","message":"thx, This is a good suggestion. I will modify.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c52f7ca11e9efbe8e200419780fab64a38924b42","unresolved":false,"context_lines":[{"line_number":614,"context_line":"              returns None."},{"line_number":615,"context_line":"    \"\"\""},{"line_number":616,"context_line":"    partprobe_ok \u003d False"},{"line_number":617,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":618,"context_line":"    attempts \u003d CONF.disk_utils.partprobe_retry_attempts"},{"line_number":619,"context_line":"    for attempt in range(attempts):"},{"line_number":620,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_8f9aa16b","line":617,"updated":"2017-04-18 21:14:13.000000000","message":"wrt Joanna\u0027s comment in patch set 4. This should just be set to an empty string. In fact, if you do what I suggested and follow how it is done in is_block_device(), we won\u0027t need this variable at all I think.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":614,"context_line":"              returns None."},{"line_number":615,"context_line":"    \"\"\""},{"line_number":616,"context_line":"    partprobe_ok \u003d False"},{"line_number":617,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":618,"context_line":"    attempts \u003d CONF.disk_utils.partprobe_retry_attempts"},{"line_number":619,"context_line":"    for attempt in range(attempts):"},{"line_number":620,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_ca85e65b","line":617,"in_reply_to":"7ffa3b31_8f9aa16b","updated":"2017-04-21 01:40:53.000000000","message":"Done","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8fc919cf30bb7baec608ffdddc01cf6e15010079","unresolved":false,"context_lines":[{"line_number":617,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":618,"context_line":"    attempts \u003d CONF.disk_utils.partprobe_retry_attempts"},{"line_number":619,"context_line":"    for attempt in range(attempts):"},{"line_number":620,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027)"},{"line_number":621,"context_line":"        try:"},{"line_number":622,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"},{"line_number":623,"context_line":"            partprobe_ok \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_143fc8d6","line":620,"updated":"2017-04-18 21:10:15.000000000","message":"I feel like this should be done wherever we\u0027ve made changes that require us to wait for this. It seems odd to be doing it here, where it is just \u0027getting\u0027 information. Wondering if we should add a comment as to why we\u0027re doing this.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":617,"context_line":"    error_msg \u003d \u0027unknown error\u0027"},{"line_number":618,"context_line":"    attempts \u003d CONF.disk_utils.partprobe_retry_attempts"},{"line_number":619,"context_line":"    for attempt in range(attempts):"},{"line_number":620,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027)"},{"line_number":621,"context_line":"        try:"},{"line_number":622,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"},{"line_number":623,"context_line":"            partprobe_ok \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_aa8a9a66","line":620,"in_reply_to":"7ffa3b31_143fc8d6","updated":"2017-04-21 01:40:53.000000000","message":"Done","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8fc919cf30bb7baec608ffdddc01cf6e15010079","unresolved":false,"context_lines":[{"line_number":619,"context_line":"    for attempt in range(attempts):"},{"line_number":620,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027)"},{"line_number":621,"context_line":"        try:"},{"line_number":622,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"},{"line_number":623,"context_line":"            partprobe_ok \u003d True"},{"line_number":624,"context_line":"            break"},{"line_number":625,"context_line":"        except (processutils.UnknownArgumentError,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_235bacf7","line":622,"updated":"2017-04-18 21:10:15.000000000","message":"i think if you are going to be checking for certain strings (L628 below), then we should add use_standard_locale\u003dTrue here. Otherwise the strings may not match.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":619,"context_line":"    for attempt in range(attempts):"},{"line_number":620,"context_line":"        utils.execute(\u0027udevadm\u0027, \u0027settle\u0027)"},{"line_number":621,"context_line":"        try:"},{"line_number":622,"context_line":"            utils.execute(\u0027partprobe\u0027, device_path, run_as_root\u003dTrue)"},{"line_number":623,"context_line":"            partprobe_ok \u003d True"},{"line_number":624,"context_line":"            break"},{"line_number":625,"context_line":"        except (processutils.UnknownArgumentError,"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_ea8b0265","line":622,"in_reply_to":"7ffa3b31_235bacf7","updated":"2017-04-21 01:40:53.000000000","message":"Done","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8fc919cf30bb7baec608ffdddc01cf6e15010079","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            partprobe_ok \u003d True"},{"line_number":624,"context_line":"            break"},{"line_number":625,"context_line":"        except (processutils.UnknownArgumentError,"},{"line_number":626,"context_line":"                processutils.ProcessExecutionError, OSError) as e:"},{"line_number":627,"context_line":"            error_msg \u003d e.stderr"},{"line_number":628,"context_line":"            if (\u0027unable to inform the kernel\u0027 not in error_msg and"},{"line_number":629,"context_line":"                \u0027Device or resource busy\u0027 not in error_msg):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_8369608c","line":626,"updated":"2017-04-18 21:10:15.000000000","message":"We should separate this. I doubt that you\u0027ll get the error you\u0027re interested in, from UnknownArgumentError. It looks like you are interested in processutils.UnknownArgumentError.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":623,"context_line":"            partprobe_ok \u003d True"},{"line_number":624,"context_line":"            break"},{"line_number":625,"context_line":"        except (processutils.UnknownArgumentError,"},{"line_number":626,"context_line":"                processutils.ProcessExecutionError, OSError) as e:"},{"line_number":627,"context_line":"            error_msg \u003d e.stderr"},{"line_number":628,"context_line":"            if (\u0027unable to inform the kernel\u0027 not in error_msg and"},{"line_number":629,"context_line":"                \u0027Device or resource busy\u0027 not in error_msg):"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_4ac79697","line":626,"in_reply_to":"7ffa3b31_8369608c","updated":"2017-04-21 01:40:53.000000000","message":"thx, to tell the truth, I just copy these two lines from L654,L655. I will think twice about it.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8fc919cf30bb7baec608ffdddc01cf6e15010079","unresolved":false,"context_lines":[{"line_number":625,"context_line":"        except (processutils.UnknownArgumentError,"},{"line_number":626,"context_line":"                processutils.ProcessExecutionError, OSError) as e:"},{"line_number":627,"context_line":"            error_msg \u003d e.stderr"},{"line_number":628,"context_line":"            if (\u0027unable to inform the kernel\u0027 not in error_msg and"},{"line_number":629,"context_line":"                \u0027Device or resource busy\u0027 not in error_msg):"},{"line_number":630,"context_line":"                msg \u003d (_(\u0027Failed to retrieve partition labels on disk \u0027"},{"line_number":631,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_cfe2e901","line":628,"updated":"2017-04-18 21:10:15.000000000","message":"I have to say, I did a quick google search for this error. I didn\u0027t see any (I could have missed) where someone said that if you get this error, just retry because it might go away. \n\nIt makes me wonder if there is something wrong (or we could improve better) elsewhere in our code, before this method is called.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":625,"context_line":"        except (processutils.UnknownArgumentError,"},{"line_number":626,"context_line":"                processutils.ProcessExecutionError, OSError) as e:"},{"line_number":627,"context_line":"            error_msg \u003d e.stderr"},{"line_number":628,"context_line":"            if (\u0027unable to inform the kernel\u0027 not in error_msg and"},{"line_number":629,"context_line":"                \u0027Device or resource busy\u0027 not in error_msg):"},{"line_number":630,"context_line":"                msg \u003d (_(\u0027Failed to retrieve partition labels on disk \u0027"},{"line_number":631,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_2ad9eaf1","line":628,"in_reply_to":"7ffa3b31_cfe2e901","updated":"2017-04-21 01:40:53.000000000","message":"Thx, I will analyse the problem deeper. And find why thess situation will happen.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8fc919cf30bb7baec608ffdddc01cf6e15010079","unresolved":false,"context_lines":[{"line_number":634,"context_line":"            LOG.warning((\u0027Partprobe %(disk)s failed %(times)d times: \u0027"},{"line_number":635,"context_line":"                        \u0027%(error)s (ignored, waiting 60s)\u0027) %"},{"line_number":636,"context_line":"                        {\u0027disk\u0027: device_path, \u0027times\u0027: attempt + 1,"},{"line_number":637,"context_line":"                        \u0027error\u0027: error_msg})"},{"line_number":638,"context_line":"            time.sleep(60)"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"    if not partprobe_ok:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_4f3b799b","line":637,"updated":"2017-04-18 21:10:15.000000000","message":"I question whether we want to LOG a warning each time, and then an error if it completely fails. The message is pretty much the same. I took a look in this file, see is_block_device(). I think we might as well use a similar pattern.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":634,"context_line":"            LOG.warning((\u0027Partprobe %(disk)s failed %(times)d times: \u0027"},{"line_number":635,"context_line":"                        \u0027%(error)s (ignored, waiting 60s)\u0027) %"},{"line_number":636,"context_line":"                        {\u0027disk\u0027: device_path, \u0027times\u0027: attempt + 1,"},{"line_number":637,"context_line":"                        \u0027error\u0027: error_msg})"},{"line_number":638,"context_line":"            time.sleep(60)"},{"line_number":639,"context_line":""},{"line_number":640,"context_line":"    if not partprobe_ok:"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_aaa73abd","line":637,"in_reply_to":"7ffa3b31_4f3b799b","updated":"2017-04-21 01:40:53.000000000","message":"thx, in the function def is_block_device(dev):\ndef is_block_device(dev):\n    \"\"\"Check whether a device is block or not.\"\"\"\n    attempts \u003d CONF.disk_utils.iscsi_verify_attempts\n    for attempt in range(attempts):\n        try:\n            s \u003d os.stat(dev)\n        except OSError as e:\n            # use debug, and print everytime in the loop\n            LOG.debug(\"Unable to stat device %(dev)s. Attempt %(attempt)d \"\n                      \"out of %(total)d. Error: %(err)s\",\n                      {\"dev\": dev, \"attempt\": attempt + 1,\n                       \"total\": attempts, \"err\": e})\n            time.sleep(1)\n        else:\n            return stat.S_ISBLK(s.st_mode)\n    #if failed, use LOG.error to print, and then raise an exception\n    msg \u003d _(\"Unable to stat device %(dev)s after attempting to verify \"\n            \"%(attempts)d times.\") % {\u0027dev\u0027: dev, \u0027attempts\u0027: attempts}\n    LOG.error(msg)\n    raise exception.InstanceDeployFailure(msg)\n\nin _get_labelled_partition, I think the position and the timing using LOG to print is OK, but I think I shoud express more effective.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8fc919cf30bb7baec608ffdddc01cf6e15010079","unresolved":false,"context_lines":[{"line_number":643,"context_line":"               {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: error_msg})"},{"line_number":644,"context_line":"        LOG.error(msg)"},{"line_number":645,"context_line":"        raise exception.InstanceDeployFailure(msg)"},{"line_number":646,"context_line":"    utils.execute(\u0027udevadm\u0027, \u0027settle\u0027)"},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"    try:"},{"line_number":649,"context_line":"        # lsblk command"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_ef4b6528","line":646,"updated":"2017-04-18 21:10:15.000000000","message":"I don\u0027t see why we want to do this. L620 does it, and partprobe succeeded. Is this in case something happened outside of ironic\u0027s control?","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":643,"context_line":"               {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: error_msg})"},{"line_number":644,"context_line":"        LOG.error(msg)"},{"line_number":645,"context_line":"        raise exception.InstanceDeployFailure(msg)"},{"line_number":646,"context_line":"    utils.execute(\u0027udevadm\u0027, \u0027settle\u0027)"},{"line_number":647,"context_line":""},{"line_number":648,"context_line":"    try:"},{"line_number":649,"context_line":"        # lsblk command"}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_2a932a5d","line":646,"in_reply_to":"7ffa3b31_ef4b6528","updated":"2017-04-21 01:40:53.000000000","message":"Done","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"8fc919cf30bb7baec608ffdddc01cf6e15010079","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            processutils.ProcessExecutionError, OSError) as e:"},{"line_number":656,"context_line":"        msg \u003d (_(\u0027Failed to retrieve partition labels on disk %(disk)s \u0027"},{"line_number":657,"context_line":"                 \u0027for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":658,"context_line":"               {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":659,"context_line":"        LOG.error(msg)"},{"line_number":660,"context_line":"        raise exception.InstanceDeployFailure(msg)"},{"line_number":661,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_6f2f553f","line":658,"updated":"2017-04-18 21:10:15.000000000","message":"This string has been copied three? times; might be worth thinking of not copying that many times.","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"1d7795b3b0611c8659ff36eccc44ddfc97814333","unresolved":false,"context_lines":[{"line_number":655,"context_line":"            processutils.ProcessExecutionError, OSError) as e:"},{"line_number":656,"context_line":"        msg \u003d (_(\u0027Failed to retrieve partition labels on disk %(disk)s \u0027"},{"line_number":657,"context_line":"                 \u0027for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":658,"context_line":"               {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":659,"context_line":"        LOG.error(msg)"},{"line_number":660,"context_line":"        raise exception.InstanceDeployFailure(msg)"},{"line_number":661,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"7ffa3b31_0a9cee67","line":658,"in_reply_to":"7ffa3b31_6f2f553f","updated":"2017-04-21 01:40:53.000000000","message":"Done","commit_id":"91f899d458f4c356372924d68f93f065255de58c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a6cd23a0c513797e84f009ea97ccb7cfc5a10b4d","unresolved":false,"context_lines":[{"line_number":621,"context_line":"                          use_standard_locale\u003dTrue)"},{"line_number":622,"context_line":"            partprobe_ok \u003d True"},{"line_number":623,"context_line":"            break"},{"line_number":624,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":625,"context_line":"            error_msg \u003d e.stderr"},{"line_number":626,"context_line":"            if \u0027unable to inform the kernel\u0027 not in error_msg:"},{"line_number":627,"context_line":"                msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"5ff73747_ca067787","line":624,"updated":"2017-04-25 16:11:14.000000000","message":"The original code also catches UnknownArgumentError and OSError. Now it doesn\u0027t. Is that OK?","commit_id":"854d311b3c129f2cb93afd872eec2db18fbba3f8"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"ee5f7d21c30fa52db7f78285a972626f6b746d55","unresolved":false,"context_lines":[{"line_number":621,"context_line":"                          use_standard_locale\u003dTrue)"},{"line_number":622,"context_line":"            partprobe_ok \u003d True"},{"line_number":623,"context_line":"            break"},{"line_number":624,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":625,"context_line":"            error_msg \u003d e.stderr"},{"line_number":626,"context_line":"            if \u0027unable to inform the kernel\u0027 not in error_msg:"},{"line_number":627,"context_line":"                msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"5ff73747_71d50543","line":624,"in_reply_to":"5ff73747_ca067787","updated":"2017-04-26 03:00:28.000000000","message":"Thx, I originally think, OSError and  UnknownArgument should not happen. But I think it is necessery to\ncatch the exception when partprobe is not exist in some ramdisk opration system.","commit_id":"854d311b3c129f2cb93afd872eec2db18fbba3f8"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"3629a2e2e6f03cdc600421680d91b22cd248d45e","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    cfg.IntOpt(\u0027partprobe_retry_attempts\u0027,"},{"line_number":62,"context_line":"               default\u003d3,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027executing is successful, sleeping 60 seconds \u0027"},{"line_number":65,"context_line":"                    \u0027between attempts.\u0027),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"df3967d1_31078785","line":64,"range":{"start_line":64,"start_character":21,"end_line":64,"end_character":44},"updated":"2017-08-02 06:46:59.000000000","message":"Better to change it to::\n  Maximum attempts to execute partprobe to ensure the kernel was informed of the partition ...\nor similar. Thoughts?","commit_id":"100254129d0dcacef8f3a043796482d0644a55f3"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"3629a2e2e6f03cdc600421680d91b22cd248d45e","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    cfg.IntOpt(\u0027partprobe_retry_attempts\u0027,"},{"line_number":62,"context_line":"               default\u003d3,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027executing is successful, sleeping 60 seconds \u0027"},{"line_number":65,"context_line":"                    \u0027between attempts.\u0027),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"df3967d1_d1b95be9","line":64,"range":{"start_line":64,"start_character":55,"end_line":64,"end_character":65},"updated":"2017-08-02 06:46:59.000000000","message":"What is the factor to assume 60 seconds interval between attempts?","commit_id":"100254129d0dcacef8f3a043796482d0644a55f3"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"ffc2c94d14ba0bedaf293245c09318ee7e65f0df","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    cfg.IntOpt(\u0027partprobe_retry_attempts\u0027,"},{"line_number":62,"context_line":"               default\u003d3,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027executing is successful, sleeping 60 seconds \u0027"},{"line_number":65,"context_line":"                    \u0027between attempts.\u0027),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"df3967d1_d1703bdf","line":64,"range":{"start_line":64,"start_character":21,"end_line":64,"end_character":44},"in_reply_to":"df3967d1_31078785","updated":"2017-08-02 07:00:17.000000000","message":"Done","commit_id":"100254129d0dcacef8f3a043796482d0644a55f3"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"ffc2c94d14ba0bedaf293245c09318ee7e65f0df","unresolved":false,"context_lines":[{"line_number":61,"context_line":"    cfg.IntOpt(\u0027partprobe_retry_attempts\u0027,"},{"line_number":62,"context_line":"               default\u003d3,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027executing is successful, sleeping 60 seconds \u0027"},{"line_number":65,"context_line":"                    \u0027between attempts.\u0027),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"df3967d1_71086f2b","line":64,"range":{"start_line":64,"start_character":55,"end_line":64,"end_character":65},"in_reply_to":"df3967d1_d1b95be9","updated":"2017-08-02 07:00:17.000000000","message":"I test sleeping 10s, 20s, 40s, 60s. 10s, 20s sometimes also meet error and after 2 times retry, it\u0027s OK. when  sleep 40s or 60s, it is OK in the first time. So I think 60s is more reliable than others.","commit_id":"100254129d0dcacef8f3a043796482d0644a55f3"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"3629a2e2e6f03cdc600421680d91b22cd248d45e","unresolved":false,"context_lines":[{"line_number":641,"context_line":"            error_msg \u003d e.stderr"},{"line_number":642,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":643,"context_line":"                     \u0027%(disk)s for node %(node)s. Because partprobe \u0027"},{"line_number":644,"context_line":"                     \u0027is not exist or other unknown reasons \u0027"},{"line_number":645,"context_line":"                     \u0027Error: %(error)s\u0027) %"},{"line_number":646,"context_line":"                   {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":647,"context_line":"            raise exception.InstanceDeployFailure(msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"df3967d1_51444bb7","line":644,"updated":"2017-08-02 06:46:59.000000000","message":"\u0027.\u0027 is missing.","commit_id":"100254129d0dcacef8f3a043796482d0644a55f3"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"ffc2c94d14ba0bedaf293245c09318ee7e65f0df","unresolved":false,"context_lines":[{"line_number":641,"context_line":"            error_msg \u003d e.stderr"},{"line_number":642,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":643,"context_line":"                     \u0027%(disk)s for node %(node)s. Because partprobe \u0027"},{"line_number":644,"context_line":"                     \u0027is not exist or other unknown reasons \u0027"},{"line_number":645,"context_line":"                     \u0027Error: %(error)s\u0027) %"},{"line_number":646,"context_line":"                   {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":647,"context_line":"            raise exception.InstanceDeployFailure(msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"df3967d1_04031f0f","line":644,"in_reply_to":"df3967d1_51444bb7","updated":"2017-08-02 07:00:17.000000000","message":"Done","commit_id":"100254129d0dcacef8f3a043796482d0644a55f3"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b454b3908370037ad25559ef113ee6212f9ab240","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":629,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":630,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":631,"context_line":"            LOG.debug((\u0027Failed to notice kernel to sync partitions \u0027"},{"line_number":632,"context_line":"                       \u0027tables on disk %(disk)s for node %(node)s. \u0027"},{"line_number":633,"context_line":"                       \u0027Error: %(error)s. It is not fatal error, \u0027"},{"line_number":634,"context_line":"                       \u0027you can ignore it. (The %(times)d/%(totals)d \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_784f0734","line":631,"updated":"2017-08-03 07:02:33.000000000","message":"s/notice/notify/ (or inform)\n\nalso let\u0027s make it a warning","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"80d9844765f9995087a28fc1d54b30873e336f90","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":629,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":630,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":631,"context_line":"            LOG.debug((\u0027Failed to notice kernel to sync partitions \u0027"},{"line_number":632,"context_line":"                       \u0027tables on disk %(disk)s for node %(node)s. \u0027"},{"line_number":633,"context_line":"                       \u0027Error: %(error)s. It is not fatal error, \u0027"},{"line_number":634,"context_line":"                       \u0027you can ignore it. (The %(times)d/%(totals)d \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_0c12f409","line":631,"in_reply_to":"df3967d1_2eb6d08b","updated":"2017-08-03 11:52:36.000000000","message":"If it really happens often, then we can leave it as debug, yes","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"5e9f5d19a1fc62c1b3b90a96ede4d4490616dcc1","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":629,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":630,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":631,"context_line":"            LOG.debug((\u0027Failed to notice kernel to sync partitions \u0027"},{"line_number":632,"context_line":"                       \u0027tables on disk %(disk)s for node %(node)s. \u0027"},{"line_number":633,"context_line":"                       \u0027Error: %(error)s. It is not fatal error, \u0027"},{"line_number":634,"context_line":"                       \u0027you can ignore it. (The %(times)d/%(totals)d \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_2eb6d08b","line":631,"in_reply_to":"df3967d1_784f0734","updated":"2017-08-03 11:50:41.000000000","message":"Thank you for your advices, But I think it\u0027s not a real warning. We know it will happen very often. So maybe debug is OK. Do you agree?","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b454b3908370037ad25559ef113ee6212f9ab240","unresolved":false,"context_lines":[{"line_number":631,"context_line":"            LOG.debug((\u0027Failed to notice kernel to sync partitions \u0027"},{"line_number":632,"context_line":"                       \u0027tables on disk %(disk)s for node %(node)s. \u0027"},{"line_number":633,"context_line":"                       \u0027Error: %(error)s. It is not fatal error, \u0027"},{"line_number":634,"context_line":"                       \u0027you can ignore it. (The %(times)d/%(totals)d \u0027"},{"line_number":635,"context_line":"                       \u0027times. Retry after 60s)\u0027) %"},{"line_number":636,"context_line":"                      {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid,"},{"line_number":637,"context_line":"                       \u0027error\u0027: error_msg, \u0027times\u0027: attempt + 1,"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_586203b0","line":634,"updated":"2017-08-03 07:02:33.000000000","message":"nit: this sentence is not needed, the logging level is supposed to indicate whether it\u0027s fatal or not. warnings are by definition not fatal","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"5e9f5d19a1fc62c1b3b90a96ede4d4490616dcc1","unresolved":false,"context_lines":[{"line_number":631,"context_line":"            LOG.debug((\u0027Failed to notice kernel to sync partitions \u0027"},{"line_number":632,"context_line":"                       \u0027tables on disk %(disk)s for node %(node)s. \u0027"},{"line_number":633,"context_line":"                       \u0027Error: %(error)s. It is not fatal error, \u0027"},{"line_number":634,"context_line":"                       \u0027you can ignore it. (The %(times)d/%(totals)d \u0027"},{"line_number":635,"context_line":"                       \u0027times. Retry after 60s)\u0027) %"},{"line_number":636,"context_line":"                      {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid,"},{"line_number":637,"context_line":"                       \u0027error\u0027: error_msg, \u0027times\u0027: attempt + 1,"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_0ebb0c72","line":634,"in_reply_to":"df3967d1_586203b0","updated":"2017-08-03 11:50:41.000000000","message":"Done","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b454b3908370037ad25559ef113ee6212f9ab240","unresolved":false,"context_lines":[{"line_number":636,"context_line":"                      {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid,"},{"line_number":637,"context_line":"                       \u0027error\u0027: error_msg, \u0027times\u0027: attempt + 1,"},{"line_number":638,"context_line":"                       \u0027totals\u0027: attempts})"},{"line_number":639,"context_line":"            time.sleep(60)"},{"line_number":640,"context_line":"        except (processutils.UnknownArgumentError, OSError) as e:"},{"line_number":641,"context_line":"            error_msg \u003d e.stderr"},{"line_number":642,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_38673fc0","line":639,"updated":"2017-08-03 07:02:33.000000000","message":"60 seems an overkill here. I suggest making it configurable and defaulting to something smaller, e.g. 5. you can bump the retry number to keep the overall timeout the same.","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"5e9f5d19a1fc62c1b3b90a96ede4d4490616dcc1","unresolved":false,"context_lines":[{"line_number":636,"context_line":"                      {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid,"},{"line_number":637,"context_line":"                       \u0027error\u0027: error_msg, \u0027times\u0027: attempt + 1,"},{"line_number":638,"context_line":"                       \u0027totals\u0027: attempts})"},{"line_number":639,"context_line":"            time.sleep(60)"},{"line_number":640,"context_line":"        except (processutils.UnknownArgumentError, OSError) as e:"},{"line_number":641,"context_line":"            error_msg \u003d e.stderr"},{"line_number":642,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_6ec058e2","line":639,"in_reply_to":"df3967d1_38673fc0","updated":"2017-08-03 11:50:41.000000000","message":"Thx, you mean we can make the sleeping intervals smaller than 60 and can retry larger times.\nI think maybe it\u0027s a better solution.","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b454b3908370037ad25559ef113ee6212f9ab240","unresolved":false,"context_lines":[{"line_number":641,"context_line":"            error_msg \u003d e.stderr"},{"line_number":642,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":643,"context_line":"                     \u0027%(disk)s for node %(node)s. Because partprobe \u0027"},{"line_number":644,"context_line":"                     \u0027is not exist or other unknown reasons. \u0027"},{"line_number":645,"context_line":"                     \u0027Error: %(error)s\u0027) %"},{"line_number":646,"context_line":"                   {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":647,"context_line":"            raise exception.InstanceDeployFailure(msg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_1858fbf7","line":644,"updated":"2017-08-03 07:02:33.000000000","message":"s/is/does/ s/other unknown/for other unexpected/","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"5e9f5d19a1fc62c1b3b90a96ede4d4490616dcc1","unresolved":false,"context_lines":[{"line_number":641,"context_line":"            error_msg \u003d e.stderr"},{"line_number":642,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":643,"context_line":"                     \u0027%(disk)s for node %(node)s. Because partprobe \u0027"},{"line_number":644,"context_line":"                     \u0027is not exist or other unknown reasons. \u0027"},{"line_number":645,"context_line":"                     \u0027Error: %(error)s\u0027) %"},{"line_number":646,"context_line":"                   {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":647,"context_line":"            raise exception.InstanceDeployFailure(msg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_eeb32897","line":644,"in_reply_to":"df3967d1_1858fbf7","updated":"2017-08-03 11:50:41.000000000","message":"Done","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b454b3908370037ad25559ef113ee6212f9ab240","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        msg \u003d (_(\u0027Have tried %(times)d times to inform the \u0027"},{"line_number":651,"context_line":"                 \u0027kernel to reload the partitions information \u0027"},{"line_number":652,"context_line":"                 \u0027on disk %(disk)s for node %(node)s. \u0027"},{"line_number":653,"context_line":"                 \u0027But all attempts failed. Error: %(error)s\u0027) %"},{"line_number":654,"context_line":"               {\u0027times\u0027: attempts, \u0027disk\u0027: device_path,"},{"line_number":655,"context_line":"                \u0027node\u0027: node_uuid, \u0027error\u0027: error_msg})"},{"line_number":656,"context_line":"        LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_f85c17ee","line":653,"updated":"2017-08-03 07:02:33.000000000","message":"\"Failed to reload the partition information on disk %(disk)s for node %(node)s after %(times)d attempts. Error: %(error)s","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"5e9f5d19a1fc62c1b3b90a96ede4d4490616dcc1","unresolved":false,"context_lines":[{"line_number":650,"context_line":"        msg \u003d (_(\u0027Have tried %(times)d times to inform the \u0027"},{"line_number":651,"context_line":"                 \u0027kernel to reload the partitions information \u0027"},{"line_number":652,"context_line":"                 \u0027on disk %(disk)s for node %(node)s. \u0027"},{"line_number":653,"context_line":"                 \u0027But all attempts failed. Error: %(error)s\u0027) %"},{"line_number":654,"context_line":"               {\u0027times\u0027: attempts, \u0027disk\u0027: device_path,"},{"line_number":655,"context_line":"                \u0027node\u0027: node_uuid, \u0027error\u0027: error_msg})"},{"line_number":656,"context_line":"        LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":10,"id":"df3967d1_ceb0648d","line":653,"in_reply_to":"df3967d1_f85c17ee","updated":"2017-08-03 11:50:41.000000000","message":"Done","commit_id":"9489a1bd1a9a807f2e006ad3d3a994c450896b89"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"a26eea0182f6edb2cfe67bebb371f919b747630f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"               default\u003d30,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027the kernel was informed of the partition, sleeping \u0027"},{"line_number":65,"context_line":"                    \u00276 seconds between attempts.\u0027),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf3e73b7_fb8ebf2c","line":65,"updated":"2017-08-07 15:21:08.000000000","message":"nit: would it make sense to make sleeping time also configurable?\nOr may be make the delay increasing over attemptsm if there is a chance thatt 6 secs is not always enough...?","commit_id":"27d0bf6607f74809f62dd5ab381ccc53afc2f420"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"fd17b8f75205a5d83a5865245be1c6f3c180a6fe","unresolved":false,"context_lines":[{"line_number":62,"context_line":"               default\u003d30,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027the kernel was informed of the partition, sleeping \u0027"},{"line_number":65,"context_line":"                    \u00276 seconds between attempts.\u0027),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_b5f2a899","line":65,"in_reply_to":"bf3e73b7_fb8ebf2c","updated":"2017-08-08 02:54:20.000000000","message":"Thx, some reviewers think we should add sleeping time also. it is good idea, but I think ironic_lib is sample than other projects, maybe two configurations are too many.","commit_id":"27d0bf6607f74809f62dd5ab381ccc53afc2f420"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"a26eea0182f6edb2cfe67bebb371f919b747630f","unresolved":false,"context_lines":[{"line_number":622,"context_line":"            partprobe_ok \u003d True"},{"line_number":623,"context_line":"            break"},{"line_number":624,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":625,"context_line":"            error_msg \u003d e.stderr"},{"line_number":626,"context_line":"            if \u0027unable to inform the kernel\u0027 not in error_msg:"},{"line_number":627,"context_line":"                msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":628,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf3e73b7_db83fb03","line":625,"updated":"2017-08-07 15:21:08.000000000","message":"`error_msg` can be moved below this condition (as it won\u0027t be used if condition yields True) or eliminated completely (like it is at the other places in the code).","commit_id":"27d0bf6607f74809f62dd5ab381ccc53afc2f420"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"fd17b8f75205a5d83a5865245be1c6f3c180a6fe","unresolved":false,"context_lines":[{"line_number":622,"context_line":"            partprobe_ok \u003d True"},{"line_number":623,"context_line":"            break"},{"line_number":624,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":625,"context_line":"            error_msg \u003d e.stderr"},{"line_number":626,"context_line":"            if \u0027unable to inform the kernel\u0027 not in error_msg:"},{"line_number":627,"context_line":"                msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":628,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_b54e28bf","line":625,"in_reply_to":"bf3e73b7_db83fb03","updated":"2017-08-08 02:54:20.000000000","message":"Thx, line 631 also use the error_msg, so it\u0027s better not move the sentance.","commit_id":"27d0bf6607f74809f62dd5ab381ccc53afc2f420"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"a26eea0182f6edb2cfe67bebb371f919b747630f","unresolved":false,"context_lines":[{"line_number":637,"context_line":"                       \u0027totals\u0027: attempts})"},{"line_number":638,"context_line":"            time.sleep(6)"},{"line_number":639,"context_line":"        except (processutils.UnknownArgumentError, OSError) as e:"},{"line_number":640,"context_line":"            error_msg \u003d e.stderr"},{"line_number":641,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":642,"context_line":"                     \u0027%(disk)s for node %(node)s. Because partprobe \u0027"},{"line_number":643,"context_line":"                     \u0027does not exist or for other unexcepted reasons. \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf3e73b7_bb88371f","line":640,"updated":"2017-08-07 15:21:08.000000000","message":"Is `error_msg` used here?","commit_id":"27d0bf6607f74809f62dd5ab381ccc53afc2f420"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"fd17b8f75205a5d83a5865245be1c6f3c180a6fe","unresolved":false,"context_lines":[{"line_number":637,"context_line":"                       \u0027totals\u0027: attempts})"},{"line_number":638,"context_line":"            time.sleep(6)"},{"line_number":639,"context_line":"        except (processutils.UnknownArgumentError, OSError) as e:"},{"line_number":640,"context_line":"            error_msg \u003d e.stderr"},{"line_number":641,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":642,"context_line":"                     \u0027%(disk)s for node %(node)s. Because partprobe \u0027"},{"line_number":643,"context_line":"                     \u0027does not exist or for other unexcepted reasons. \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f436f4f_75c68019","line":640,"in_reply_to":"bf3e73b7_bb88371f","updated":"2017-08-08 02:54:20.000000000","message":"Done","commit_id":"27d0bf6607f74809f62dd5ab381ccc53afc2f420"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a9afb6482a7cf71e44f7a15cadf811ac88fd1f1f","unresolved":false,"context_lines":[{"line_number":58,"context_line":"               default\u003d3,"},{"line_number":59,"context_line":"               help\u003d\u0027Maximum attempts to verify an iSCSI connection is \u0027"},{"line_number":60,"context_line":"                    \u0027active, sleeping 1 second between attempts.\u0027),"},{"line_number":61,"context_line":"    cfg.IntOpt(\u0027partprobe_retry_attempts\u0027,"},{"line_number":62,"context_line":"               default\u003d30,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027the kernel was informed of the partition, sleeping \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_1cc2055a","line":61,"updated":"2017-08-29 17:59:21.000000000","message":"I am a bit concerned about this name. Would people think this is used whenever partprobe is invoked?\n\nI prefer \u0027partprobe_max_retries\u0027 but that\u0027s just me.","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"3d5d26d0c950da1ff99ff2c1f544c545dee17ab5","unresolved":false,"context_lines":[{"line_number":58,"context_line":"               default\u003d3,"},{"line_number":59,"context_line":"               help\u003d\u0027Maximum attempts to verify an iSCSI connection is \u0027"},{"line_number":60,"context_line":"                    \u0027active, sleeping 1 second between attempts.\u0027),"},{"line_number":61,"context_line":"    cfg.IntOpt(\u0027partprobe_retry_attempts\u0027,"},{"line_number":62,"context_line":"               default\u003d30,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027the kernel was informed of the partition, sleeping \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_7e41eba8","line":61,"in_reply_to":"7f287b81_1cc2055a","updated":"2017-08-30 09:53:19.000000000","message":"Thx, sound good for me.","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a9afb6482a7cf71e44f7a15cadf811ac88fd1f1f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"               default\u003d30,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027the kernel was informed of the partition, sleeping \u0027"},{"line_number":65,"context_line":"                    \u00276 seconds between attempts.\u0027),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_a690814b","line":65,"updated":"2017-08-29 17:59:21.000000000","message":"I don\u0027t like hard-coded values although I see it being done for iscsi_verify_attempts :-(. I see that others have suggested adding a configuration option for this; I agree. We might as well put it in now. If the default of 6 (where did you get 6?) is fine, no one will need to change the value. If it isn\u0027t fine, they can change it without having to wait for us to add a config option later.\n\neg \u0027partprobe_retry_interval\u0027.","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"3d5d26d0c950da1ff99ff2c1f544c545dee17ab5","unresolved":false,"context_lines":[{"line_number":62,"context_line":"               default\u003d30,"},{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027the kernel was informed of the partition, sleeping \u0027"},{"line_number":65,"context_line":"                    \u00276 seconds between attempts.\u0027),"},{"line_number":66,"context_line":"]"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_5ef74f8c","line":65,"in_reply_to":"7f287b81_a690814b","updated":"2017-08-30 09:53:19.000000000","message":"Thx,\nA lot of guys want me to add a config item. I didn\u0027t want to add because I think we should make ironic_lib simple enough. But now, I also think it is a good idea because it is flexibly for others. So I will add a new config item.","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a9afb6482a7cf71e44f7a15cadf811ac88fd1f1f","unresolved":false,"context_lines":[{"line_number":613,"context_line":"    :returns: block device file for partition if it exists; otherwise it"},{"line_number":614,"context_line":"              returns None."},{"line_number":615,"context_line":"    \"\"\""},{"line_number":616,"context_line":"    partprobe_ok \u003d False"},{"line_number":617,"context_line":"    attempts \u003d CONF.disk_utils.partprobe_retry_attempts"},{"line_number":618,"context_line":"    for attempt in range(attempts):"},{"line_number":619,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_7f1b3b72","line":616,"updated":"2017-08-29 17:59:21.000000000","message":"This method is really long now, and part of me wonders why we don\u0027t create a helper method that *just* handles partprobe retries. But maybe that is outside the scope of this...","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"3d5d26d0c950da1ff99ff2c1f544c545dee17ab5","unresolved":false,"context_lines":[{"line_number":613,"context_line":"    :returns: block device file for partition if it exists; otherwise it"},{"line_number":614,"context_line":"              returns None."},{"line_number":615,"context_line":"    \"\"\""},{"line_number":616,"context_line":"    partprobe_ok \u003d False"},{"line_number":617,"context_line":"    attempts \u003d CONF.disk_utils.partprobe_retry_attempts"},{"line_number":618,"context_line":"    for attempt in range(attempts):"},{"line_number":619,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_be97533a","line":616,"in_reply_to":"7f287b81_7f1b3b72","updated":"2017-08-30 09:53:19.000000000","message":":-)","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"a1ca6ee1e31984624b70a2c8915bb4ef553fecf8","unresolved":false,"context_lines":[{"line_number":622,"context_line":"            partprobe_ok \u003d True"},{"line_number":623,"context_line":"            break"},{"line_number":624,"context_line":"        except processutils.ProcessExecutionError as e:"},{"line_number":625,"context_line":"            error_msg \u003d e.stderr"},{"line_number":626,"context_line":"            if \u0027unable to inform the kernel\u0027 not in error_msg:"},{"line_number":627,"context_line":"                msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":628,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":12,"id":"9f436f4f_43c95d76","line":625,"updated":"2017-08-09 09:41:00.000000000","message":"nit: I still think you could move the statement at line 625 to line 631 because if the condition at line 626 yields True, the statement at line 625 will never be used.","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a9afb6482a7cf71e44f7a15cadf811ac88fd1f1f","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            error_msg \u003d e.stderr"},{"line_number":626,"context_line":"            if \u0027unable to inform the kernel\u0027 not in error_msg:"},{"line_number":627,"context_line":"                msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":628,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":629,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":630,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":631,"context_line":"            LOG.debug((\u0027Failed to inform kernel to sync partitions \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_7c9109f1","line":628,"updated":"2017-08-29 17:59:21.000000000","message":"maybe \u0027Could not verify that the partition with label %s exists on disk %s for node %s. Error: ..\u0027.","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"3d5d26d0c950da1ff99ff2c1f544c545dee17ab5","unresolved":false,"context_lines":[{"line_number":625,"context_line":"            error_msg \u003d e.stderr"},{"line_number":626,"context_line":"            if \u0027unable to inform the kernel\u0027 not in error_msg:"},{"line_number":627,"context_line":"                msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":628,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":629,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":630,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":631,"context_line":"            LOG.debug((\u0027Failed to inform kernel to sync partitions \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_7e80cbf5","line":628,"in_reply_to":"7f287b81_7c9109f1","updated":"2017-08-30 09:53:19.000000000","message":"good expression. :-)","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a9afb6482a7cf71e44f7a15cadf811ac88fd1f1f","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":629,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":630,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":631,"context_line":"            LOG.debug((\u0027Failed to inform kernel to sync partitions \u0027"},{"line_number":632,"context_line":"                       \u0027tables on disk %(disk)s for node %(node)s. \u0027"},{"line_number":633,"context_line":"                       \u0027Error: %(error)s. (The %(times)d/%(totals)d \u0027"},{"line_number":634,"context_line":"                       \u0027times. Retry after 6s)\u0027) %"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_1c52053c","line":631,"updated":"2017-08-29 17:59:21.000000000","message":"Maybe \u0027Failed to inform the kernel of partition table changes on disk %s for node %s on attempt %d of %d.\u0027\n\nIt isn\u0027t clear to me that we need to show error_msg; that\u0027s basically what this is saying already?\n\nAlso, I don\u0027t know if we need to mention the amount of time to wait between retries. Is that useful? (Seems like you can see that with the timestamp of the log msgs.)","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"3d5d26d0c950da1ff99ff2c1f544c545dee17ab5","unresolved":false,"context_lines":[{"line_number":628,"context_line":"                         \u0027%(disk)s for node %(node)s. Error: %(error)s\u0027) %"},{"line_number":629,"context_line":"                       {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":630,"context_line":"                raise exception.InstanceDeployFailure(msg)"},{"line_number":631,"context_line":"            LOG.debug((\u0027Failed to inform kernel to sync partitions \u0027"},{"line_number":632,"context_line":"                       \u0027tables on disk %(disk)s for node %(node)s. \u0027"},{"line_number":633,"context_line":"                       \u0027Error: %(error)s. (The %(times)d/%(totals)d \u0027"},{"line_number":634,"context_line":"                       \u0027times. Retry after 6s)\u0027) %"}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_1e98a772","line":631,"in_reply_to":"7f287b81_1c52053c","updated":"2017-08-30 09:53:19.000000000","message":"OK, I will fix it and add error_msg to the logs.","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"a9afb6482a7cf71e44f7a15cadf811ac88fd1f1f","unresolved":false,"context_lines":[{"line_number":640,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":641,"context_line":"                     \u0027%(disk)s for node %(node)s. Because partprobe \u0027"},{"line_number":642,"context_line":"                     \u0027does not exist or for other unexcepted reasons. \u0027"},{"line_number":643,"context_line":"                     \u0027Error: %(error)s\u0027) %"},{"line_number":644,"context_line":"                   {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":645,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":646,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_dcd23dd1","line":643,"updated":"2017-08-29 17:59:21.000000000","message":"Do we need this to be different from L627? It seems to me that the error string itself will provide more information anyway.\n\nI am not sure that \u0027Because partprobe does not exist or for other unexcepted reason\u0027 is that useful.","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":15333,"name":"Hao Li","email":"lihao@cmss.chinamobile.com","username":"lihao"},"change_message_id":"3d5d26d0c950da1ff99ff2c1f544c545dee17ab5","unresolved":false,"context_lines":[{"line_number":640,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":641,"context_line":"                     \u0027%(disk)s for node %(node)s. Because partprobe \u0027"},{"line_number":642,"context_line":"                     \u0027does not exist or for other unexcepted reasons. \u0027"},{"line_number":643,"context_line":"                     \u0027Error: %(error)s\u0027) %"},{"line_number":644,"context_line":"                   {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":645,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":646,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7f287b81_9eac979f","line":643,"in_reply_to":"7f287b81_dcd23dd1","updated":"2017-08-30 09:53:19.000000000","message":"I think maybe L627 should be changed. \n‘Because partprobe does not exist or for other unexcepted reason\u0027 means the error is out of our thought. We think this situation should not be happen.","commit_id":"66e6fac57172b464a727073e4445257b93ecef55"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d32a882fc696f3faa657b4ae8a0e71ffdef36f65","unresolved":false,"context_lines":[{"line_number":63,"context_line":"               help\u003d\u0027Maximum attempts to execute partprobe to ensure \u0027"},{"line_number":64,"context_line":"                    \u0027the kernel was informed of the partition.\u0027),"},{"line_number":65,"context_line":"    cfg.IntOpt(\u0027partprobe_retry_interval\u0027,"},{"line_number":66,"context_line":"               default\u003d6,"},{"line_number":67,"context_line":"               help\u003d\u0027Interval between retries of executing partprobe \u0027"},{"line_number":68,"context_line":"                    \u0027command.\u0027),"},{"line_number":69,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":13,"id":"7f287b81_3a6a4519","line":66,"updated":"2017-08-30 16:09:44.000000000","message":"just thinking. we should put a min value here. If they specify a negative number, time.sleep() will blow up. Add \u0027min\u003d0\u0027","commit_id":"0daf04b8c11003442e925e347b1db8c4ba71d19c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d32a882fc696f3faa657b4ae8a0e71ffdef36f65","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                    \u0027the kernel was informed of the partition.\u0027),"},{"line_number":65,"context_line":"    cfg.IntOpt(\u0027partprobe_retry_interval\u0027,"},{"line_number":66,"context_line":"               default\u003d6,"},{"line_number":67,"context_line":"               help\u003d\u0027Interval between retries of executing partprobe \u0027"},{"line_number":68,"context_line":"                    \u0027command.\u0027),"},{"line_number":69,"context_line":"]"},{"line_number":70,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7f287b81_da910149","line":67,"updated":"2017-08-30 16:09:44.000000000","message":"maybe s/Interval/Amount of time (in seconds) to wait/","commit_id":"0daf04b8c11003442e925e347b1db8c4ba71d19c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d32a882fc696f3faa657b4ae8a0e71ffdef36f65","unresolved":false,"context_lines":[{"line_number":637,"context_line":"            LOG.debug((\u0027Failed to inform kernel to sync partition \u0027"},{"line_number":638,"context_line":"                       \u0027tables changes on disk %(disk)s for node \u0027"},{"line_number":639,"context_line":"                       \u0027%(node)s on attempt %(attempt)d of %(attempts)d. \u0027"},{"line_number":640,"context_line":"                       \u0027Error: %(error)s.\u0027) %"},{"line_number":641,"context_line":"                      {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid,"},{"line_number":642,"context_line":"                       \u0027attempt\u0027: attempt + 1, \u0027attempts\u0027: attempts,"},{"line_number":643,"context_line":"                       \u0027error\u0027: error_msg})"}],"source_content_type":"text/x-python","patch_set":13,"id":"7f287b81_3a86c5ba","line":640,"updated":"2017-08-30 16:09:44.000000000","message":"Again, I\u0027m not sure how useful it is to log this error string, we know it has \u0027unable to inform the kernel\u0027 which is what the above string sez. Is there anything more there that is useful?","commit_id":"0daf04b8c11003442e925e347b1db8c4ba71d19c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d32a882fc696f3faa657b4ae8a0e71ffdef36f65","unresolved":false,"context_lines":[{"line_number":646,"context_line":"            msg \u003d (_(\u0027Get partition label occurs error on disk \u0027"},{"line_number":647,"context_line":"                     \u0027%(disk)s for node %(node)s. Because partprobe \u0027"},{"line_number":648,"context_line":"                     \u0027does not exist or for other unexcepted reasons. \u0027"},{"line_number":649,"context_line":"                     \u0027Error: %(error)s\u0027) %"},{"line_number":650,"context_line":"                   {\u0027disk\u0027: device_path, \u0027node\u0027: node_uuid, \u0027error\u0027: e})"},{"line_number":651,"context_line":"            raise exception.InstanceDeployFailure(msg)"},{"line_number":652,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"7f287b81_1d62e3d8","line":649,"updated":"2017-08-30 16:09:44.000000000","message":"continuing the comments from patch set 12. I would hope that e would provide information as to what was wrong, and that it would be clear. I\u0027m not sure that we expect the error at L631 either; the diff is \u0027where\u0027 the error occurred and what the actual error is. We/I don\u0027t think either of these situations (@L631 or here) should occur or are expected.\n\nif partprobe doesn\u0027t exist, what will e show?\n\nAnyway, I\u0027m not convinced yet that this msg should be diff from the one at L631...","commit_id":"0daf04b8c11003442e925e347b1db8c4ba71d19c"}]}
