[PATCH] SEM Key Clash with Open-iSCSI initiator and FHS correction for ipc socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Roland Friedwagner <rfried@xxxxxxxx>

 - Fix logging semaphore key clash between iscsd and tgtd

   iscsd and tgtd both use the same unix ipc key(0xa7) for
   logging semaphore.
   The error messages found before in syslog are:
     tgtd: semop up failed
     iscsid: semop down failed 22

 - IPC namespace socket location moved to /var/run

   Change location from /tmp to /var/run to avoid the socket file
   is accidentally deleted by admins or cron system maintenance scripts.
   I think it is also more FHS conform this way.

Signed-off-by: Roland Friedwagner <rfried@xxxxxxxx>
---

diff -uprN tgt-1.0.14.orig/usr/log.c tgt-1.0.14/usr/log.c
--- tgt-1.0.14.orig/usr/log.c	2011-03-01 12:53:45.000000000 +0100
+++ tgt-1.0.14/usr/log.c	2011-03-03 16:13:53.758746516 +0100
@@ -33,7 +33,7 @@

 #include "log.h"

-#define SEMKEY	0xA7L
+#define SEMKEY	0x54475444L /* TGTD */
 #define LOGDBG 0

 #if LOGDBG
diff -uprN tgt-1.0.14.orig/usr/tgtadm.h tgt-1.0.14/usr/tgtadm.h
--- tgt-1.0.14.orig/usr/tgtadm.h	2011-03-01 12:53:45.000000000 +0100
+++ tgt-1.0.14/usr/tgtadm.h	2011-03-03 16:14:01.612496609 +0100
@@ -1,7 +1,7 @@
 #ifndef TGTADM_H
 #define TGTADM_H

-#define TGT_IPC_NAMESPACE	"/tmp/.TGT_IPC_ABSTRACT_NAMESPACE"
+#define TGT_IPC_NAMESPACE	"/var/run/tgtd.ipc_abstract_namespace"
 #define TGT_LLD_NAME_LEN	64

 #define GLOBAL_TID (~0U)
--

Thx & Kind Regards,
Roland
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux