All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: drop writing error messages to xenstore
@ 2018-10-09 16:09 Juergen Gross
  2018-10-10 15:09 ` [Xen-devel] " Joao Martins
  2018-10-10 15:09 ` Joao Martins
  0 siblings, 2 replies; 15+ messages in thread
From: Juergen Gross @ 2018-10-09 16:09 UTC (permalink / raw)
  To: linux-kernel, xen-devel; +Cc: boris.ostrovsky, Juergen Gross

xenbus_va_dev_error() will try to write error messages to Xenstore
under the error/<dev-name>/error node (with <dev-name> something like
"device/vbd/51872"). This will fail normally and another message
about this failure is added to dmesg.

I believe this is a remnant from very ancient times, as it was added
in the first pvops rush of commits in 2007.

So remove the additional message when writing to Xenstore failed as
a minimum step.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
I am considering removing the Xenstore write altogether, but I'm
not sure it isn't needed e.g. by xend based installations. So please
speak up in case you know why this write is there.
---
 drivers/xen/xenbus/xenbus_client.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c
index a1c17000129b..e17ca8156171 100644
--- a/drivers/xen/xenbus/xenbus_client.c
+++ b/drivers/xen/xenbus/xenbus_client.c
@@ -278,10 +278,8 @@ static void xenbus_va_dev_error(struct xenbus_device *dev, int err,
 	dev_err(&dev->dev, "%s\n", printf_buffer);
 
 	path_buffer = kasprintf(GFP_KERNEL, "error/%s", dev->nodename);
-	if (!path_buffer ||
-	    xenbus_write(XBT_NIL, path_buffer, "error", printf_buffer))
-		dev_err(&dev->dev, "failed to write error node for %s (%s)\n",
-			dev->nodename, printf_buffer);
+	if (path_buffer)
+		xenbus_write(XBT_NIL, path_buffer, "error", printf_buffer);
 
 	kfree(printf_buffer);
 	kfree(path_buffer);
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH] xen: drop writing error messages to xenstore
  2018-10-09 16:09 [PATCH] xen: drop writing error messages to xenstore Juergen Gross
@ 2018-10-10 15:09 ` Joao Martins
  2018-10-10 15:53   ` Juergen Gross
  2018-10-10 15:53   ` Juergen Gross
  2018-10-10 15:09 ` Joao Martins
  1 sibling, 2 replies; 15+ messages in thread
From: Joao Martins @ 2018-10-10 15:09 UTC (permalink / raw)
  To: Juergen Gross; +Cc: linux-kernel, xen-devel, boris.ostrovsky

On 10/09/2018 05:09 PM, Juergen Gross wrote:
> xenbus_va_dev_error() will try to write error messages to Xenstore
> under the error/<dev-name>/error node (with <dev-name> something like
> "device/vbd/51872"). This will fail normally and another message
> about this failure is added to dmesg.
> 
> I believe this is a remnant from very ancient times, as it was added
> in the first pvops rush of commits in 2007.
> 
> So remove the additional message when writing to Xenstore failed as
> a minimum step.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> I am considering removing the Xenstore write altogether, but I'm
> not sure it isn't needed e.g. by xend based installations. So please
> speak up in case you know why this write is there.

So this:

"This will fail normally and another message about this failure is added to dmesg."

Brings me to the question: What about {stub,driver}domains? Ideally you
shouldn't be looking at domU's dmesg as a control domain no? I can't remember
any other error node, but if something fails e.g. netfront fails to allocate an
unbound event channel - how do you know the cause from the control domain
perspective?

Irrespective of xend or not: isn't this 'error' node the only one that
propagates error causes per device from domU?

	Joao

> ---
>  drivers/xen/xenbus/xenbus_client.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c
> index a1c17000129b..e17ca8156171 100644
> --- a/drivers/xen/xenbus/xenbus_client.c
> +++ b/drivers/xen/xenbus/xenbus_client.c
> @@ -278,10 +278,8 @@ static void xenbus_va_dev_error(struct xenbus_device *dev, int err,
>  	dev_err(&dev->dev, "%s\n", printf_buffer);
>  
>  	path_buffer = kasprintf(GFP_KERNEL, "error/%s", dev->nodename);
> -	if (!path_buffer ||
> -	    xenbus_write(XBT_NIL, path_buffer, "error", printf_buffer))
> -		dev_err(&dev->dev, "failed to write error node for %s (%s)\n",
> -			dev->nodename, printf_buffer);
> +	if (path_buffer)
> +		xenbus_write(XBT_NIL, path_buffer, "error", printf_buffer);
>  
>  	kfree(printf_buffer);
>  	kfree(path_buffer);
> 

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] xen: drop writing error messages to xenstore
  2018-10-09 16:09 [PATCH] xen: drop writing error messages to xenstore Juergen Gross
  2018-10-10 15:09 ` [Xen-devel] " Joao Martins
@ 2018-10-10 15:09 ` Joao Martins
  1 sibling, 0 replies; 15+ messages in thread
From: Joao Martins @ 2018-10-10 15:09 UTC (permalink / raw)
  To: Juergen Gross; +Cc: xen-devel, boris.ostrovsky, linux-kernel

