Skip to contentSkip to conversation

hotplug/Linux: add iscsi block hotplug script

PATCH Applied Roger Pau Monne 4 participants 4 messages May 2, 2013 – May 8, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 hotplug/Linux: add iscsi block hotplug script

This hotplug script has been tested with IET and NetBSD iSCSI targets, without authentication.

This hotplug script will only work with PV guests not using pygrub.

Cc Ian Campbell <[email protected]>
Cc Ian Jackson <[email protected]>

---
Changes since v2:
* Removed returns from functions, since we call fatal on error.
* Removed checks for the return value of internal functions.
* Use do_or_die or && and || in order to prevent using set +e/set -e.
Changes since v1:
* Added an example in the script header to show the usage.
* Changed shebang to use bash.
* Replace type with command, for portability reasons.
* Replace echo with fatal/log functions.
* Include block-common.sh.
* Prevent infinite loop when waitign for device to settle.
* Only redirect stdout to /dev/null.
Changes due to 4.3 release freeze:
* We can no longer provide a user/password, because they will be stored in xenstore "params" backend node, which can be read by the guest.
* Only works with PV domains because we don't have a hook in libxl to pass the block device created by the script to Qemu.
* Doesn't work with pygrub because we don't call the script until pygrub has already been executed, and even if we called it earlier we still need a hook in order to provide the right block device to pygrub.
Changes since v1:
* Add -e to script shebang, and use 'set +e' if we know hotplug execution might fail.

---
 tools/hotplug/Linux/Makefile    |    1 +
 tools/hotplug/Linux/block-iscsi |  154 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 155 insertions(+), 0 deletions(-)
 create mode 100644 tools/hotplug/Linux/block-iscsi
tools/hotplug/Linux/Makefile +1 -0
index 0605559..98c7738 100644
@@ -21,6 +21,7 @@ XEN_SCRIPTS += blktap
 XEN_SCRIPTS += xen-hotplug-cleanup
 XEN_SCRIPTS += external-device-migrate
 XEN_SCRIPTS += vscsi
+XEN_SCRIPTS += block-iscsi
 XEN_SCRIPT_DATA = xen-script-common.sh locking.sh logging.sh
 XEN_SCRIPT_DATA += xen-hotplug-common.sh xen-network-common.sh vif-common.sh
 XEN_SCRIPT_DATA += block-common.sh
tools/hotplug/Linux/block-iscsi new file +154 -0

154 lines not on this page · raw message

Signature · 7 lines
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Acked-by on v3 1/1
#1 lore raw

Roger Pau Monne writes ("[PATCH v3] hotplug/Linux: add iscsi block hotplug script"):

Quoted 2 lines

This hotplug script has been tested with IET and NetBSD iSCSI targets, without authentication.

This looks plausible to me. I think it's low-risk and would warrant a freeze exception.

ian.

Acked-by
#2 lore raw
Quoted 8 lines · Ian Jackson

Roger Pau Monne writes ("[PATCH v3] hotplug/Linux: add iscsi block hotplug script"):

Quoted 2 lines

This hotplug script has been tested with IET and NetBSD iSCSI targets, without authentication.

This looks plausible to me. I think it's low-risk and would warrant a freeze exception.

Yes, I think based on the timing of the patches posted, and the (low) risk to breaking existing functionality:

Applied
#3 lore raw
Quoted 8 lines · George Dunlap
Quoted 7 lines · Ian Jackson

Roger Pau Monne writes ("[PATCH v3] hotplug/Linux: add iscsi block hotplug script"):

Quoted 2 lines

This hotplug script has been tested with IET and NetBSD iSCSI targets, without authentication.

This looks plausible to me. I think it's low-risk and would warrant a freeze exception.

Quoted 6 lines
Quoted 1 line

Yes, I think based on the timing of the patches posted, and the (low) risk to breaking existing functionality:

Applied, thanks.