[libvirt] [PATCH v2] vz: support disabled items in vz boot order

Nikolay Shirokovskiy posted 1 patch 6 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1498804467-238332-1-git-send-email-nshirokovskiy@virtuozzo.com
src/vz/vz_sdk.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
[libvirt] [PATCH v2] vz: support disabled items in vz boot order
Posted by Nikolay Shirokovskiy 6 years, 9 months ago
At the time the check was written virtuozzo did not use disabled items in boot
order configuration. Boot items were always enabled. Now they can be disabled
as well. Supporting such items is easy - they just should be ignored.
---
 src/vz/vz_sdk.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 8ccd7ea..a6eb0dd 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -1736,11 +1736,8 @@ prlsdkConvertBootOrderVm(PRL_HANDLE sdkdom, virDomainDefPtr def)
         pret = PrlBootDev_IsInUse(bootDev, &inUse);
         prlsdkCheckRetGoto(pret, cleanup);
 
-        if (!inUse) {
-            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
-                           _("Boot ordering with disabled items is not supported"));
-            goto cleanup;
-        }
+        if (!inUse)
+            continue;
 
         pret = PrlBootDev_GetSequenceIndex(bootDev, &bootIndex);
         prlsdkCheckRetGoto(pret, cleanup);
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2] vz: support disabled items in vz boot order
Posted by John Ferlan 6 years, 8 months ago

On 06/30/2017 02:34 AM, Nikolay Shirokovskiy wrote:
> At the time the check was written virtuozzo did not use disabled items in boot
> order configuration. Boot items were always enabled. Now they can be disabled
> as well. Supporting such items is easy - they just should be ignored.
> ---
>  src/vz/vz_sdk.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 

Is this a result of commit id '8c9252aa6' - if so, then it should be
stated...  If not, what changed from the original commit '032c5bf98'
that added the check is now making it unnecessary should be added to the
commit message.

Reviewed-by: John Ferlan <jferlan@redhat.com>

I won't push yet though.

John

> diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
> index 8ccd7ea..a6eb0dd 100644
> --- a/src/vz/vz_sdk.c
> +++ b/src/vz/vz_sdk.c
> @@ -1736,11 +1736,8 @@ prlsdkConvertBootOrderVm(PRL_HANDLE sdkdom, virDomainDefPtr def)
>          pret = PrlBootDev_IsInUse(bootDev, &inUse);
>          prlsdkCheckRetGoto(pret, cleanup);
>  
> -        if (!inUse) {
> -            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> -                           _("Boot ordering with disabled items is not supported"));
> -            goto cleanup;
> -        }
> +        if (!inUse)
> +            continue;
>  
>          pret = PrlBootDev_GetSequenceIndex(bootDev, &bootIndex);
>          prlsdkCheckRetGoto(pret, cleanup);
> 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2] vz: support disabled items in vz boot order
Posted by Nikolay Shirokovskiy 6 years, 8 months ago

On 03.08.2017 15:18, John Ferlan wrote:
> 
> 
> On 06/30/2017 02:34 AM, Nikolay Shirokovskiy wrote:
>> At the time the check was written virtuozzo did not use disabled items in boot
>> order configuration. Boot items were always enabled. Now they can be disabled
>> as well. Supporting such items is easy - they just should be ignored.
>> ---
>>  src/vz/vz_sdk.c | 7 ++-----
>>  1 file changed, 2 insertions(+), 5 deletions(-)
>>
> 
> Is this a result of commit id '8c9252aa6' - if so, then it should be

No it's not.

> stated...  If not, what changed from the original commit '032c5bf98'
> that added the check is now making it unnecessary should be added to the
> commit message.

But the reason is mentioned in the commit message... Disabled items (not in use)
were not used in Virtuozzo at the time even the API have such an option. Now this
option is used and it's handling is trivial.

> 
> Reviewed-by: John Ferlan <jferlan@redhat.com>
> 
> I won't push yet though.
> 
> John
> 
>> diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
>> index 8ccd7ea..a6eb0dd 100644
>> --- a/src/vz/vz_sdk.c
>> +++ b/src/vz/vz_sdk.c
>> @@ -1736,11 +1736,8 @@ prlsdkConvertBootOrderVm(PRL_HANDLE sdkdom, virDomainDefPtr def)
>>          pret = PrlBootDev_IsInUse(bootDev, &inUse);
>>          prlsdkCheckRetGoto(pret, cleanup);
>>  
>> -        if (!inUse) {
>> -            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
>> -                           _("Boot ordering with disabled items is not supported"));
>> -            goto cleanup;
>> -        }
>> +        if (!inUse)
>> +            continue;
>>  
>>          pret = PrlBootDev_GetSequenceIndex(bootDev, &bootIndex);
>>          prlsdkCheckRetGoto(pret, cleanup);
>>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2] vz: support disabled items in vz boot order
Posted by John Ferlan 6 years, 8 months ago

On 08/23/2017 03:52 AM, Nikolay Shirokovskiy wrote:
> 
> 
> On 03.08.2017 15:18, John Ferlan wrote:
>>
>>
>> On 06/30/2017 02:34 AM, Nikolay Shirokovskiy wrote:
>>> At the time the check was written virtuozzo did not use disabled items in boot
>>> order configuration. Boot items were always enabled. Now they can be disabled
>>> as well. Supporting such items is easy - they just should be ignored.
>>> ---
>>>  src/vz/vz_sdk.c | 7 ++-----
>>>  1 file changed, 2 insertions(+), 5 deletions(-)
>>>
>>
>> Is this a result of commit id '8c9252aa6' - if so, then it should be
> 
> No it's not.
> 
>> stated...  If not, what changed from the original commit '032c5bf98'
>> that added the check is now making it unnecessary should be added to the
>> commit message.
> 
> But the reason is mentioned in the commit message... Disabled items (not in use)
> were not used in Virtuozzo at the time even the API have such an option. Now this
> option is used and it's handling is trivial.
> 

OK - it wasn't clear whether there was a particular commit or not...
I've pushed this as is.

Tks -

John

>>
>> Reviewed-by: John Ferlan <jferlan@redhat.com>
>>
>> I won't push yet though.
>>
>> John
>>
>>> diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
>>> index 8ccd7ea..a6eb0dd 100644
>>> --- a/src/vz/vz_sdk.c
>>> +++ b/src/vz/vz_sdk.c
>>> @@ -1736,11 +1736,8 @@ prlsdkConvertBootOrderVm(PRL_HANDLE sdkdom, virDomainDefPtr def)
>>>          pret = PrlBootDev_IsInUse(bootDev, &inUse);
>>>          prlsdkCheckRetGoto(pret, cleanup);
>>>  
>>> -        if (!inUse) {
>>> -            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
>>> -                           _("Boot ordering with disabled items is not supported"));
>>> -            goto cleanup;
>>> -        }
>>> +        if (!inUse)
>>> +            continue;
>>>  
>>>          pret = PrlBootDev_GetSequenceIndex(bootDev, &bootIndex);
>>>          prlsdkCheckRetGoto(pret, cleanup);
>>>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list