Comment 0 for bug 1670237

Revision history for this message
Rikimaru Honjo (honjo-rikimaru-c6) wrote : os-brick's iscsi initiator unexpectedly reverts node.startup from "auto" to "manual".

os-brick's iscsi initiator unexpectedly reverts node.startup from "auto" to "manual". in some specific cases.

[Premises]
* os-brick's iscsi initiator changes node.startup from "manual" to "auto" when it makes iscsi connections.
* If "iscsiadm -m discovery -t sendtargets -p ..." command is executed, node.startup is reverted from "auto" to "manual".
* In current os-brick's implementation, it won't login iscsi session and change node.startup if sessions are already existed.
  (That logic is implemented in os_brick.initiator.connectors.iscsi.ISCSIConnector._connect_to_iscsi_portal() )

[Reproduce steps]

1. User attaches a volume to a instance with iscsi.
2. As a result, iscsi sessions are made.
   And, node.startup is changed from "manual" to "auto".
3. The host of the instance is rebooted by with some reason.
4. After operating system is launched, iscsi sessions are automatically recovered.
   Because node.startup is "auto".
5. The instance has stopped because the host was rebooted.
   User calls "Start Server" API.
6. Nova try to re-make iscsi sessions.
7. In starting server process, os-brick executes "iscsiadm -m discovery -t sendtargets ...".
   As a result, node.startup is reverted from "auto" to "manual".
8. But os-brick doesn't change node.startup to "auto" after that because iscsi sessions are already existed.
9. node.startup is still "manual" when server start is completed.

[My opinion]
In my opinion, os-brick should change node.startup even if iscsi sessions are already existed.

[Question]
I have also another opinion( or question).
Is changing node.startup really necessary?
If it is unnecessary, we should remove the process of changing node.startup.
IMO, that simplifies implementations over the above idea.