On 10/09/2018 05:09 PM, Juergen Gross wrote:
> xenbus_va_dev_error() will try to write error messages to Xenstore
> under the error/<dev-name>/error node (with <dev-name> something like
> "device/vbd/51872"). This will fail normally and another message
> about this failure is added to dmesg.
> 
> I believe this is a remnant from very ancient times, as it was added
> in the first pvops rush of commits in 2007.
> 
> So remove the additional message when writing to Xenstore failed as
> a minimum step.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> I am considering removing the Xenstore write altogether, but I'm
> not sure it isn't needed e.g. by xend based installations. So please
> speak up in case you know why this write is there.

So this:

"This will fail normally and another message about this failure is added to dmesg."

Brings me to the question: What about {stub,driver}domains? Ideally you
shouldn't be looking at domU's dmesg as a control domain no? I can't remember
any other error node, but if something fails e.g. netfront fails to allocate an
unbound event channel - how do you know the cause from the control domain
perspective?

Irrespective of xend or not: isn't this 'error' node the only one that
propagates error causes per device from domU?

	Joao

> ---
>  drivers/xen/xenbus/xenbus_client.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c
> index a1c17000129b..e17ca8156171 100644
> --- a/drivers/xen/xenbus/xenbus_client.c
> +++ b/drivers/xen/xenbus/xenbus_client.c
> @@ -278,10 +278,8 @@ static void xenbus_va_dev_error(struct xenbus_device *dev, int err,
>  	dev_err(&dev->dev, "%s\n", printf_buffer);
>  
>  	path_buffer = kasprintf(GFP_KERNEL, "error/%s", dev->nodename);
> -	if (!path_buffer ||
> -	    xenbus_write(XBT_NIL, path_buffer, "error", printf_buffer))
> -		dev_err(&dev->dev, "failed to write error node for %s (%s)\n",
> -			dev->nodename, printf_buffer);
> +	if (path_buffer)
> +		xenbus_write(XBT_NIL, path_buffer, "error", printf_buffer);
>  
>  	kfree(printf_buffer);
>  	kfree(path_buffer);
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH] xen: drop writing error messages to xenstore
  2018-10-10 15:09 ` [Xen-devel] " Joao Martins
@ 2018-10-10 15:53   ` Juergen Gross
  2018-10-10 16:57     ` Boris Ostrovsky
  2018-10-10 16:57     ` [Xen-devel] " Boris Ostrovsky
  2018-10-10 15:53   ` Juergen Gross
  1 sibling, 2 replies; 15+ messages in thread
From: Juergen Gross @ 2018-10-10 15:53 UTC (permalink / raw)
  To: Joao Martins; +Cc: linux-kernel, xen-devel, boris.ostrovsky

On 10/10/2018 17:09, Joao Martins wrote:
> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>> xenbus_va_dev_error() will try to write error messages to Xenstore
>> under the error/<dev-name>/error node (with <dev-name> something like
>> "device/vbd/51872"). This will fail normally and another message
>> about this failure is added to dmesg.
>>
>> I believe this is a remnant from very ancient times, as it was added
>> in the first pvops rush of commits in 2007.
>>
>> So remove the additional message when writing to Xenstore failed as
>> a minimum step.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>> I am considering removing the Xenstore write altogether, but I'm
>> not sure it isn't needed e.g. by xend based installations. So please
>> speak up in case you know why this write is there.
> 
> So this:
> 
> "This will fail normally and another message about this failure is added to dmesg."
> 
> Brings me to the question: What about {stub,driver}domains? Ideally you
> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
> any other error node, but if something fails e.g. netfront fails to allocate an
> unbound event channel - how do you know the cause from the control domain
> perspective?
> 
> Irrespective of xend or not: isn't this 'error' node the only one that
> propagates error causes per device from domU?

What does it help you in dom0 if you have an error message in Xenstore
if a frontend driver couldn't do its job? Is there anything you can do
as a Xen admin?

I believe you'll have to look into the guest anyway, so there is no need
to have a message in the guest and one in Xenstore. The messages are
text only and can be evaluated only if you know guest internals.

blkfront for example prints an errno value into the message. I guess a
windows guest wouldn't do that, or it could use other values for the
same problem.


Juergen

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] xen: drop writing error messages to xenstore
  2018-10-10 15:09 ` [Xen-devel] " Joao Martins
  2018-10-10 15:53   ` Juergen Gross
@ 2018-10-10 15:53   ` Juergen Gross
  1 sibling, 0 replies; 15+ messages in thread
From: Juergen Gross @ 2018-10-10 15:53 UTC (permalink / raw)
  To: Joao Martins; +Cc: xen-devel, boris.ostrovsky, linux-kernel

On 10/10/2018 17:09, Joao Martins wrote:
> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>> xenbus_va_dev_error() will try to write error messages to Xenstore
>> under the error/<dev-name>/error node (with <dev-name> something like
>> "device/vbd/51872"). This will fail normally and another message
>> about this failure is added to dmesg.
>>
>> I believe this is a remnant from very ancient times, as it was added
>> in the first pvops rush of commits in 2007.
>>
>> So remove the additional message when writing to Xenstore failed as
>> a minimum step.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>> I am considering removing the Xenstore write altogether, but I'm
>> not sure it isn't needed e.g. by xend based installations. So please
>> speak up in case you know why this write is there.
> 
> So this:
> 
> "This will fail normally and another message about this failure is added to dmesg."
> 
> Brings me to the question: What about {stub,driver}domains? Ideally you
> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
> any other error node, but if something fails e.g. netfront fails to allocate an
> unbound event channel - how do you know the cause from the control domain
> perspective?
> 
> Irrespective of xend or not: isn't this 'error' node the only one that
> propagates error causes per device from domU?

