[Bug 1882986] Re: open-iscsi is slowing down the boot process
Zakhar
1882986 at bugs.launchpad.net
Sat Jun 20 10:21:48 UTC 2020
As explained by Christian on #4, I did further tests:
- Disables only open-iscsi
- To be sure, I moved out of the way what was in /etc/iscsi/nodes which is now empty
- To be sure, did the same with /etc/iscsi/send-targets
- To be extra sure, even removed those directory
And when I boot my machine, iscsid.service is still starting although it
is supposed to be "socket activated".
I also removed the 2 lines in iscsid.service:
#[Install]
# WantedBy=sysinit.target
Because according to http://0pointer.de/blog/projects/socket-activation.html
this also unconditionally starts iscsid.service
Here is the result after all that:
$ systemctl status open-iscsi.service iscsid.service iscsid.socket
● open-iscsi.service - Login to default iSCSI targets
Loaded: loaded (/lib/systemd/system/open-iscsi.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:iscsiadm(8)
man:iscsid(8)
● iscsid.service - iSCSI initiator daemon (iscsid)
Loaded: loaded (/lib/systemd/system/iscsid.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-06-20 12:13:55 CEST; 16s ago
TriggeredBy: ● iscsid.socket
Docs: man:iscsid(8)
Process: 1430 ExecStartPre=/lib/open-iscsi/startup-checks.sh (code=exited, status=0/SUCCESS)
Process: 1437 ExecStart=/sbin/iscsid (code=exited, status=0/SUCCESS)
Main PID: 1440 (iscsid)
Tasks: 2 (limit: 38305)
Memory: 3.6M
CGroup: /system.slice/iscsid.service
├─1439 /sbin/iscsid
└─1440 /sbin/iscsid
juin 20 12:13:55 alain-HTPC systemd[1]: Starting iSCSI initiator daemon (iscsid)...
juin 20 12:13:55 alain-HTPC iscsid[1437]: iSCSI logger with pid=1439 started!
juin 20 12:13:55 alain-HTPC systemd[1]: iscsid.service: Failed to parse PID from file /run/iscsid.pid: Invalid argument
juin 20 12:13:55 alain-HTPC systemd[1]: Started iSCSI initiator daemon (iscsid).
juin 20 12:13:56 alain-HTPC iscsid[1439]: iSCSI daemon with pid=1440 started!
● iscsid.socket - Open-iSCSI iscsid Socket
Loaded: loaded (/lib/systemd/system/iscsid.socket; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-06-20 12:13:46 CEST; 25s ago
Triggers: ● iscsid.service
Docs: man:iscsid(8)
man:iscsiadm(8)
Listen: @ISCSIADM_ABSTRACT_NAMESPACE (Stream)
CGroup: /system.slice/iscsid.socket
juin 20 12:13:46 alain-HTPC systemd[1]: Listening on Open-iSCSI iscsid
Socket.
And (as root)
# tree /etc/iscsi/
/etc/iscsi/
├── initiatorname.iscsi
└── iscsid.conf
0 directories, 2 files
According to Christian's explanation at #4
- open-iscsi now cannot trigger the socket since it has been disabled
(see above) and also there are now no nodes or send-targets
- iscsid is still started, although the "database" (in fact the tree
directory under /etc/iscsi) is completely empty, and the "install"
clause has been removed from the service.
Where does this come from?
Is it a bug or some other "traces" I might have in my configuration that
make iscsid start?
** Changed in: open-iscsi (Ubuntu)
Status: Invalid => New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to open-iscsi in Ubuntu.
https://bugs.launchpad.net/bugs/1882986
Title:
open-iscsi is slowing down the boot process
Status in open-iscsi package in Ubuntu:
New
Bug description:
This is not a bug, but rather an "optimisation" request.
(Probably set this as "enhancement request" + Low)
Apparently, the package is assuming the user will need some iscsi
mounts for his session, and is putting dependencies in the systemd
services/targets which effects are to delay "graphical.target" to
after the point when the network is online.
A great job has been done by Ubuntu so that the O.S. appears to be
"snappy" from the boot, and when the session is in "auto-login", it
really makes a great difference and a good feeling of the system being
very quick.
This assumption of open-iscsi sort of ruins that effort.
As an example, on my PC the graphical target is delayed 10 seconds
more (was 22 seconds and is now 32). The impression is not as good and
the system feels "slow again" (although it is just a feeling!)
Step to reproduced (you don't even need to have iscsi LUNs to to so, just install the package!)
- Start from a clean 20.04, boot up and issue: systemd-analyze
- Now install open-iscsi, reboot and issue again: systemd-analyze
The result will probably be a big impact on "graphical target",
although total time does not change a lot.
My usage is not needing iscsi targets for my session.
I have a NAS with iscsi LUNs, and when I need those mounts, I just start them with a command.
sudo iscsiadm -m node -l
Then Gnome recognises a new disk has been inserted and does an "auto mount".
This command works whether the service was started or not.
This wrong assumption is easily fixed in my case with this command:
sudo systemctl disable iscsid.socket iscsid.service open-iscsi.service
Then, at the next reboot the graphical target is snappy again, and does not have to wait for network-online and remote-fs targets.
I don't know what can be done to cope with both situations : those who
need an iscsi target mounted for their session, and those who don't...
but I guess the philosophy now should be to assume the user does not
need such targets, and don't put dependencies that delay the snappy
boot process.
For those who need those mounted remote fs for their session, detailed
help on how to enable iscsi services at startup should be provided.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1882986/+subscriptions
More information about the foundations-bugs
mailing list