Update patch set 4

Patch Set 4: Code-Review-1

(1 comment)

Patch-set: 4
Reviewer: Gerrit User 31022 <31022@4a232e18-c5a9-48ee-94c0-e04e7cca6543>
Label: Code-Review=-1
This commit is contained in:
Gerrit User 31022 2022-05-25 20:20:04 +00:00 committed by Gerrit Code Review
parent df3c4f7142
commit ab547800e8
1 changed files with 17 additions and 0 deletions

View File

@ -85,6 +85,23 @@
"revId": "87c15b50c974082a1800b8f03dcf70937d4bb241",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
},
{
"unresolved": true,
"key": {
"uuid": "3f7872d8_598f0d15",
"filename": "os_brick/initiator/connectors/nvmeof.py",
"patchSetId": 4
},
"lineNbr": 366,
"author": {
"id": 31022
},
"writtenOn": "2022-05-25T20:20:04Z",
"side": 1,
"message": "I think the implementation here is broken.\nObserved on real system - I got 3 portals, but only 2 got controller attribute set.\n\nPlease take a look, I hope it\u0027s readable.\n\n self.portals \u003d [\u0027p1\u0027, \u0027p2\u0027, \u0027p3\u0027]\n sysfs_portals \u003d [\u0027p1\u0027, \u0027p2\u0027, \u0027p3\u0027]\n ctrl_paths \u003d [\u0027p1\u0027, \u0027p2\u0027, \u0027p3\u0027]\n\n # first loop\n ctrl_portal \u003d \u0027p1\u0027\n index \u003d sysfs_portals.index(ctrl_portal) # index\u003d0\n self.portals[index].controller \u003d \u0027c1\u0027 # \u0027p1\u0027 got \u0027c1\u0027\n del sysfs_portals[index] # remaining sysfs_portals \u003d [\u0027p2\u0027, \u0027p3\u0027]\n # second loop\n ctrl_portal \u003d \u0027p2\u0027\n index \u003d sysfs_portals.index(ctrl_portal) # index\u003d0 \u003c\u003d\u003d\u003d again the index is 0\n self.portals[index].controller \u003d \u0027c2\u0027 # \u0027p1\u0027 got \u0027c2\u0027!!!\n\nSince you depend on item index from sysfs_portals and you delete items from it you overwrite controller attribute from self.portals.",
"revId": "87c15b50c974082a1800b8f03dcf70937d4bb241",
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543"
},
{
"unresolved": true,
"key": {