)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"d7efc1d57550570b0cd262ab42fb87a6f88895f7","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangjian \u003cjian.zhang8@hpe.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-09 11:48:53 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix bug:"},{"line_number":8,"context_line":"Iscsi target fail to be created via lio with error messages:"},{"line_number":9,"context_line":"\tironic-python-agent log: \"Could not create NetworkPortal in configFS\""},{"line_number":10,"context_line":"\tsyslog: \"kernel_bind() failed: -98\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_557215ae","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":8},"updated":"2016-03-09 09:15:32.000000000","message":"A brief title is required here, and can we raise the bug first, then include the number here?\n\nClosed-bug: #xxx","commit_id":"fbef8b9867aca0dec56cf13220b191bd6ae4c8d2"},{"author":{"_account_id":18542,"name":"Jane.zhang","email":"jian.zhang8@hpe.com","username":"Jane.zhang"},"change_message_id":"290134e54cfd0d10c37d8a645d5abb5308d98b2f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhangjian \u003cjian.zhang8@hpe.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-03-09 11:48:53 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix bug:"},{"line_number":8,"context_line":"Iscsi target fail to be created via lio with error messages:"},{"line_number":9,"context_line":"\tironic-python-agent log: \"Could not create NetworkPortal in configFS\""},{"line_number":10,"context_line":"\tsyslog: \"kernel_bind() failed: -98\""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_9012ea55","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":8},"in_reply_to":"5aef4532_557215ae","updated":"2016-03-09 09:38:55.000000000","message":"Thanks for your comments.\nI have submited a bug here.\nhttps://bugs.launchpad.net/ironic-python-agent/+bug/1554987","commit_id":"fbef8b9867aca0dec56cf13220b191bd6ae4c8d2"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"d7efc1d57550570b0cd262ab42fb87a6f88895f7","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2016-03-09 11:48:53 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix bug:"},{"line_number":8,"context_line":"Iscsi target fail to be created via lio with error messages:"},{"line_number":9,"context_line":"\tironic-python-agent log: \"Could not create NetworkPortal in configFS\""},{"line_number":10,"context_line":"\tsyslog: \"kernel_bind() failed: -98\""},{"line_number":11,"context_line":"Root cause is tgt service is listing on the same port on OS start,"},{"line_number":12,"context_line":"lio cloud not bind the port later."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"So tgt service must be stopped before lio settings."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I780a93039ae993f0191fbf4260cd13154e35bfb9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_15ba4dc0","line":14,"range":{"start_line":8,"start_character":0,"end_line":14,"end_character":51},"updated":"2016-03-09 09:15:32.000000000","message":"Here should be the description for this patch, so for such issue details, need to be moved to launch new bug to track.","commit_id":"fbef8b9867aca0dec56cf13220b191bd6ae4c8d2"},{"author":{"_account_id":18542,"name":"Jane.zhang","email":"jian.zhang8@hpe.com","username":"Jane.zhang"},"change_message_id":"290134e54cfd0d10c37d8a645d5abb5308d98b2f","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2016-03-09 11:48:53 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Fix bug:"},{"line_number":8,"context_line":"Iscsi target fail to be created via lio with error messages:"},{"line_number":9,"context_line":"\tironic-python-agent log: \"Could not create NetworkPortal in configFS\""},{"line_number":10,"context_line":"\tsyslog: \"kernel_bind() failed: -98\""},{"line_number":11,"context_line":"Root cause is tgt service is listing on the same port on OS start,"},{"line_number":12,"context_line":"lio cloud not bind the port later."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"So tgt service must be stopped before lio settings."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I780a93039ae993f0191fbf4260cd13154e35bfb9"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5aef4532_90678ae8","line":14,"range":{"start_line":8,"start_character":0,"end_line":14,"end_character":51},"in_reply_to":"5aef4532_15ba4dc0","updated":"2016-03-09 09:38:55.000000000","message":"will update the description in next patch set","commit_id":"fbef8b9867aca0dec56cf13220b191bd6ae4c8d2"}],"ironic_python_agent/extensions/iscsi.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"ad4538d8be32cca608c7c0b5daf33ab2ebf3c954","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def _start_lio(iqn, device):"},{"line_number":74,"context_line":"    try:"},{"line_number":75,"context_line":"        _execute([\u0027service\u0027, \u0027tgt\u0027, \u0027forcedstop\u0027], \"Unable to stop tgtd.\")"},{"line_number":76,"context_line":"        storage \u003d rtslib_fb.BlockStorageObject(name\u003diqn, dev\u003ddevice)"},{"line_number":77,"context_line":"        target \u003d rtslib_fb.Target(rtslib_fb.FabricModule(\u0027iscsi\u0027), iqn,"},{"line_number":78,"context_line":"                                  mode\u003d\u0027create\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_96714279","line":75,"updated":"2016-03-09 10:14:50.000000000","message":"How will it work when tgtd is not present on a system?","commit_id":"fbef8b9867aca0dec56cf13220b191bd6ae4c8d2"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"d7efc1d57550570b0cd262ab42fb87a6f88895f7","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def _start_lio(iqn, device):"},{"line_number":74,"context_line":"    try:"},{"line_number":75,"context_line":"        _execute([\u0027service\u0027, \u0027tgt\u0027, \u0027forcedstop\u0027], \"Unable to stop tgtd.\")"},{"line_number":76,"context_line":"        storage \u003d rtslib_fb.BlockStorageObject(name\u003diqn, dev\u003ddevice)"},{"line_number":77,"context_line":"        target \u003d rtslib_fb.Target(rtslib_fb.FabricModule(\u0027iscsi\u0027), iqn,"},{"line_number":78,"context_line":"                                  mode\u003d\u0027create\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_950f7d2d","line":75,"range":{"start_line":75,"start_character":7,"end_line":75,"end_character":74},"updated":"2016-03-09 09:15:32.000000000","message":"We should add ut code for the new codes.","commit_id":"fbef8b9867aca0dec56cf13220b191bd6ae4c8d2"},{"author":{"_account_id":18542,"name":"Jane.zhang","email":"jian.zhang8@hpe.com","username":"Jane.zhang"},"change_message_id":"443f1d32db1c2af40240e7dd75f7e9643bb2ded1","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def _start_lio(iqn, device):"},{"line_number":74,"context_line":"    try:"},{"line_number":75,"context_line":"        _execute([\u0027service\u0027, \u0027tgt\u0027, \u0027forcedstop\u0027], \"Unable to stop tgtd.\")"},{"line_number":76,"context_line":"        storage \u003d rtslib_fb.BlockStorageObject(name\u003diqn, dev\u003ddevice)"},{"line_number":77,"context_line":"        target \u003d rtslib_fb.Target(rtslib_fb.FabricModule(\u0027iscsi\u0027), iqn,"},{"line_number":78,"context_line":"                                  mode\u003d\u0027create\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5aef4532_972aa58e","line":75,"in_reply_to":"5aef4532_96714279","updated":"2016-03-10 02:18:30.000000000","message":"I\u0027ll execute \"ps -ef |grep tgtd |wc -l\" first in next patch set.","commit_id":"fbef8b9867aca0dec56cf13220b191bd6ae4c8d2"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ebf284577f04c290d3b8a82aa3225ad2c2fbc388","unresolved":false,"context_lines":[{"line_number":52,"context_line":"def _start_tgtd(iqn, device):"},{"line_number":53,"context_line":"    \"\"\"Start a ISCSI target for the device.\"\"\""},{"line_number":54,"context_line":"    # Start ISCSI Target daemon"},{"line_number":55,"context_line":"    _execute([\u0027tgtd\u0027], \"Unable to start the ISCSI daemon\")"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    _wait_for_tgtd()"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_69953087","line":55,"updated":"2016-03-11 10:03:38.000000000","message":"The code starts tgtd here and this bits are not called. So should I assume that at the deploy ramdisk built time it is installing the tgtd daemon from packages and it has a .service file that will start it at boot time?\n\nIf that\u0027s the case, shouldn\u0027t we be fixing the image building process?","commit_id":"4731e4b87fe825bbd2c98e443bce69072625e0ac"},{"author":{"_account_id":18542,"name":"Jane.zhang","email":"jian.zhang8@hpe.com","username":"Jane.zhang"},"change_message_id":"3eeee9da66fc7d99ded3eed91720ec9783fd6908","unresolved":false,"context_lines":[{"line_number":52,"context_line":"def _start_tgtd(iqn, device):"},{"line_number":53,"context_line":"    \"\"\"Start a ISCSI target for the device.\"\"\""},{"line_number":54,"context_line":"    # Start ISCSI Target daemon"},{"line_number":55,"context_line":"    _execute([\u0027tgtd\u0027], \"Unable to start the ISCSI daemon\")"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    _wait_for_tgtd()"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_c08ae5be","line":55,"in_reply_to":"5aef4532_69953087","updated":"2016-03-15 02:45:51.000000000","message":"@Lucas\nI thought about where to fix the issue, in DIB or IPA.\n\n\nKinds of linux distro are supported and would be different methods to control startup activity on boot time.\nAnd there is time slot between OS start and LIO settings, there is a chance that other scirpts might change the status.\nSo it is more cautious and safer to check and stop tgtd right before LIO settings. I think it also be the reason why _start_tgtd is executed here.","commit_id":"4731e4b87fe825bbd2c98e443bce69072625e0ac"},{"author":{"_account_id":18781,"name":"vinay muddu","email":"vinay50muddu@yahoo.com","username":"vmud213"},"change_message_id":"67b54c9d4719be0c3295059704066ab58d6a8de9","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        out, _e \u003d utils.execute(\"ps -ef | grep tgtd | wc -l\","},{"line_number":76,"context_line":"                                shell\u003dTrue)"},{"line_number":77,"context_line":"        lines \u003d out.split(\u0027\\n\u0027)"},{"line_number":78,"context_line":"        if int(lines[0]) \u003e 2:"},{"line_number":79,"context_line":"            _execute([\u0027service\u0027, \u0027tgt\u0027, \u0027forcedstop\u0027], \"Unable to stop tgtd.\")"},{"line_number":80,"context_line":"    except Exception as exc:"},{"line_number":81,"context_line":"        LOG.error(\u0027Error when stoping tgtd: %s.\u0027, exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_465dc847","line":78,"range":{"start_line":78,"start_character":15,"end_line":78,"end_character":28},"updated":"2016-03-11 07:26:01.000000000","message":"I think this should be changed to lines[0] \u003e\u003d 2.\nThere are 2 tgtd processes that show up with \u0027ps\u0027, one daemon and other spawned by this daemon. So \u0027ps -ef|grep tgt|wc -l\u0027 actually lists 3(including grep). This check fails if for some reason only one tgt process is listed in \u0027ps\u0027 which may be possible if the other process may fail to start.","commit_id":"4731e4b87fe825bbd2c98e443bce69072625e0ac"},{"author":{"_account_id":18542,"name":"Jane.zhang","email":"jian.zhang8@hpe.com","username":"Jane.zhang"},"change_message_id":"18b11440837d97cd2c81ba109a54e3388c295b2b","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        out, _e \u003d utils.execute(\"ps -ef | grep tgtd | wc -l\","},{"line_number":76,"context_line":"                                shell\u003dTrue)"},{"line_number":77,"context_line":"        lines \u003d out.split(\u0027\\n\u0027)"},{"line_number":78,"context_line":"        if int(lines[0]) \u003e 2:"},{"line_number":79,"context_line":"            _execute([\u0027service\u0027, \u0027tgt\u0027, \u0027forcedstop\u0027], \"Unable to stop tgtd.\")"},{"line_number":80,"context_line":"    except Exception as exc:"},{"line_number":81,"context_line":"        LOG.error(\u0027Error when stoping tgtd: %s.\u0027, exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_e002810a","line":78,"range":{"start_line":78,"start_character":15,"end_line":78,"end_character":28},"in_reply_to":"5aef4532_2643576e","updated":"2016-03-15 02:47:53.000000000","message":"@Gary\nYes, it would be better. thanks. Will update the code later.","commit_id":"4731e4b87fe825bbd2c98e443bce69072625e0ac"},{"author":{"_account_id":18542,"name":"Jane.zhang","email":"jian.zhang8@hpe.com","username":"Jane.zhang"},"change_message_id":"b8e3645f85fd8b10418703d6fef2069f60dc4030","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        out, _e \u003d utils.execute(\"ps -ef | grep tgtd | wc -l\","},{"line_number":76,"context_line":"                                shell\u003dTrue)"},{"line_number":77,"context_line":"        lines \u003d out.split(\u0027\\n\u0027)"},{"line_number":78,"context_line":"        if int(lines[0]) \u003e 2:"},{"line_number":79,"context_line":"            _execute([\u0027service\u0027, \u0027tgt\u0027, \u0027forcedstop\u0027], \"Unable to stop tgtd.\")"},{"line_number":80,"context_line":"    except Exception as exc:"},{"line_number":81,"context_line":"        LOG.error(\u0027Error when stoping tgtd: %s.\u0027, exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_ec5b13f5","line":78,"range":{"start_line":78,"start_character":15,"end_line":78,"end_character":28},"in_reply_to":"5aef4532_465dc847","updated":"2016-03-11 08:12:39.000000000","message":"I traced the output of utils.execute(\"ps -ef | grep tgtd\", shell\u003dTrue)\nThere were 4 lines in output. 2 lines means tgtd is not running.\n-----------\n\u0027root      2611     1  0 11:03 ?        00:00:00 tgtd\\n\nroot      2612  2611  0 11:03 ?        00:00:00 tgtd\\n\nroot      2655  2618  0 11:04 pts/0    00:00:00 /bin/sh -c ps -ef | grep tgtd\\n\nroot      2657  2655  0 11:04 pts/0    00:00:00 grep tgtd\\n\u0027","commit_id":"4731e4b87fe825bbd2c98e443bce69072625e0ac"},{"author":{"_account_id":10511,"name":"Ligong Duan","email":"duanlg@live.cn","username":"duanlg"},"change_message_id":"5672dec490f71592bed488f3cdb00876caff94b1","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        out, _e \u003d utils.execute(\"ps -ef | grep tgtd | wc -l\","},{"line_number":76,"context_line":"                                shell\u003dTrue)"},{"line_number":77,"context_line":"        lines \u003d out.split(\u0027\\n\u0027)"},{"line_number":78,"context_line":"        if int(lines[0]) \u003e 2:"},{"line_number":79,"context_line":"            _execute([\u0027service\u0027, \u0027tgt\u0027, \u0027forcedstop\u0027], \"Unable to stop tgtd.\")"},{"line_number":80,"context_line":"    except Exception as exc:"},{"line_number":81,"context_line":"        LOG.error(\u0027Error when stoping tgtd: %s.\u0027, exc)"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_2643576e","line":78,"range":{"start_line":78,"start_character":15,"end_line":78,"end_character":28},"in_reply_to":"5aef4532_ec5b13f5","updated":"2016-03-11 09:50:44.000000000","message":"What about using \"ps -ef | grep tgtd | grep -v grep | wc -l\"? and if the return value is greater than zero, the stop command should be executed.\n\n--------\nroot@bl460c-g6-5:/tmp# ps -ef | grep tgtd | grep -v grep\nroot      7855     1  0  2015 ?        00:39:03 tgtd\nroot      7857  7855  0  2015 ?        00:14:26 tgtd\n--------","commit_id":"4731e4b87fe825bbd2c98e443bce69072625e0ac"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ebf284577f04c290d3b8a82aa3225ad2c2fbc388","unresolved":false,"context_lines":[{"line_number":76,"context_line":"                                shell\u003dTrue)"},{"line_number":77,"context_line":"        lines \u003d out.split(\u0027\\n\u0027)"},{"line_number":78,"context_line":"        if int(lines[0]) \u003e 2:"},{"line_number":79,"context_line":"            _execute([\u0027service\u0027, \u0027tgt\u0027, \u0027forcedstop\u0027], \"Unable to stop tgtd.\")"},{"line_number":80,"context_line":"    except Exception as exc:"},{"line_number":81,"context_line":"        LOG.error(\u0027Error when stoping tgtd: %s.\u0027, exc)"},{"line_number":82,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":3,"id":"5aef4532_49e31406","line":79,"updated":"2016-03-11 10:03:38.000000000","message":"It feels to me that this should be fixed at image creation time and not in the code. Since we support different backends I think the code should assume that none are running when the ramdisk is booted.","commit_id":"4731e4b87fe825bbd2c98e443bce69072625e0ac"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0838967988cd1aeb44117dfbe9f34bbd1c91364b","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        if int(lines[0]) \u003e 2:"},{"line_number":79,"context_line":"            _execute([\u0027service\u0027, \u0027tgt\u0027, \u0027forcedstop\u0027], \"Unable to stop tgtd.\")"},{"line_number":80,"context_line":"    except Exception as exc:"},{"line_number":81,"context_line":"        LOG.error(\u0027Error when stoping tgtd: %s.\u0027, exc)"},{"line_number":82,"context_line":"        pass"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_e54c8172","line":81,"updated":"2016-03-14 10:29:51.000000000","message":"it\u0027s not fatal (e.g. RHEL does not have tgt), so it should be a warning. Also please no dot in the end of LOG message","commit_id":"4731e4b87fe825bbd2c98e443bce69072625e0ac"},{"author":{"_account_id":18542,"name":"Jane.zhang","email":"jian.zhang8@hpe.com","username":"Jane.zhang"},"change_message_id":"7948eba3ff9df67f22935c1768dc5bd35c46d052","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        if int(lines[0]) \u003e 2:"},{"line_number":79,"context_line":"            _execute([\u0027service\u0027, \u0027tgt\u0027, \u0027forcedstop\u0027], \"Unable to stop tgtd.\")"},{"line_number":80,"context_line":"    except Exception as exc:"},{"line_number":81,"context_line":"        LOG.error(\u0027Error when stoping tgtd: %s.\u0027, exc)"},{"line_number":82,"context_line":"        pass"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afc51ec_5b452615","line":81,"in_reply_to":"3afc51ec_e54c8172","updated":"2016-03-15 02:58:16.000000000","message":"If tgt doesn\u0027t exist, \"service tgt forcedstop\" will not be executed. \nIf \"ps -ef ....\" or \"service tgt forced stop\" fails, I think it is an error.\nI\u0027ll remove the dot in log message.\nThanks for your comments.","commit_id":"4731e4b87fe825bbd2c98e443bce69072625e0ac"}]}
