Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

sys-block/open-iscsi: Update iscsi to 2.1.3 #791

Merged
merged 2 commits into from
Jan 25, 2021

Conversation

sayanchowdhury
Copy link
Contributor

@sayanchowdhury sayanchowdhury commented Jan 21, 2021

sys-block/open-iscsi: Update iscsi to 2.1.3

This commits updates the open-iscsi to 2.1.3. open-iscsi == 2.0.873 upstream did not ship systemd service file, so this package shipped it own service files. With the 2.1.x upgrade, the upstream now packages the systemd service files as well. This commit tries to go close to the Gentoo upstream, and replaces the local service files with the upstream ones.

This change:

  • Replaces the initiator name prefix from iqn.2016-04.com.flatcar.iscsi to iscsi-iname default iqn.2005-03.org.open-iscsi
  • Service for iscsi daemon from iscsid to iscsi

Needs to be merge with flatcar-archive/flatcar-docs#152

How to use

emerge-amd64-usr sys-block/open-iscsi
./build_image

Testing done

Jenkins build passed

sync ref: 3e85eb9a786a79658e0abdb357f92f06ebf2a154

Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
Signed-off-by: Sayan Chowdhury <sayan@kinvolk.io>
Copy link
Contributor

@dongsupark dongsupark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, Thanks!
Yesterday I have tested it, and it worked well.

@margamanterola
Copy link
Contributor

We should include a prominent note in the release notes that the service has been renamed.

@pothos
Copy link
Contributor

pothos commented Jan 21, 2021

Maybe an alias could be set up for the previous name but I haven't tried it and don't know if there are limitations: https://www.freedesktop.org/software/systemd/man/systemd.unit.html

@sayanchowdhury
Copy link
Contributor Author

The upstream ships iscsid and iscsi, but the primary one is the iscsi. https://github.com/open-iscsi/open-iscsi/tree/master/etc/systemd

@krnowak
Copy link
Contributor

krnowak commented Jan 21, 2021

Is there a reason to have a bunch of ebuilds instead of just one?

@pothos
Copy link
Contributor

pothos commented Jan 21, 2021

Ah, so it's not a rename but both have different purposes. iscsi.service depends on iscsid.d through iscsid.socket.

@sayanchowdhury
Copy link
Contributor Author

Right, The service file serves very different purpose, so the upstream divided it. We maintained a singular iscsid.service before which started the daemon and login as well. If we go down that route, we have to maintain local files which make the a bit upgrades tricky.

@sayanchowdhury sayanchowdhury merged commit 1ed6efd into main Jan 25, 2021
@sayanchowdhury sayanchowdhury deleted the sayan/update-iscsi-2.1.3 branch January 25, 2021 13:37
sayanchowdhury added a commit that referenced this pull request Jan 25, 2021
sys-block/open-iscsi: Update iscsi to 2.1.3
sayanchowdhury added a commit that referenced this pull request Jan 25, 2021
sys-block/open-iscsi: Update iscsi to 2.1.3
@sayanchowdhury
Copy link
Contributor Author

Picked to flatcar-2605 & flatcar-2705

[Service]
Type=oneshot
RemainAfterExit=no
ExecStart=/usr/bin/sh -c 'echo "InitiatorName=`/usr/sbin/iscsi-iname`" > /etc/iscsi/initiatorname.iscsi'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor issue: using

`cmd`

requires bash, otherwise it should be $(cmd)

@margamanterola
Copy link
Contributor

margamanterola commented Jan 26, 2021

Reviewing this change for the release notes, I found that a bunch of files are gone from /etc, is this expected?

-drwxr-xr-x  3 root    root       4096 ./etc/iscsi
-drwxr-xr-x  2 root    root       4096 ./etc/iscsi/ifaces
--rw-r--r--  1 root    root       5984 ./etc/iscsi/ifaces/iface.example
--rw-r--r--  1 root    root         15 ./etc/iscsi/initiatorname.iscsi
--rw-r--r--  1 root    root       1167 ./etc/iscsi/initiatorname.iscsi.example
--rw-------  1 root    root      13338 ./etc/iscsi/iscsid.conf

They seem to be in /usr instead:

+drwxr-xr-x  3 root    root       4096 ./usr/share/iscsi
+drwxr-xr-x  2 root    root       4096 ./usr/share/iscsi/ifaces
+-rw-r--r--  1 root    root       5984 ./usr/share/iscsi/ifaces/iface.example
+-rw-------  1 root    root      13341 ./usr/share/iscsi/iscsid.conf

(These are diffs, the - or + at the beginning of the lines means that these files are either gone or added)

@margamanterola
Copy link
Contributor

And these are the unit differences:

--rw-r--r--  1 root    root        368 ./usr/lib64/systemd/system/iscsid.service
+-rw-r--r--  1 root    root        364 ./usr/lib64/systemd/system/iscsid.service
 -rw-r--r--  1 root    root        175 ./usr/lib64/systemd/system/iscsid.socket
--rw-r--r--  1 root    root        525 ./usr/lib64/systemd/system/iscsi.service
--rw-r--r--  1 root    root        407 ./usr/lib64/systemd/system/iscsiuio.service
+-rw-r--r--  1 root    root        297 ./usr/lib64/systemd/system/iscsi-init.service
+-rw-r--r--  1 root    root        513 ./usr/lib64/systemd/system/iscsi.service
+-rw-r--r--  1 root    root        403 ./usr/lib64/systemd/system/iscsiuio.service
 -rw-r--r--  1 root    root        165 ./usr/lib64/systemd/system/iscsiuio.socket

I had understood that we were moving from iscsid to iscsi, but it seems both units existed before?

@sayanchowdhury
Copy link
Contributor Author

  • the changes from /etc to /usr looks good and is expected. they moved to around during the 2.1.2 release
  • 2.1.x series brings the systemd units so yes, they were brought in the last open-iscsi upgrade but there were couple issues(or rather applying CoreOS/Flatcar specific patches) that were missed during the upgrade. They were fixed in this update.

pothos added a commit that referenced this pull request Feb 1, 2021
sys-block/open-iscsi: Update iscsi to 2.1.3
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants