{"action":"closed","issue":{"url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/744","labels_url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/744/labels{/name}","comments_url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/744/comments","events_url":"https://api.github.com/repos/ClusterLabs/resource-agents/issues/744/events","html_url":"https://github.com/ClusterLabs/resource-agents/issues/744","id":128102842,"number":744,"title":"resource-agents/heartbeat/iscsi works incorrectly with multipath scheme","user":{"login":"berlevdv","id":14903099,"avatar_url":"https://avatars.githubusercontent.com/u/14903099?v=3","gravatar_id":"","url":"https://api.github.com/users/berlevdv","html_url":"https://github.com/berlevdv","followers_url":"https://api.github.com/users/berlevdv/followers","following_url":"https://api.github.com/users/berlevdv/following{/other_user}","gists_url":"https://api.github.com/users/berlevdv/gists{/gist_id}","starred_url":"https://api.github.com/users/berlevdv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/berlevdv/subscriptions","organizations_url":"https://api.github.com/users/berlevdv/orgs","repos_url":"https://api.github.com/users/berlevdv/repos","events_url":"https://api.github.com/users/berlevdv/events{/privacy}","received_events_url":"https://api.github.com/users/berlevdv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-22T07:51:31Z","updated_at":"2016-02-01T12:42:16Z","closed_at":"2016-02-01T12:42:16Z","body":"I have one target with two portals (for multipath):\r\n10.0.1.1 iqn.1998-01.com.mycompany:myserver.storage\r\n10.0.2.1 iqn.1998-01.com.mycompany:myserver.storage\r\n\r\nCreate two resorce to controll iscsi initiator:\r\npcs resource create iscsi-initiator10011 iscsi portal=\"10.0.1.1:3260\" target=\"iqn.1998-01.com.mycompany:myserver.storage\" op start interval=\"0\" timeout=\"120s\" op stop\r\ninterval=\"0\" timeout=\"120s\" op monitor interval=\"120s\" timeout=\"30s\" clone ordered=true\r\ninterleave=true\r\n\r\npcs resource create iscsi-initiator10021 iscsi portal=\"10.0.2.1:3260\" target=\"iqn.1998-01.com.mycompany:myserver.storage\" op start interval=\"0\" timeout=\"120s\" op stop\r\ninterval=\"0\" timeout=\"120s\" op monitor interval=\"120s\" timeout=\"30s\" clone ordered=true\r\ninterleave=true\r\n\r\niscsi resource agent from master branch connect to only one portal of target, because function open_iscsi_get_session_id() ignores portal and function open_iscsi_monitor() returns \"0: target running (logged in)\" if the target is connected through at least one portal.\r\n\r\nTo fix it I change lines on function open_iscsi_get_session_id():\r\nlocal portal=\"$2\"\r\n$iscsiadm -m session 2>/dev/null |\r\n                grep -E \"$target($|[[:space:]])\" |\r\n                grep -E \"] $portal\" |\r\n                awk '{print $2}' | tr -d '[]'\r\n\r\nAnd add parameter \"$OCF_RESKEY_portal\" to calls of function open_iscsi_get_session_id()"}}