summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch')
-rw-r--r--meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch239
1 files changed, 0 insertions, 239 deletions
diff --git a/meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch b/meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch
deleted file mode 100644
index b0ce889..0000000
--- a/meta-openstack/recipes-extended/iscsi-initiator-utils/files/iscsi-initiator-utils-use-var-for-config.patch
+++ /dev/null
@@ -1,239 +0,0 @@
1iscsi-initiator-utils to use var for config
2
3This patch is from fedora.
4
5Use /var/lib/iscsi/ instead of /etc/iscsi/ for holding
6state files.
7
8Signed-off-by: Yao Zhao <yao.zhao@windriver.com>
9Signed-off-by: Vu Tran <vu.tran@windriver.com>
10
11diff --git a/README b/README
12index 7364b2d..5e8bff8 100644
13--- a/README
14+++ b/README
15@@ -164,10 +164,10 @@ available on all Linux installations.
16
17 The database contains two tables:
18
19-- Discovery table (/etc/iscsi/send_targets);
20-- Node table (/etc/iscsi/nodes).
21+- Discovery table (/var/lib/iscsi/send_targets);
22+- Node table (/var/lib/iscsi/nodes).
23
24-The regular place for iSCSI database files: /etc/iscsi/nodes
25+The regular place for iSCSI database files: /var/lib/iscsi/nodes
26
27 The iscsiadm utility is a command-line tool to manage (update, delete,
28 insert, query) the persistent database.
29@@ -444,7 +444,7 @@ a scsi_host per HBA port).
30 To manage both types of initiator stacks, iscsiadm uses the interface (iface)
31 structure. For each HBA port or for software iscsi for each network
32 device (ethX) or NIC, that you wish to bind sessions to you must create
33-a iface config /etc/iscsi/ifaces.
34+a iface config /var/lib/iscsi/ifaces.
35
36 Prep:
37
38@@ -478,29 +478,29 @@ Running:
39 iface0 qla4xxx,00:c0:dd:08:63:e8,20.15.0.7,default,iqn.2005-06.com.redhat:madmax
40 iface1 qla4xxx,00:c0:dd:08:63:ea,20.15.0.9,default,iqn.2005-06.com.redhat:madmax
41
42-Will report iface configurations that are setup in /etc/iscsi/ifaces.
43+Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
44 The format is:
45
46 iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
47
48 For software iscsi, you can create the iface configs by hand, but it is
49 reccomended that you use iscsiadm's iface mode. There is a iface.example in
50-/etc/iscsi/ifaces which can be used as a template for the daring.
51+/var/lib/iscsi/ifaces which can be used as a template for the daring.
52
53 For each network object you wish to bind a session to you must create
54-a seperate iface config in /etc/iscsi/ifaces and each iface config file
55+a seperate iface config in /var/lib/iscsi/ifaces and each iface config file
56 must have a unique name which is less than or equal to 64 characters.
57
58 Example:
59
60 If you have NIC1 with MAC address 00:0F:1F:92:6B:BF and NIC2 with
61 MAC address 00:C0:DD:08:63:E7 and you wanted to do software iscsi over
62-TCP/IP. Then in /etc/iscsi/ifaces/iface0 you would enter:
63+TCP/IP. Then in /var/lib/iscsi/ifaces/iface0 you would enter:
64
65 iface.transport_name = tcp
66 iface.hwaddress = 00:0F:1F:92:6B:BF
67
68-and in /etc/iscsi/ifaces/iface1 you would enter:
69+and in /var/lib/iscsi/ifaces/iface1 you would enter:
70
71 iface.transport_name = tcp
72 iface.hwaddress = 00:C0:DD:08:63:E7
73@@ -550,7 +550,7 @@ cxgb3i.00:07:43:05:97:07 cxgb3i,00:07:43:05:97:07,<empty>,<empty>,<empty>
74 qla4xxx.00:0e:1e:04:8b:2e qla4xxx,00:0e:1e:04:8b:2e,<empty>,<empty>,<empty>
75
76
77-Will report iface configurations that are setup in /etc/iscsi/ifaces.
78+Will report iface configurations that are setup in /var/lib/iscsi/ifaces.
79 The format is:
80
81 iface_name transport_name,hwaddress,ipaddress,net_ifacename,initiatorname
82@@ -636,7 +636,7 @@ need a seperate network connection to the target for discovery purposes.
83 *This will be fixed in the next version of open-iscsi*
84
85 For compatibility reasons, when you run iscsiadm to do discovery, it
86-will check for interfaces in /etc/iscsi/iscsi/ifaces that are using
87+will check for interfaces in /var/lib/iscsi/iscsi/ifaces that are using
88 tcp for the iface.transport and it will bind the portals that are discovered
89 so that they will be logged in through those ifaces. This behavior can also
90 be overriden by passing in the interfaces you want to use. For the case
91@@ -654,7 +654,7 @@ we do not bind a session to a iface, then you can use the special iface
92
93 iscsiadm -m discoverydb -t st -p ip:port -I default --discover -P 1
94
95-And if you did not define any interfaces in /etc/iscsi/ifaces and do
96+And if you did not define any interfaces in /var/lib/iscsi/ifaces and do
97 not pass anything into iscsiadm, running iscsiadm will do the default
98 behavior, where we allow the network subsystem to decide which
99 device to use.
100@@ -696,7 +696,7 @@ To now log into targets it is the same as with sofware iscsi. See section
101
102 ./iscsiadm -m discoverydb -t st -p 192.168.1.1:3260 --discover
103
104- This will search /etc/iscsi/send_targets for a record with the
105+ This will search /var/lib/iscsi/send_targets for a record with the
106 ID [portal = 192.168.1.1:3260 and type = sendtargets. If found it
107 will perform discovery using the settings stored in the record.
108 If a record does not exist, it will be created using the iscsid.conf
109@@ -705,7 +705,7 @@ To now log into targets it is the same as with sofware iscsi. See section
110 The argument to -p may also be a hostname instead of an address.
111 ./iscsiadm -m discoverydb -t st -p smoehost --discover
112
113- For the ifaces, iscsiadm will first search /etc/iscsi/ifaces for
114+ For the ifaces, iscsiadm will first search /var/lib/iscsi/ifaces for
115 interfaces using software iscsi. If any are found then nodes found
116 during discovery will be setup so that they can logged in through
117 those interfaces. To specify a specific iface, pass the
118@@ -761,7 +761,7 @@ To now log into targets it is the same as with sofware iscsi. See section
119 This command will perform discovery, but not manipulate the node DB.
120
121 - SendTargets iSCSI Discovery with a specific interface. If you
122- wish to only use a subset of the interfaces in /etc/iscsi/ifaces
123+ wish to only use a subset of the interfaces in /var/lib/iscsi/ifaces
124 then you can pass them in during discovery:
125
126 ./iscsiadm -m discoverydb -t sendtargets -p 192.168.1.1:3260 \
127@@ -1072,8 +1072,8 @@ where targetname is the name of the target and ip_address:port is the address
128 and port of the portal. tpgt, is the portal group tag of
129 the portal, and is not used in iscsiadm commands except for static
130 record creation. And iface name is the name of the iscsi interface
131-defined in /etc/iscsi/ifaces. If no interface was defined in
132-/etc/iscsi/ifaces or passed in, the default behavior is used.
133+defined in /var/lib/iscsi/ifaces. If no interface was defined in
134+/var/lib/iscsi/ifaces or passed in, the default behavior is used.
135 Default here is iscsi_tcp/tcp to be used over which ever NIC the
136 network layer decides is best.
137
138@@ -1188,7 +1188,7 @@ If set, iscsid will perform discovery to the address every
139 discovery.isns.discoveryd_poll_inval or
140 discovery.sendtargets.discoveryd_poll_inval seconds,
141 and it will log into any portals found from the discovery source using
142-the ifaces in /etc/iscsi/ifaces.
143+the ifaces in /var/lib/iscsi/ifaces.
144
145 Note that for iSNS the poll_interval does not have to be set. If not set,
146 iscsid will only perform rediscovery when it gets a SCN from the server.
147diff --git a/doc/iscsiadm.8 b/doc/iscsiadm.8
148index 7c209f6..e94cca0 100644
149--- a/doc/iscsiadm.8
150+++ b/doc/iscsiadm.8
151@@ -89,7 +89,7 @@ This option is only valid for ping submode.
152 .TP
153 \fB\-I\fR, \fB\-\-interface=\fI[iface]\fR
154 The interface argument specifies the iSCSI interface to use for the operation.
155-iSCSI interfaces (iface) are defined in /etc/iscsi/ifaces. For hardware
156+iSCSI interfaces (iface) are defined in /var/lib/iscsi/ifaces. For hardware
157 iSCSI (qla4xxx) the iface config must have the hardware address
158 (iface.hwaddress = port's MAC address)
159 and the driver/transport_name (iface.transport_name). The iface's name is
160@@ -166,7 +166,7 @@ If no other options are specified: for \fIdiscoverydb\fR and \fInode\fR, all
161 of their respective records are displayed; for \fIsession\fR, all active
162 sessions and connections are displayed; for \fIfw\fR, all boot firmware
163 values are displayed; for \fIhost\fR, all iSCSI hosts are displayed; and
164-for \fIiface\fR, all ifaces setup in /etc/iscsi/ifaces are displayed.
165+for \fIiface\fR, all ifaces setup in /var/lib/iscsi/ifaces are displayed.
166
167 .TP
168 \fB\-n\fR, \fB\-\-name=\fIname\fR
169@@ -535,10 +535,10 @@ The configuration file read by \fBiscsid\fR and \fBiscsiadm\fR on startup.
170 The file containing the iSCSI InitiatorName and InitiatorAlias read by
171 \fBiscsid\fR and \fBiscsiadm\fR on startup.
172 .TP
173-/etc/iscsi/nodes/
174+/var/lib/iscsi/nodes/
175 This directory contains the nodes with their targets.
176 .TP
177-/etc/iscsi/send_targets
178+/var/lib/iscsi/send_targets
179 This directory contains the portals.
180
181 .SH "SEE ALSO"
182diff --git a/usr/idbm.c b/usr/idbm.c
183index 4d30aa9..316e54f 100644
184--- a/usr/idbm.c
185+++ b/usr/idbm.c
186@@ -2468,9 +2468,9 @@ free_info:
187 int idbm_init(idbm_get_config_file_fn *fn)
188 {
189 /* make sure root db dir is there */
190- if (access(ISCSI_CONFIG_ROOT, F_OK) != 0) {
191- if (mkdir(ISCSI_CONFIG_ROOT, 0660) != 0) {
192- log_error("Could not make %s %d\n", ISCSI_CONFIG_ROOT,
193+ if (access(ISCSIVAR, F_OK) != 0) {
194+ if (mkdir(ISCSIVAR, 0660) != 0) {
195+ log_error("Could not make %s %d\n", ISCSIVAR,
196 errno);
197 return errno;
198 }
199diff --git a/usr/idbm.h b/usr/idbm.h
200index 245f046..f45e86e 100644
201--- a/usr/idbm.h
202+++ b/usr/idbm.h
203@@ -28,12 +28,16 @@
204 #include "config.h"
205 #include "list.h"
206
207-#define NODE_CONFIG_DIR ISCSI_CONFIG_ROOT"nodes"
208-#define SLP_CONFIG_DIR ISCSI_CONFIG_ROOT"slp"
209-#define ISNS_CONFIG_DIR ISCSI_CONFIG_ROOT"isns"
210-#define STATIC_CONFIG_DIR ISCSI_CONFIG_ROOT"static"
211-#define FW_CONFIG_DIR ISCSI_CONFIG_ROOT"fw"
212-#define ST_CONFIG_DIR ISCSI_CONFIG_ROOT"send_targets"
213+#define ISCSIVAR "/var/lib/iscsi/"
214+
215+#define NODE_CONFIG_DIR ISCSIVAR"nodes"
216+#define SLP_CONFIG_DIR ISCSIVAR"slp"
217+#define ISNS_CONFIG_DIR ISCSIVAR"isns"
218+#define STATIC_CONFIG_DIR ISCSIVAR"static"
219+#define FW_CONFIG_DIR ISCSIVAR"fw"
220+#define ST_CONFIG_DIR ISCSIVAR"send_targets"
221+
222+
223 #define ST_CONFIG_NAME "st_config"
224 #define ISNS_CONFIG_NAME "isns_config"
225
226diff --git a/usr/iface.h b/usr/iface.h
227index 01f7074..2c6ef72 100644
228--- a/usr/iface.h
229+++ b/usr/iface.h
230@@ -20,7 +20,8 @@
231 #ifndef ISCSI_IFACE_H
232 #define ISCSI_IFACE_H
233
234-#define IFACE_CONFIG_DIR ISCSI_CONFIG_ROOT"ifaces"
235+#include "idbm.h"
236+#define IFACE_CONFIG_DIR ISCSIVAR"ifaces"
237
238 struct iface_rec;
239 struct list_head;