Change in vdsm[master]: Update device hooks: Added before and after update device ho...

danken at redhat.com danken at redhat.com
Thu Apr 25 10:41:19 UTC 2013


Dan Kenigsberg has posted comments on this change.

Change subject: Update device hooks: Added before and after update device hooks.
......................................................................


Patch Set 7: I would prefer that you didn't submit this

(4 inline comments)

....................................................
File vdsm/vdsmd.8.in
Line 46:     before_vm_migrate_source, after_vm_migrate_source,
Line 47:     before_vm_migrate_destination, after_vm_migrate_destination,
Line 48:     before_vm_destroy, after_vm_destroy,
Line 49:     before_vm_set_ticket, after_vm_set_ticket,
Line 50:     before_update_device, after_update_device, after_update_device_fail,
could you move this line after the hostunplug one? it's not more important than the device_create hook.
Line 51:     before_device_create, after_device_create,
Line 52:     before_device_destroy, after_device_destroy,
Line 53:     before_nic_hotplug, after_nic_hotplug, after_nic_hotplug_fail,
Line 54:     before_nic_hotunplug, after_nic_hotunplug, after_nic_unhotplug_fail,


Line 71: available as the environment variable
Line 72: .B vmId.
Line 73: Hooks that handle NIC hotplug and hotunplug have the _hook_domxml variable but
Line 74: it contains the representation of the NIC rather than the VM.
Line 75: Hotplug/hotunplug disk hooks also have the _hook_dom_xml variable,
I suppose you should add your hook to here, too.
Line 76: which contains the drive definition (not the VM).
Line 77: 
Line 78: On top of these, @ENGINENAME@ allows to set a collection of "custom parameters" for
Line 79: each virtual machine.  Each of these parameters is provided to hooks as an


Line 86: The environment of before_vm_set_ticket and after_vm_set_ticket hooks is augmented
Line 87: with a set of params passed by the caller of setVmTicket.
Line 88: 
Line 89: The environment of hooks specific to devices:
Line 90:     before_nic_hotplug, after_nic_hotplug, after_nic_hotplug_fail,
please add your new hooks here - they are device specific.

please look closer - most likely that a hotplug hook reference applies to your hook, too.
Line 91:     before_nic_hotunplug, after_nic_hotunplug, after_nic_unhotplug_fail,
Line 92:     before_disk_hotplug, after_disk_hotplug,
Line 93:     before_disk_hotunplug, after_disk_hotunplug,
Line 94:     before_device_create, after_device_create,


Line 92:     before_disk_hotplug, after_disk_hotplug,
Line 93:     before_disk_hotunplug, after_disk_hotunplug,
Line 94:     before_device_create, after_device_create,
Line 95:     before_device_destroy, after_device_destroy.
Line 96: 
not your fault, but I hate this trailing space.
Line 97: Are all augmented by custom properties specific to those devices, 
Line 98: sent by the caller of the hook. For example if before_nic_hotplug is called
Line 99: with custom: {qos: '0.5', color: 'red'} then qos and color will be directly
Line 100: available as environment variables when before_nic_hotplug is called.


--
To view, visit http://gerrit.ovirt.org/13972
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8fe7f5e6d8291cc227a323b324c977bcd5bc8295
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list