What does it help you in dom0 if you have an error message in Xenstore
if a frontend driver couldn't do its job? Is there anything you can do
as a Xen admin?

I believe you'll have to look into the guest anyway, so there is no need
to have a message in the guest and one in Xenstore. The messages are
text only and can be evaluated only if you know guest internals.

blkfront for example prints an errno value into the message. I guess a
windows guest wouldn't do that, or it could use other values for the
same problem.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH] xen: drop writing error messages to xenstore
  2018-10-10 15:53   ` Juergen Gross
  2018-10-10 16:57     ` Boris Ostrovsky
@ 2018-10-10 16:57     ` Boris Ostrovsky
  2018-10-11  5:05       ` Juergen Gross
  2018-10-11  5:05       ` Juergen Gross
  1 sibling, 2 replies; 15+ messages in thread
From: Boris Ostrovsky @ 2018-10-10 16:57 UTC (permalink / raw)
  To: Juergen Gross, Joao Martins; +Cc: linux-kernel, xen-devel

On 10/10/18 11:53 AM, Juergen Gross wrote:
> On 10/10/2018 17:09, Joao Martins wrote:
>> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>>> xenbus_va_dev_error() will try to write error messages to Xenstore
>>> under the error/<dev-name>/error node (with <dev-name> something like
>>> "device/vbd/51872"). This will fail normally and another message
>>> about this failure is added to dmesg.
>>>
>>> I believe this is a remnant from very ancient times, as it was added
>>> in the first pvops rush of commits in 2007.
>>>
>>> So remove the additional message when writing to Xenstore failed as
>>> a minimum step.
>>>
>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>> ---
>>> I am considering removing the Xenstore write altogether, but I'm
>>> not sure it isn't needed e.g. by xend based installations. So please
>>> speak up in case you know why this write is there.
>> So this:
>>
>> "This will fail normally and another message about this failure is added to dmesg."
>>
>> Brings me to the question: What about {stub,driver}domains? Ideally you
>> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
>> any other error node, but if something fails e.g. netfront fails to allocate an
>> unbound event channel - how do you know the cause from the control domain
>> perspective?
>>
>> Irrespective of xend or not: isn't this 'error' node the only one that
>> propagates error causes per device from domU?
> What does it help you in dom0 if you have an error message in Xenstore
> if a frontend driver couldn't do its job? Is there anything you can do
> as a Xen admin?

The admin may want to know, for example, that a hotplug in the guest failed.

-boris

>
> I believe you'll have to look into the guest anyway, so there is no need
> to have a message in the guest and one in Xenstore. The messages are
> text only and can be evaluated only if you know guest internals.
>
> blkfront for example prints an errno value into the message. I guess a
> windows guest wouldn't do that, or it could use other values for the
> same problem.
>
>
> Juergen


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] xen: drop writing error messages to xenstore
  2018-10-10 15:53   ` Juergen Gross
@ 2018-10-10 16:57     ` Boris Ostrovsky
  2018-10-10 16:57     ` [Xen-devel] " Boris Ostrovsky
  1 sibling, 0 replies; 15+ messages in thread
From: Boris Ostrovsky @ 2018-10-10 16:57 UTC (permalink / raw)
  To: Juergen Gross, Joao Martins; +Cc: xen-devel, linux-kernel

On 10/10/18 11:53 AM, Juergen Gross wrote:
> On 10/10/2018 17:09, Joao Martins wrote:
>> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>>> xenbus_va_dev_error() will try to write error messages to Xenstore
>>> under the error/<dev-name>/error node (with <dev-name> something like
>>> "device/vbd/51872"). This will fail normally and another message
>>> about this failure is added to dmesg.
>>>
>>> I believe this is a remnant from very ancient times, as it was added
>>> in the first pvops rush of commits in 2007.
>>>
>>> So remove the additional message when writing to Xenstore failed as
>>> a minimum step.
>>>
>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>> ---
>>> I am considering removing the Xenstore write altogether, but I'm
>>> not sure it isn't needed e.g. by xend based installations. So please
>>> speak up in case you know why this write is there.
>> So this:
>>
>> "This will fail normally and another message about this failure is added to dmesg."
>>
>> Brings me to the question: What about {stub,driver}domains? Ideally you
>> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
>> any other error node, but if something fails e.g. netfront fails to allocate an
>> unbound event channel - how do you know the cause from the control domain
>> perspective?
>>
>> Irrespective of xend or not: isn't this 'error' node the only one that
>> propagates error causes per device from domU?
> What does it help you in dom0 if you have an error message in Xenstore
> if a frontend driver couldn't do its job? Is there anything you can do
> as a Xen admin?

The admin may want to know, for example, that a hotplug in the guest failed.

-boris

