mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-08 05:55:19 +00:00
Ignore additional fields in iscsiadm output
There has been a new field introduced in iscsiadm --mode session
output [1], but our regex only expects four fields. This breaks
startup of iscsi pools:
error: Failed to start pool iscsi
error: internal error: cannot find session
Fix this by ignoring anything after the fourth field.
https://bugzilla.redhat.com/show_bug.cgi?id=1067173
[1] https://github.com/mikechristie/open-iscsi/commit/181af9a
(cherry picked from commit 57e17a74b7
)
This commit is contained in:
parent
c75ae0dcfb
commit
a099cf9dee
@ -102,7 +102,7 @@ virStorageBackendISCSISession(virStoragePoolObjPtr pool,
|
||||
* Pull out 2nd and 4th fields
|
||||
*/
|
||||
const char *regexes[] = {
|
||||
"^tcp:\\s+\\[(\\S+)\\]\\s+\\S+\\s+(\\S+)\\s*$"
|
||||
"^tcp:\\s+\\[(\\S+)\\]\\s+\\S+\\s+(\\S+).*$"
|
||||
};
|
||||
int vars[] = {
|
||||
2,
|
||||
|
Loading…
Reference in New Issue
Block a user