[01:12] <RoyK> openfire, nacc et al: bug #1059541 is a good example of how things aren't really cared for in the ubuntu server camp
[15:49] <kantlivelong> ahasenack: comparing the output of rpc.gssd between 16.04 and 18.04 looks very different
[15:57] <kantlivelong> it looks like 16.04 is looking for a machine entry with the FQDN where 18.04 uses the short name
[16:05] <kantlivelong> hostname.domainname.com$@DOMAIN.COM vs hostname$@DOMAIN.COM
[16:06] <kantlivelong> not sure if thats configurable
[16:13] <lotuspsychje> welcome Curtman
[16:13] <lotuspsychje> perhaps also mention the ubuntu server version to the channel
[16:14] <Curtman> I'm using open-iscsi to connect to a target, I would like to do 'rmmod g_mass_storage; modprobe g_mass_storage file=/dev/sda stall=0' each time the initiator connects to a particular target.  Does anyone know how to make that happen?
[16:14] <Curtman> Ubuntu 18.04
[16:16] <Curtman> Initially I tried adding 'modprobe g_mass_storage file=/dev/sda stall=0' to rc.local, but found that it does that before the initiator connects to the target.  Does anyone have an idea how to make that happen after iscsid in systemd?  My systemd-foo is not good.
[16:18] <lotuspsychje> idle here a bit Curtman, as we have different timezones volunteers might read a bit later when wakeup/back from away
[16:20] <Curtman> Yep,  I'm not sure this is the best place to ask but I cant seem to find a better one.
[16:21] <lotuspsychje> Curtman: if you have ubuntu server your question fits right in here
[16:25] <Curtman> Well, the target is on a Ubuntu Server with the tgt package.  The Initiator would be any debian based distro with open-iscsi.  I'm hoping to make a rasperry pi zero (raspbian distro) connect to an iscsi target at boot, then use the g_mass_storage gadget to make the pi look like a usb mass storage device to whatever it is plugged in to.
[16:29] <Curtman> Everything works wonderfully if I ssh into the pi and modprobe the kernel module manually each boot.  I'd like to find a way to automate that each time the target is connected.
[17:37] <Curtman> More googling leads me to believe my answer is udev. 'udevadm info -a -n sda' provides a bunch of information.  Possibly I need to figure out how to create udev rules that insert and remove the module.
[18:03] <TJ-> Curtman: you need to remove/re-insert the module, or just insert it once at the correct time?
[18:06] <Curtman> Ideally remove it when the iscsi target disconnects and insert it when it connects.  I think this is a good clue:  https://www.suse.com/support/kb/doc/?id=3684654  "all iSCSI disks (identified by the vendor ID IET) will be ..."
[18:17] <TJ-> Curtman: you could add a udev.rules file, firing on ADD/REMOVE events, matching on the iSCSI device. e.g. ACTION=="add", SUBSYSTEM=="scsi", ENV{ID_VENDOR}=="IET",RUN+="/sbin/modprobe g_mass_storage stall=0 file=/dev/$kernel"  and a similar ACTION=="remove" to do RUN+="/sbin/modprobe -r g_mass_storage"
[18:19] <Curtman> Thank you very much TJ-
[19:06] <Curtman> TJ-, I must be missing something, I've added exactly this to /etc/udev/rules.d/99-com.rules: ACTION=="add", SUBSYSTEM=="scsi", ENV{ID_VENDOR}=="IET", RUN+="/sbin/modprobe g_mass_storage stall=0 file=/dev/sda"
[19:06] <Curtman> It doesn't seem to be happening.
[19:07] <Curtman> I tried restarting udev, and even rebooting to be sure..  It should happen when I restart the open-iscsi service, /dev/sda disappears then reappears when I start it.
[19:08] <TJ-> Curtman: to begin with, I suggested using the udev variable to make it mroe modular, as in "...file=/dev/$kernel"
[19:10] <TJ-> Curtman: you need to ensure all the match entries do match (the == ) - I may not have it entirely correct, so you need to use "udevadm info ..." to check what the relevant keys/attributes are
[19:15] <Curtman> Yes, I think I've got it now.. ATTRS instead of ENV..  This seems to work: ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="IET     ", RUN+="/sbin/modprobe g_mass_storage stall=0 file=/dev/sda"
[19:16] <Curtman> Thanks very much for your helo
[19:16] <Curtman> help