>
> I believe you'll have to look into the guest anyway, so there is no need
> to have a message in the guest and one in Xenstore. The messages are
> text only and can be evaluated only if you know guest internals.
>
> blkfront for example prints an errno value into the message. I guess a
> windows guest wouldn't do that, or it could use other values for the
> same problem.
>
>
> Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH] xen: drop writing error messages to xenstore
  2018-10-10 16:57     ` [Xen-devel] " Boris Ostrovsky
@ 2018-10-11  5:05       ` Juergen Gross
  2018-10-11 11:03         ` Joao Martins
  2018-10-11 11:03         ` [Xen-devel] " Joao Martins
  2018-10-11  5:05       ` Juergen Gross
  1 sibling, 2 replies; 15+ messages in thread
From: Juergen Gross @ 2018-10-11  5:05 UTC (permalink / raw)
  To: Boris Ostrovsky, Joao Martins; +Cc: linux-kernel, xen-devel

On 10/10/2018 18:57, Boris Ostrovsky wrote:
> On 10/10/18 11:53 AM, Juergen Gross wrote:
>> On 10/10/2018 17:09, Joao Martins wrote:
>>> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>>>> xenbus_va_dev_error() will try to write error messages to Xenstore
>>>> under the error/<dev-name>/error node (with <dev-name> something like
>>>> "device/vbd/51872"). This will fail normally and another message
>>>> about this failure is added to dmesg.
>>>>
>>>> I believe this is a remnant from very ancient times, as it was added
>>>> in the first pvops rush of commits in 2007.
>>>>
>>>> So remove the additional message when writing to Xenstore failed as
>>>> a minimum step.
>>>>
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>> ---
>>>> I am considering removing the Xenstore write altogether, but I'm
>>>> not sure it isn't needed e.g. by xend based installations. So please
>>>> speak up in case you know why this write is there.
>>> So this:
>>>
>>> "This will fail normally and another message about this failure is added to dmesg."
>>>
>>> Brings me to the question: What about {stub,driver}domains? Ideally you
>>> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
>>> any other error node, but if something fails e.g. netfront fails to allocate an
>>> unbound event channel - how do you know the cause from the control domain
>>> perspective?
>>>
>>> Irrespective of xend or not: isn't this 'error' node the only one that
>>> propagates error causes per device from domU?
>> What does it help you in dom0 if you have an error message in Xenstore
>> if a frontend driver couldn't do its job? Is there anything you can do
>> as a Xen admin?
> 
> The admin may want to know, for example, that a hotplug in the guest failed.

Shouldn't he ask the guest for that? There are dozens of other possible
problems letting hotplug fail which won't write anything to Xenstore.

This might be interesting for development/test purposes, but I really
question it to stay in mature code.


Juergen

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] xen: drop writing error messages to xenstore
  2018-10-10 16:57     ` [Xen-devel] " Boris Ostrovsky
  2018-10-11  5:05       ` Juergen Gross
@ 2018-10-11  5:05       ` Juergen Gross
  1 sibling, 0 replies; 15+ messages in thread
From: Juergen Gross @ 2018-10-11  5:05 UTC (permalink / raw)
  To: Boris Ostrovsky, Joao Martins; +Cc: xen-devel, linux-kernel

On 10/10/2018 18:57, Boris Ostrovsky wrote:
> On 10/10/18 11:53 AM, Juergen Gross wrote:
>> On 10/10/2018 17:09, Joao Martins wrote:
>>> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>>>> xenbus_va_dev_error() will try to write error messages to Xenstore
>>>> under the error/<dev-name>/error node (with <dev-name> something like
>>>> "device/vbd/51872"). This will fail normally and another message
>>>> about this failure is added to dmesg.
>>>>
>>>> I believe this is a remnant from very ancient times, as it was added
>>>> in the first pvops rush of commits in 2007.
>>>>
>>>> So remove the additional message when writing to Xenstore failed as
>>>> a minimum step.
>>>>
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>> ---
>>>> I am considering removing the Xenstore write altogether, but I'm
>>>> not sure it isn't needed e.g. by xend based installations. So please
>>>> speak up in case you know why this write is there.
>>> So this:
>>>
>>> "This will fail normally and another message about this failure is added to dmesg."
>>>
>>> Brings me to the question: What about {stub,driver}domains? Ideally you
>>> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
>>> any other error node, but if something fails e.g. netfront fails to allocate an
>>> unbound event channel - how do you know the cause from the control domain
>>> perspective?
>>>
>>> Irrespective of xend or not: isn't this 'error' node the only one that
>>> propagates error causes per device from domU?
>> What does it help you in dom0 if you have an error message in Xenstore
>> if a frontend driver couldn't do its job? Is there anything you can do
>> as a Xen admin?
> 
> The admin may want to know, for example, that a hotplug in the guest failed.

Shouldn't he ask the guest for that? There are dozens of other possible
problems letting hotplug fail which won't write anything to Xenstore.

This might be interesting for development/test purposes, but I really
question it to stay in mature code.


Juergen

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH] xen: drop writing error messages to xenstore
  2018-10-11  5:05       ` Juergen Gross
  2018-10-11 11:03         ` Joao Martins
