saltstack-formulas / iscsi-formula

Manage iSCSI Target and Initiator via SaltStack (FreeBSD & GNU/Linux)
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
8 stars 7 forks source link

service fails to start on ubuntu 18 #10

Closed noelmcloughlin closed 5 years ago

noelmcloughlin commented 5 years ago

Mentioned at https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1755858 but upgrading to latestopen-iscsi does not resolve the issue.

# systemctl status  open-iscsi
* open-iscsi.service - Login to default iSCSI targets
   Loaded: loaded (/lib/systemd/system/open-iscsi.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Condition: start condition failed at Mon 2019-01-14 15:16:27 MST; 2s ago
           |- ConditionDirectoryNotEmpty=|/etc/iscsi/nodes was not met
           `- ConditionDirectoryNotEmpty=|/sys/class/iscsi_session was not met
     Docs: man:iscsiadm(8)
           man:iscsid(8)

Upgrade did not help

$ apt-get install --upgrade open-iscsi
$ systemctl start  open-iscsi
$ systemctl status  open-iscsi

$  systemctl stop iscsid
$  systemctl start  open-iscsi
$ systemctl status  open-iscsi
* open-iscsi.service - Login to default iSCSI targets
   Loaded: loaded (/lib/systemd/system/open-iscsi.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Condition: start condition failed at Mon 2019-01-14 15:26:21 MST; 2min 54s ago
           |- ConditionDirectoryNotEmpty=|/etc/iscsi/nodes was not met
           `- ConditionDirectoryNotEmpty=|/sys/class/iscsi_session was not met
     Docs: man:iscsiadm(8)
           man:iscsid(8)
noelmcloughlin commented 5 years ago

Explanation from https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1755858

In bionic, the open-iscsi systemd unit has the following guards to keep it from running on systems with no iscsi targets configured:

Must have some pre-defined targets to login to ConditionDirectoryNotEmpty=|/etc/iscsi/nodes or have a session to use via iscsid ConditionDirectoryNotEmpty=|/sys/class/iscsi_session

However, iscsid starts from a separate unit and does not include this check. Thus, iscsid starts on every Ubuntu Server install, whether or not it has anything to do.

saltstack-formulas-travis commented 4 years ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: