{"action":"created","issue":{"url":"https://api.github.com/repos/Datera/targetcli/issues/14","repository_url":"https://api.github.com/repos/Datera/targetcli","labels_url":"https://api.github.com/repos/Datera/targetcli/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/Datera/targetcli/issues/14/comments","events_url":"https://api.github.com/repos/Datera/targetcli/issues/14/events","html_url":"https://github.com/Datera/targetcli/issues/14","id":107804652,"number":14,"title":"service target can not start or stop","user":{"login":"ExecDevOps","id":8845227,"avatar_url":"https://avatars.githubusercontent.com/u/8845227?v=3","gravatar_id":"","url":"https://api.github.com/users/ExecDevOps","html_url":"https://github.com/ExecDevOps","followers_url":"https://api.github.com/users/ExecDevOps/followers","following_url":"https://api.github.com/users/ExecDevOps/following{/other_user}","gists_url":"https://api.github.com/users/ExecDevOps/gists{/gist_id}","starred_url":"https://api.github.com/users/ExecDevOps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ExecDevOps/subscriptions","organizations_url":"https://api.github.com/users/ExecDevOps/orgs","repos_url":"https://api.github.com/users/ExecDevOps/repos","events_url":"https://api.github.com/users/ExecDevOps/events{/privacy}","received_events_url":"https://api.github.com/users/ExecDevOps/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2015-09-22T21:16:56Z","updated_at":"2016-08-01T07:37:00Z","closed_at":null,"body":"OS: CentOS 6.7\r\nKernel: 4.1.7-1.el6.elrepo.x86_64\r\ntargetcli: 3.0.pre4.3 (latest as of 2015-09-22)\r\n\r\nThe service \"target\" can not re-start or stop, failing with the following error messages:\r\n> Failed to unload target core module target_core_mod\r\n> Could not stop The Linux SCSI Target\r\n\r\nThe cause of the problem is that the module `target_core_user` does not get unloaded whenever the target service stops and the module `target_core_mod` seems to depend on it. (The modules come with the kernel and are located at `/lib/modules/4.1.7-1.el6.elrepo.x86_64/kernel/drivers/target`)\r\n\r\nThe problem and the solution is within the init script `/etc/rc.d/init.d/target` at the definition of the target core modules:\r\n\r\n> CORE_MODS=\"target_core_mod target_core_pscsi target_core_iblock target_core_file\"\r\n\r\nAdding `target_core_user` to the list of modules to load / unload when the target service starts / stops solves the problem:\r\n\r\n> CORE_MODS=\"target_core_mod target_core_user target_core_pscsi target_core_iblock target_core_file\"\r\n\r\nI think that the ordering of the modules in the list is important, `target_core_user` has to be unloaded before `target_core_mod` when the target service stops.\r\n"},"comment":{"url":"https://api.github.com/repos/Datera/targetcli/issues/comments/236509876","html_url":"https://github.com/Datera/targetcli/issues/14#issuecomment-236509876","issue_url":"https://api.github.com/repos/Datera/targetcli/issues/14","id":236509876,"user":{"login":"fukunagt","id":7392016,"avatar_url":"https://avatars.githubusercontent.com/u/7392016?v=3","gravatar_id":"","url":"https://api.github.com/users/fukunagt","html_url":"https://github.com/fukunagt","followers_url":"https://api.github.com/users/fukunagt/followers","following_url":"https://api.github.com/users/fukunagt/following{/other_user}","gists_url":"https://api.github.com/users/fukunagt/gists{/gist_id}","starred_url":"https://api.github.com/users/fukunagt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fukunagt/subscriptions","organizations_url":"https://api.github.com/users/fukunagt/orgs","repos_url":"https://api.github.com/users/fukunagt/repos","events_url":"https://api.github.com/users/fukunagt/events{/privacy}","received_events_url":"https://api.github.com/users/fukunagt/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T07:37:00Z","updated_at":"2016-08-01T07:37:00Z","body":"Thank you for the valuable information. I have faced the same issue on Ubuntu 16.04.  And I have added the following line and fixed the issue! Thank you so much!\r\n\r\n``\r\n/etc/init.d/target\r\nCORE_MODS=\"target_core_mod target_core_user target_core_pscsi target_core_iblock target_core_file\""}}
{"actor":{"display_login":"fukunagt"}}