@ 2018-10-11 11:03         ` Joao Martins
  2018-10-25 12:36           ` Juergen Gross
  2018-10-25 12:36           ` [Xen-devel] " Juergen Gross
  1 sibling, 2 replies; 15+ messages in thread
From: Joao Martins @ 2018-10-11 11:03 UTC (permalink / raw)
  To: Juergen Gross, Boris Ostrovsky; +Cc: linux-kernel, xen-devel

On 10/11/2018 06:05 AM, Juergen Gross wrote:
> On 10/10/2018 18:57, Boris Ostrovsky wrote:
>> On 10/10/18 11:53 AM, Juergen Gross wrote:
>>> On 10/10/2018 17:09, Joao Martins wrote:
>>>> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>>>>> xenbus_va_dev_error() will try to write error messages to Xenstore
>>>>> under the error/<dev-name>/error node (with <dev-name> something like
>>>>> "device/vbd/51872"). This will fail normally and another message
>>>>> about this failure is added to dmesg.
>>>>>
>>>>> I believe this is a remnant from very ancient times, as it was added
>>>>> in the first pvops rush of commits in 2007.
>>>>>
>>>>> So remove the additional message when writing to Xenstore failed as
>>>>> a minimum step.
>>>>>
>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>> ---
>>>>> I am considering removing the Xenstore write altogether, but I'm
>>>>> not sure it isn't needed e.g. by xend based installations. So please
>>>>> speak up in case you know why this write is there.
>>>> So this:
>>>>
>>>> "This will fail normally and another message about this failure is added to dmesg."
>>>>
>>>> Brings me to the question: What about {stub,driver}domains? Ideally you
>>>> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
>>>> any other error node, but if something fails e.g. netfront fails to allocate an
>>>> unbound event channel - how do you know the cause from the control domain
>>>> perspective?
>>>>
>>>> Irrespective of xend or not: isn't this 'error' node the only one that
>>>> propagates error causes per device from domU?
>>> What does it help you in dom0 if you have an error message in Xenstore
>>> if a frontend driver couldn't do its job? Is there anything you can do
>>> as a Xen admin?
>>
>> The admin may want to know, for example, that a hotplug in the guest failed.
> 
> Shouldn't he ask the guest for that? There are dozens of other possible
> problems letting hotplug fail which won't write anything to Xenstore.
> 
But I think nothing stops people from using their own hotplug script that could
use this error node (or even something else).

> This might be interesting for development/test purposes, but I really
> question it to stay in mature code.
> 
You're right in all of it: it doesn't convey the error in a agnostic manner, ATM
doesn't report all errors involved in the device setup, and when a
xenbus_dev_fatal happens you might end up looking at the guest anyways. But
there might be users right now of this node e.g. cases where you have a bunch of
known/trusted Linux guests working as backends (which also use this error node,
it's not just frontends *I think*) which you would be able to recognize the
error messages to inform the admin e.g. maybe QubesOS? It is merely an
informative error message node, but it seems better than just a simple
XenbusClosed state, with many reasons that it could lead to. Anyhow, just my 2c.

Cheers,
	Joao

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] xen: drop writing error messages to xenstore
  2018-10-11  5:05       ` Juergen Gross
@ 2018-10-11 11:03         ` Joao Martins
  2018-10-11 11:03         ` [Xen-devel] " Joao Martins
  1 sibling, 0 replies; 15+ messages in thread
From: Joao Martins @ 2018-10-11 11:03 UTC (permalink / raw)
  To: Juergen Gross, Boris Ostrovsky; +Cc: xen-devel, linux-kernel

On 10/11/2018 06:05 AM, Juergen Gross wrote:
> On 10/10/2018 18:57, Boris Ostrovsky wrote:
>> On 10/10/18 11:53 AM, Juergen Gross wrote:
>>> On 10/10/2018 17:09, Joao Martins wrote:
>>>> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>>>>> xenbus_va_dev_error() will try to write error messages to Xenstore
>>>>> under the error/<dev-name>/error node (with <dev-name> something like
>>>>> "device/vbd/51872"). This will fail normally and another message
>>>>> about this failure is added to dmesg.
>>>>>
>>>>> I believe this is a remnant from very ancient times, as it was added
>>>>> in the first pvops rush of commits in 2007.
>>>>>
>>>>> So remove the additional message when writing to Xenstore failed as
>>>>> a minimum step.
>>>>>
>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>> ---
>>>>> I am considering removing the Xenstore write altogether, but I'm
>>>>> not sure it isn't needed e.g. by xend based installations. So please
>>>>> speak up in case you know why this write is there.
>>>> So this:
>>>>
>>>> "This will fail normally and another message about this failure is added to dmesg."
>>>>
>>>> Brings me to the question: What about {stub,driver}domains? Ideally you
>>>> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
>>>> any other error node, but if something fails e.g. netfront fails to allocate an
>>>> unbound event channel - how do you know the cause from the control domain
>>>> perspective?
>>>>
>>>> Irrespective of xend or not: isn't this 'error' node the only one that
>>>> propagates error causes per device from domU?
>>> What does it help you in dom0 if you have an error message in Xenstore
>>> if a frontend driver couldn't do its job? Is there anything you can do
>>> as a Xen admin?
>>
>> The admin may want to know, for example, that a hotplug in the guest failed.
> 
> Shouldn't he ask the guest for that? There are dozens of other possible
> problems letting hotplug fail which won't write anything to Xenstore.
> 
But I think nothing stops people from using their own hotplug script that could
use this error node (or even something else).

> This might be interesting for development/test purposes, but I really
> question it to stay in mature code.
> 
You're right in all of it: it doesn't convey the error in a agnostic manner, ATM
doesn't report all errors involved in the device setup, and when a
xenbus_dev_fatal happens you might end up looking at the guest anyways. But
there might be users right now of this node e.g. cases where you have a bunch of
known/trusted Linux guests working as backends (which also use this error node,
it's not just frontends *I think*) which you would be able to recognize the
error messages to inform the admin e.g. maybe QubesOS? It is merely an
informative error message node, but it seems better than just a simple
XenbusClosed state, with many reasons that it could lead to. Anyhow, just my 2c.

Cheers,
	Joao

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH] xen: drop writing error messages to xenstore
  2018-10-11 11:03         ` [Xen-devel] " Joao Martins
  2018-10-25 12:36           ` Juergen Gross
@ 2018-10-25 12:36           ` Juergen Gross
  2018-10-25 15:50             ` Boris Ostrovsky
  2018-10-25 15:50             ` Boris Ostrovsky
  1 sibling, 2 replies; 15+ messages in thread
From: Juergen Gross @ 2018-10-25 12:36 UTC (permalink / raw)
  To: Joao Martins, Boris Ostrovsky; +Cc: linux-kernel, xen-devel

On 11/10/2018 13:03, Joao Martins wrote:
> On 10/11/2018 06:05 AM, Juergen Gross wrote:
>> On 10/10/2018 18:57, Boris Ostrovsky wrote:
>>> On 10/10/18 11:53 AM, Juergen Gross wrote:
>>>> On 10/10/2018 17:09, Joao Martins wrote:
>>>>> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>>>>>> xenbus_va_dev_error() will try to write error messages to Xenstore
>>>>>> under the error/<dev-name>/error node (with <dev-name> something like
>>>>>> "device/vbd/51872"). This will fail normally and another message
>>>>>> about this failure is added to dmesg.
>>>>>>
>>>>>> I believe this is a remnant from very ancient times, as it was added
>>>>>> in the first pvops rush of commits in 2007.
>>>>>>
>>>>>> So remove the additional message when writing to Xenstore failed as
>>>>>> a minimum step.
>>>>>>
>>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>>> ---
>>>>>> I am considering removing the Xenstore write altogether, but I'm
>>>>>> not sure it isn't needed e.g. by xend based installations. So please
>>>>>> speak up in case you know why this write is there.
>>>>> So this:
>>>>>
>>>>> "This will fail normally and another message about this failure is added to dmesg."
>>>>>
>>>>> Brings me to the question: What about {stub,driver}domains? Ideally you
>>>>> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
>>>>> any other error node, but if something fails e.g. netfront fails to allocate an
>>>>> unbound event channel - how do you know the cause from the control domain
>>>>> perspective?
>>>>>
>>>>> Irrespective of xend or not: isn't this 'error' node the only one that
>>>>> propagates error causes per device from domU?
>>>> What does it help you in dom0 if you have an error message in Xenstore
>>>> if a frontend driver couldn't do its job? Is there anything you can do
>>>> as a Xen admin?
>>>
>>> The admin may want to know, for example, that a hotplug in the guest failed.
>>
>> Shouldn't he ask the guest for that? There are dozens of other possible
>> problems letting hotplug fail which won't write anything to Xenstore.
>>
> But I think nothing stops people from using their own hotplug script that could
> use this error node (or even something else).
> 
>> This might be interesting for development/test purposes, but I really
>> question it to stay in mature code.
>>
> You're right in all of it: it doesn't convey the error in a agnostic manner, ATM
> doesn't report all errors involved in the device setup, and when a
> xenbus_dev_fatal happens you might end up looking at the guest anyways. But
> there might be users right now of this node e.g. cases where you have a bunch of
> known/trusted Linux guests working as backends (which also use this error node,
> it's not just frontends *I think*) which you would be able to recognize the
> error messages to inform the admin e.g. maybe QubesOS? It is merely an
> informative error message node, but it seems better than just a simple
> XenbusClosed state, with many reasons that it could lead to. Anyhow, just my 2c.

If there are any users this will be in rather old Xen versions only, as
writing the Xenstore node is _failing_ with newer Xen versions (that was
the original reason for writing that patch).

So back to my patch: any reason not to take it? After all it will only
remove the not very helpful kernel message that writing the Xenstore
node failed.


Juergen


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] xen: drop writing error messages to xenstore
  2018-10-11 11:03         ` [Xen-devel] " Joao Martins
@ 2018-10-25 12:36           ` Juergen Gross
  2018-10-25 12:36           ` [Xen-devel] " Juergen Gross
  1 sibling, 0 replies; 15+ messages in thread
From: Juergen Gross @ 2018-10-25 12:36 UTC (permalink / raw)
  To: Joao Martins, Boris Ostrovsky; +Cc: xen-devel, linux-kernel

On 11/10/2018 13:03, Joao Martins wrote:
> On 10/11/2018 06:05 AM, Juergen Gross wrote:
>> On 10/10/2018 18:57, Boris Ostrovsky wrote:
>>> On 10/10/18 11:53 AM, Juergen Gross wrote:
>>>> On 10/10/2018 17:09, Joao Martins wrote:
>>>>> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>>>>>> xenbus_va_dev_error() will try to write error messages to Xenstore
>>>>>> under the error/<dev-name>/error node (with <dev-name> something like
>>>>>> "device/vbd/51872"). This will fail normally and another message
>>>>>> about this failure is added to dmesg.
>>>>>>
>>>>>> I believe this is a remnant from very ancient times, as it was added
>>>>>> in the first pvops rush of commits in 2007.
>>>>>>
>>>>>> So remove the additional message when writing to Xenstore failed as
>>>>>> a minimum step.
>>>>>>
>>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>>> ---
>>>>>> I am considering removing the Xenstore write altogether, but I'm
>>>>>> not sure it isn't needed e.g. by xend based installations. So please
>>>>>> speak up in case you know why this write is there.
>>>>> So this:
>>>>>
>>>>> "This will fail normally and another message about this failure is added to dmesg."
>>>>>
>>>>> Brings me to the question: What about {stub,driver}domains? Ideally you
>>>>> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
>>>>> any other error node, but if something fails e.g. netfront fails to allocate an
>>>>> unbound event channel - how do you know the cause from the control domain
>>>>> perspective?
>>>>>
>>>>> Irrespective of xend or not: isn't this 'error' node the only one that
>>>>> propagates error causes per device from domU?
>>>> What does it help you in dom0 if you have an error message in Xenstore
>>>> if a frontend driver couldn't do its job? Is there anything you can do
>>>> as a Xen admin?
>>>
>>> The admin may want to know, for example, that a hotplug in the guest failed.
>>
>> Shouldn't he ask the guest for that? There are dozens of other possible
>> problems letting hotplug fail which won't write anything to Xenstore.
>>
> But I think nothing stops people from using their own hotplug script that could
> use this error node (or even something else).
> 
>> This might be interesting for development/test purposes, but I really
>> question it to stay in mature code.
>>
> You're right in all of it: it doesn't convey the error in a agnostic manner, ATM
> doesn't report all errors involved in the device setup, and when a
> xenbus_dev_fatal happens you might end up looking at the guest anyways. But
> there might be users right now of this node e.g. cases where you have a bunch of
> known/trusted Linux guests working as backends (which also use this error node,
> it's not just frontends *I think*) which you would be able to recognize the
> error messages to inform the admin e.g. maybe QubesOS? It is merely an
> informative error message node, but it seems better than just a simple
> XenbusClosed state, with many reasons that it could lead to. Anyhow, just my 2c.

If there are any users this will be in rather old Xen versions only, as
writing the Xenstore node is _failing_ with newer Xen versions (that was
the original reason for writing that patch).

So back to my patch: any reason not to take it? After all it will only
remove the not very helpful kernel message that writing the Xenstore
node failed.


Juergen


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [Xen-devel] [PATCH] xen: drop writing error messages to xenstore
  2018-10-25 12:36           ` [Xen-devel] " Juergen Gross
@ 2018-10-25 15:50             ` Boris Ostrovsky
  2018-10-25 15:50             ` Boris Ostrovsky
  1 sibling, 0 replies; 15+ messages in thread
From: Boris Ostrovsky @ 2018-10-25 15:50 UTC (permalink / raw)
  To: Juergen Gross, Joao Martins; +Cc: linux-kernel, xen-devel

On 10/25/18 8:36 AM, Juergen Gross wrote:
> On 11/10/2018 13:03, Joao Martins wrote:
>> On 10/11/2018 06:05 AM, Juergen Gross wrote:
>>> On 10/10/2018 18:57, Boris Ostrovsky wrote:
>>>> On 10/10/18 11:53 AM, Juergen Gross wrote:
>>>>> On 10/10/2018 17:09, Joao Martins wrote:
>>>>>> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>>>>>>> xenbus_va_dev_error() will try to write error messages to Xenstore
>>>>>>> under the error/<dev-name>/error node (with <dev-name> something like
>>>>>>> "device/vbd/51872"). This will fail normally and another message
>>>>>>> about this failure is added to dmesg.
>>>>>>>
>>>>>>> I believe this is a remnant from very ancient times, as it was added
>>>>>>> in the first pvops rush of commits in 2007.
>>>>>>>
>>>>>>> So remove the additional message when writing to Xenstore failed as
>>>>>>> a minimum step.
>>>>>>>
>>>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>>>> ---
>>>>>>> I am considering removing the Xenstore write altogether, but I'm
>>>>>>> not sure it isn't needed e.g. by xend based installations. So please
>>>>>>> speak up in case you know why this write is there.
>>>>>> So this:
>>>>>>
>>>>>> "This will fail normally and another message about this failure is added to dmesg."
>>>>>>
>>>>>> Brings me to the question: What about {stub,driver}domains? Ideally you
>>>>>> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
>>>>>> any other error node, but if something fails e.g. netfront fails to allocate an
>>>>>> unbound event channel - how do you know the cause from the control domain
>>>>>> perspective?
>>>>>>
>>>>>> Irrespective of xend or not: isn't this 'error' node the only one that
>>>>>> propagates error causes per device from domU?
>>>>> What does it help you in dom0 if you have an error message in Xenstore
>>>>> if a frontend driver couldn't do its job? Is there anything you can do
>>>>> as a Xen admin?
>>>> The admin may want to know, for example, that a hotplug in the guest failed.
>>> Shouldn't he ask the guest for that? There are dozens of other possible
>>> problems letting hotplug fail which won't write anything to Xenstore.
>>>
>> But I think nothing stops people from using their own hotplug script that could
>> use this error node (or even something else).
>>
>>> This might be interesting for development/test purposes, but I really
>>> question it to stay in mature code.
>>>
>> You're right in all of it: it doesn't convey the error in a agnostic manner, ATM
>> doesn't report all errors involved in the device setup, and when a
>> xenbus_dev_fatal happens you might end up looking at the guest anyways. But
>> there might be users right now of this node e.g. cases where you have a bunch of
>> known/trusted Linux guests working as backends (which also use this error node,
>> it's not just frontends *I think*) which you would be able to recognize the
>> error messages to inform the admin e.g. maybe QubesOS? It is merely an
>> informative error message node, but it seems better than just a simple
>> XenbusClosed state, with many reasons that it could lead to. Anyhow, just my 2c.
> If there are any users this will be in rather old Xen versions only, as
> writing the Xenstore node is _failing_ with newer Xen versions (that was
> the original reason for writing that patch).
>
> So back to my patch: any reason not to take it? After all it will only
> remove the not very helpful kernel message that writing the Xenstore
> node failed.

For the patch itself:

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracel.com>

(For the possible future removal of the write altogether --- I'd rather
keep it. "rather old versions" --- tragically, we are still on 4.4)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH] xen: drop writing error messages to xenstore
  2018-10-25 12:36           ` [Xen-devel] " Juergen Gross
  2018-10-25 15:50             ` Boris Ostrovsky
@ 2018-10-25 15:50             ` Boris Ostrovsky
  1 sibling, 0 replies; 15+ messages in thread
From: Boris Ostrovsky @ 2018-10-25 15:50 UTC (permalink / raw)
  To: Juergen Gross, Joao Martins; +Cc: xen-devel, linux-kernel

On 10/25/18 8:36 AM, Juergen Gross wrote:
> On 11/10/2018 13:03, Joao Martins wrote:
>> On 10/11/2018 06:05 AM, Juergen Gross wrote:
>>> On 10/10/2018 18:57, Boris Ostrovsky wrote:
>>>> On 10/10/18 11:53 AM, Juergen Gross wrote:
>>>>> On 10/10/2018 17:09, Joao Martins wrote:
>>>>>> On 10/09/2018 05:09 PM, Juergen Gross wrote:
>>>>>>> xenbus_va_dev_error() will try to write error messages to Xenstore
>>>>>>> under the error/<dev-name>/error node (with <dev-name> something like
>>>>>>> "device/vbd/51872"). This will fail normally and another message
>>>>>>> about this failure is added to dmesg.
>>>>>>>
>>>>>>> I believe this is a remnant from very ancient times, as it was added
>>>>>>> in the first pvops rush of commits in 2007.
>>>>>>>
>>>>>>> So remove the additional message when writing to Xenstore failed as
>>>>>>> a minimum step.
>>>>>>>
>>>>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>>>>> ---
>>>>>>> I am considering removing the Xenstore write altogether, but I'm
>>>>>>> not sure it isn't needed e.g. by xend based installations. So please
>>>>>>> speak up in case you know why this write is there.
>>>>>> So this:
>>>>>>
>>>>>> "This will fail normally and another message about this failure is added to dmesg."
>>>>>>
>>>>>> Brings me to the question: What about {stub,driver}domains? Ideally you
>>>>>> shouldn't be looking at domU's dmesg as a control domain no? I can't remember
>>>>>> any other error node, but if something fails e.g. netfront fails to allocate an
>>>>>> unbound event channel - how do you know the cause from the control domain
>>>>>> perspective?
>>>>>>
>>>>>> Irrespective of xend or not: isn't this 'error' node the only one that
>>>>>> propagates error causes per device from domU?
>>>>> What does it help you in dom0 if you have an error message in Xenstore
>>>>> if a frontend driver couldn't do its job? Is there anything you can do
>>>>> as a Xen admin?
>>>> The admin may want to know, for example, that a hotplug in the guest failed.
>>> Shouldn't he ask the guest for that? There are dozens of other possible
>>> problems letting hotplug fail which won't write anything to Xenstore.
>>>
>> But I think nothing stops people from using their own hotplug script that could
>> use this error node (or even something else).
>>
>>> This might be interesting for development/test purposes, but I really
>>> question it to stay in mature code.
>>>
>> You're right in all of it: it doesn't convey the error in a agnostic manner, ATM
>> doesn't report all errors involved in the device setup, and when a
>> xenbus_dev_fatal happens you might end up looking at the guest anyways. But
>> there might be users right now of this node e.g. cases where you have a bunch of
>> known/trusted Linux guests working as backends (which also use this error node,
>> it's not just frontends *I think*) which you would be able to recognize the
>> error messages to inform the admin e.g. maybe QubesOS? It is merely an
>> informative error message node, but it seems better than just a simple
>> XenbusClosed state, with many reasons that it could lead to. Anyhow, just my 2c.
> If there are any users this will be in rather old Xen versions only, as
> writing the Xenstore node is _failing_ with newer Xen versions (that was
> the original reason for writing that patch).
>
> So back to my patch: any reason not to take it? After all it will only
> remove the not very helpful kernel message that writing the Xenstore
> node failed.

For the patch itself:

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracel.com>

(For the possible future removal of the write altogether --- I'd rather
keep it. "rather old versions" --- tragically, we are still on 4.4)

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-10-25 15:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 16:09 [PATCH] xen: drop writing error messages to xenstore Juergen Gross
2018-10-10 15:09 ` [Xen-devel] " Joao Martins
2018-10-10 15:53   ` Juergen Gross
2018-10-10 16:57     ` Boris Ostrovsky
2018-10-10 16:57     ` [Xen-devel] " Boris Ostrovsky
2018-10-11  5:05       ` Juergen Gross
2018-10-11 11:03         ` Joao Martins
2018-10-11 11:03         ` [Xen-devel] " Joao Martins
2018-10-25 12:36           ` Juergen Gross
2018-10-25 12:36           ` [Xen-devel] " Juergen Gross
2018-10-25 15:50             ` Boris Ostrovsky
2018-10-25 15:50             ` Boris Ostrovsky
2018-10-11  5:05       ` Juergen Gross
2018-10-10 15:53   ` Juergen Gross
2018-10-10 15:09 ` Joao Martins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.