[virt-tools-list] [PATCH] Added support to on_lockfailure

Cole Robinson crobinso at redhat.com
Tue Oct 6 14:32:09 UTC 2015


On 10/06/2015 05:55 AM, Abhijeet Kasurde wrote:
> 
> On 10/06/2015 12:12 AM, Cole Robinson wrote:
>> On 10/01/2015 07:56 AM, Abhijeet Kasurde wrote:
>>> Added cli option to specify on_lockfailure in events.
>>> Also, added various testcases and related output XMLs.
>>>
>>> Signed-off-by: Abhijeet Kasurde <akasurde at redhat.com>
>> There's a problem here: your change adds on_lockfailure XML to every new guest
>> we create. In general we don't want to add new unconditional XML, since often
>> older libvirt will throw errors for unknown XML.
> How do I make this change in my current patch?

Not sure if this is what you mean or not, but this is what I'd do:

- Put this patch in a git branch named 'on_lockfailure'
- Add a new commit, fixing the bit I pointed out below, and regenerating the
test output
- Use git rebase -i to combine the two commits with 'fixup'
- git format-patch -1 -v2
- Edit the .patch file, after the --- break list the changes you made in v2.
Any text after the --- and before the 'diff ...' line is just free form text
- Send the new patch to the mailing list

Thanks,
Cole

>>> diff --git a/virtinst/guest.py b/virtinst/guest.py
>>> index e259ad7..8f1be93 100644
>>> --- a/virtinst/guest.py
>>> +++ b/virtinst/guest.py
>>> @@ -196,6 +196,7 @@ class Guest(XMLBuilder):
>>>                                 default_cb=lambda s: "destroy")
>>>       on_reboot = XMLProperty("./on_reboot", default_cb=lambda s: "restart")
>>>       on_crash = XMLProperty("./on_crash", default_cb=lambda s: "restart")
>>> +    on_lockfailure = XMLProperty("./on_lockfailure", default_cb=lambda s:
>>> "restart")
>>>   
>> Here, just drop the default_cb usage, regenerate the output, and the patch
>> should be acceptable.
> OK.
>>
>> Thanks,
>> Cole
>>
>>>       seclabel = XMLChildProperty(Seclabel)
>>>       os = XMLChildProperty(OSXML, is_single=True)
>>>
> 




More information about the virt-tools-list mailing list