Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename 'zed.service' to 'zfs-zed.service' #3824

Closed
wants to merge 1 commit into from

Conversation

FransUrbo
Copy link
Contributor

This so that it corresponds to the other systemd files.

$ ll etc/systemd/system/
total 64
-rw-r--r--  1 turbo  staff    41 Jul 24 15:40 50-zfs.preset.in
-rw-r--r--  1 turbo  staff  1124 Sep 23 23:05 Makefile.am
-rw-r--r--  1 turbo  staff   183 Sep 23 23:05 zed.service.in
-rw-r--r--  1 turbo  staff   362 Sep  8 18:19 zfs-import-cache.service.in
-rw-r--r--  1 turbo  staff   355 Sep  8 18:19 zfs-import-scan.service.in
-rw-r--r--  1 turbo  staff   357 Jul 24 15:40 zfs-mount.service.in
-rw-r--r--  1 turbo  staff   302 Sep  8 18:17 zfs-share.service.in
-rw-r--r--  1 turbo  staff   148 Sep 23 23:05 zfs.target.in

Doesn't make sense that the zed start script isn't prefixed with zfs-.

This can cause a problem which we've seen in zfsonlinux/pkg-zfs#172. This isn't the cause of that problem, but it is related.

@FransUrbo
Copy link
Contributor Author

@behlendorf @nedbass Did you guys miss this into 0.6.5.2? It's quite a no-brainer….

@behlendorf
Copy link
Contributor

I'm on the fence about it. I've no objection to merging it to master (which I should do), consistency is good. But changing this is the release branch would be a significant change in behavior.

@FransUrbo
Copy link
Contributor Author

This is directly related to #3837. Since there's a /etc/init.d/zfs-zed script, but no corresponding zfs-zed.service service file (it is instead zed.service), we end up with two zeds (if/when it's auto generated)…

But as I've mentioned elsewhere, I'm not sure it's an issue on anything but Debian GNU/Linux (which is, as far as I know, the only one distribution both SYSV scripts and systemd service files at the same time).

Considering that, I have no problems with leaving it out from the point releases if you think that's better. I'm not sure it would be "significant change in behavior" though (keyword "significant")...

@behlendorf
Copy link
Contributor

It's trivial but it's also very user visible. People are used to typing systemctl status zed and I think this would feel like a gratuitous change. However, it dawned on me that systemd does provide the ability to create aliases. Adding an Alias=zed.service to the service file will allow both names to work avoiding any user visible change which should resolve this issue and allow us to add this to the release branch.

It appears to work as expected for me.

$ sudo systemctl status zed
zfs-zed.service - ZFS Event Daemon (zed)
   Loaded: loaded (/usr/lib/systemd/system/zfs-zed.service; enabled)
   Active: active (running) since Fri 2015-10-02 17:32:16 EDT; 2min 22s ago
     Docs: man:zed(8)
 Main PID: 947 (zed)
   CGroup: /system.slice/zfs-zed.service
           └─947 /sbin/zed -F

Oct 02 17:32:16 localhost.localdomain systemd[1]: Started ZFS Event Daemon (z...
Oct 02 17:32:16 localhost.localdomain zed[947]: ZFS Event Daemon 0.6.5-20_g9...)
Oct 02 17:32:16 localhost.localdomain zed[947]: Processing events since eid=0
Hint: Some lines were ellipsized, use -l to show in full.
$ sudo systemctl status zfs-zed
zfs-zed.service - ZFS Event Daemon (zed)
   Loaded: loaded (/usr/lib/systemd/system/zfs-zed.service; enabled)
   Active: active (running) since Fri 2015-10-02 17:32:16 EDT; 2min 26s ago
     Docs: man:zed(8)
 Main PID: 947 (zed)
   CGroup: /system.slice/zfs-zed.service
           └─947 /sbin/zed -F

Oct 02 17:32:16 localhost.localdomain systemd[1]: Started ZFS Event Daemon (z...
Oct 02 17:32:16 localhost.localdomain zed[947]: ZFS Event Daemon 0.6.5-20_g9...)
Oct 02 17:32:16 localhost.localdomain zed[947]: Processing events since eid=0
Hint: Some lines were ellipsized, use -l to show in full.

Merged as:

8f90f73 Rename 'zed.service' to 'zfs-zed.service'

@behlendorf behlendorf closed this Oct 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants