open-iscsi does not login automatically on boot

Asked by Martin Bruns

While booting Ubuntu 15.04 with systemd open-iscsi does not automatically login to my iSCSI NAS target.

I need to issue

sudo systemctl start open-iscsi.service

to mount my LUKS crypted device then.

While booting using upstart it is done automatically.

What do I need to change in to let systemd run the script automatically.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu systemd Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Add the command in /etc/rc.local above the 'exit 0' line and it will run at boot as root. Should do it.

Revision history for this message
Martin Bruns (martin-konahina) said :
#2

Hi,

thanks for the info. It works like this, and I will use it so far.

But isn't that a bit "old style". I would expect a systemd approach. I wonder that there is no open-iscsi.service file below /etc/systemd even the command would assume that.

Any more hints?

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#3

I suggest you report a bug

Revision history for this message
Martin Bruns (martin-konahina) said :
#4

Thanks actionparsnip, that solved my question.

Revision history for this message
Rex Kelley (rexkelley) said :
#5

Arch user here, but I had exactly the same symptoms with systemctl, looking for kdbus only, even though I'm using regular dbus. It turns out this is because XDG_RUNTIME_DIR is not set. Try:
export XDG_RUNTIME_DIR=/run/user/`id -u` https://ggstreetview.com
As to *why* the variable is not set, I'm not sure. I gather it's supposed to be set by pam_systemd.