Comment 7 for bug 1389811

Revision history for this message
Dimiter Naydenov (dimitern) wrote :

Related issue in tgt 1.0.63 on xenial (see bug 1547060) makes it impossible to use the '-t 1' workaround (comment #5) as numeric arguments are not accepted.

How I managed to resolve it locally, in case somebody finds it useful. On my MAAS 2.0 beta3 xenial machine:

# apt-get build-dep tgt
# apt-get install devscripts git
# mkdir ~/tgt-source && cd ~/tgt-source
# git clone https://github.com/fujita/tgt.git .
# wget https://github.com/fujita/tgt/pull/18.patch
# git apply 18.path
# export SD_NOTIFY=1
# make
# make deb
# dpkg -i pkg/tgt_1.0.63-1_amd64.deb
# cp -f pkg/tgt_1.0.63/scripts/tgtd.service /lib/systemd/system/tgt.service
# vi /lib/systemd/system/tgt.service
Changed the first ExecStart= to add -t1 -d1 arguments:
-ExecStart=/usr/sbin/tgtd
+ExecStart=/usr/sbin/tgtd -t1 -d1

# rm -f /etc/init.d/tgt
# systemctl --system daemon-reload
# systemctl --system enable tgt

Now I can again commission my NUCs with xenial and my MAAS overall *feels* a lot more responsive.
No more tgtadm: out of memory errors in /var/log/syslog