* [Qemu-devel] [PATCH qemu-ga] qemu-ga: Don't display errors to the user on thaw command
@ 2017-03-21 14:14 Sameeh Jubran
2017-04-02 7:33 ` Sameeh Jubran
2017-04-04 22:55 ` Michael Roth
0 siblings, 2 replies; 4+ messages in thread
From: Sameeh Jubran @ 2017-03-21 14:14 UTC (permalink / raw)
To: qemu-devel, Michael Roth; +Cc: Yan Vugenfirer
Errors that are related to ur inner implementation for the thaw command
shouldn't be displayed to the user.
Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
---
qga/vss-win32/requester.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
index 0cd2f0e..272e71b 100644
--- a/qga/vss-win32/requester.cpp
+++ b/qga/vss-win32/requester.cpp
@@ -463,7 +463,7 @@ void requester_thaw(int *num_vols, ErrorSet *errset)
hr = WaitForAsync(pAsync);
}
if (FAILED(hr)) {
- err_set(errset, hr, "failed to complete backup");
+ fprintf(stderr, "failed to complete backup");
}
break;
@@ -480,18 +480,18 @@ void requester_thaw(int *num_vols, ErrorSet *errset)
case VSS_E_UNEXPECTED_PROVIDER_ERROR:
if (WaitForSingleObject(vss_ctx.hEventTimeout, 0) != WAIT_OBJECT_0) {
- err_set(errset, hr, "unexpected error in VSS provider");
+ fprintf(stderr, "unexpected error in VSS provider");
break;
}
/* fall through if hEventTimeout is signaled */
case (HRESULT)VSS_E_HOLD_WRITES_TIMEOUT:
- err_set(errset, hr, "couldn't hold writes: "
+ fprintf(stderr, "couldn't hold writes: "
"fsfreeze is limited up to 10 seconds");
break;
default:
- err_set(errset, hr, "failed to do snapshot set");
+ fprintf(stderr, "failed to do snapshot set");
}
if (err_is_set(errset)) {
--
2.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH qemu-ga] qemu-ga: Don't display errors to the user on thaw command
2017-03-21 14:14 [Qemu-devel] [PATCH qemu-ga] qemu-ga: Don't display errors to the user on thaw command Sameeh Jubran
@ 2017-04-02 7:33 ` Sameeh Jubran
2017-04-04 22:55 ` Michael Roth
1 sibling, 0 replies; 4+ messages in thread
From: Sameeh Jubran @ 2017-04-02 7:33 UTC (permalink / raw)
To: QEMU Developers, Michael Roth; +Cc: Yan Vugenfirer
Ping.
On Tue, Mar 21, 2017 at 5:14 PM, Sameeh Jubran <sameeh@daynix.com> wrote:
> Errors that are related to ur inner implementation for the thaw command
> shouldn't be displayed to the user.
>
> Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
> ---
> qga/vss-win32/requester.cpp | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
> index 0cd2f0e..272e71b 100644
> --- a/qga/vss-win32/requester.cpp
> +++ b/qga/vss-win32/requester.cpp
> @@ -463,7 +463,7 @@ void requester_thaw(int *num_vols, ErrorSet *errset)
> hr = WaitForAsync(pAsync);
> }
> if (FAILED(hr)) {
> - err_set(errset, hr, "failed to complete backup");
> + fprintf(stderr, "failed to complete backup");
> }
> break;
>
> @@ -480,18 +480,18 @@ void requester_thaw(int *num_vols, ErrorSet *errset)
>
> case VSS_E_UNEXPECTED_PROVIDER_ERROR:
> if (WaitForSingleObject(vss_ctx.hEventTimeout, 0) !=
> WAIT_OBJECT_0) {
> - err_set(errset, hr, "unexpected error in VSS provider");
> + fprintf(stderr, "unexpected error in VSS provider");
> break;
> }
> /* fall through if hEventTimeout is signaled */
>
> case (HRESULT)VSS_E_HOLD_WRITES_TIMEOUT:
> - err_set(errset, hr, "couldn't hold writes: "
> + fprintf(stderr, "couldn't hold writes: "
> "fsfreeze is limited up to 10 seconds");
> break;
>
> default:
> - err_set(errset, hr, "failed to do snapshot set");
> + fprintf(stderr, "failed to do snapshot set");
> }
>
> if (err_is_set(errset)) {
> --
> 2.9.3
>
>
--
Respectfully,
*Sameeh Jubran*
*Linkedin <https://il.linkedin.com/pub/sameeh-jubran/87/747/a8a>*
*Software Engineer @ Daynix <http://www.daynix.com>.*
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH qemu-ga] qemu-ga: Don't display errors to the user on thaw command
2017-03-21 14:14 [Qemu-devel] [PATCH qemu-ga] qemu-ga: Don't display errors to the user on thaw command Sameeh Jubran
2017-04-02 7:33 ` Sameeh Jubran
@ 2017-04-04 22:55 ` Michael Roth
2017-04-05 14:34 ` Sameeh Jubran
1 sibling, 1 reply; 4+ messages in thread
From: Michael Roth @ 2017-04-04 22:55 UTC (permalink / raw)
To: Sameeh Jubran, qemu-devel; +Cc: Yan Vugenfirer
Quoting Sameeh Jubran (2017-03-21 09:14:35)
> Errors that are related to ur inner implementation for the thaw command
> shouldn't be displayed to the user.
>
> Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
> ---
> qga/vss-win32/requester.cpp | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
> index 0cd2f0e..272e71b 100644
> --- a/qga/vss-win32/requester.cpp
> +++ b/qga/vss-win32/requester.cpp
> @@ -463,7 +463,7 @@ void requester_thaw(int *num_vols, ErrorSet *errset)
> hr = WaitForAsync(pAsync);
> }
> if (FAILED(hr)) {
> - err_set(errset, hr, "failed to complete backup");
We cannot do this. If the freeze operation didn't successfully maintain
the frozen state for entire duration we *must* report an error to the
user, otherwise users have no way to know that their snapshot might be
completely corrupted. Well, I suppose they can look at
guest-fsfreeze-thaw's return value and check that it matches the number
of volumes that were originally frozen, but that aspect is intended as a
sanity check to identify situations outside of qemu-ga's control, like
another user/application unfreezing the filesystems before qemu-ga. This
situation *is* within qemu-ga's control, and should be reported as an
error. Same for the other failures below.
> + fprintf(stderr, "failed to complete backup");
> }
> break;
>
> @@ -480,18 +480,18 @@ void requester_thaw(int *num_vols, ErrorSet *errset)
>
> case VSS_E_UNEXPECTED_PROVIDER_ERROR:
> if (WaitForSingleObject(vss_ctx.hEventTimeout, 0) != WAIT_OBJECT_0) {
> - err_set(errset, hr, "unexpected error in VSS provider");
> + fprintf(stderr, "unexpected error in VSS provider");
> break;
> }
> /* fall through if hEventTimeout is signaled */
>
> case (HRESULT)VSS_E_HOLD_WRITES_TIMEOUT:
> - err_set(errset, hr, "couldn't hold writes: "
> + fprintf(stderr, "couldn't hold writes: "
> "fsfreeze is limited up to 10 seconds");
> break;
>
> default:
> - err_set(errset, hr, "failed to do snapshot set");
> + fprintf(stderr, "failed to do snapshot set");
> }
>
> if (err_is_set(errset)) {
> --
> 2.9.3
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH qemu-ga] qemu-ga: Don't display errors to the user on thaw command
2017-04-04 22:55 ` Michael Roth
@ 2017-04-05 14:34 ` Sameeh Jubran
0 siblings, 0 replies; 4+ messages in thread
From: Sameeh Jubran @ 2017-04-05 14:34 UTC (permalink / raw)
To: Michael Roth; +Cc: QEMU Developers, Yan Vugenfirer
On Wed, Apr 5, 2017 at 1:55 AM, Michael Roth <mdroth@linux.vnet.ibm.com>
wrote:
> Quoting Sameeh Jubran (2017-03-21 09:14:35)
> > Errors that are related to ur inner implementation for the thaw command
> > shouldn't be displayed to the user.
> >
> > Signed-off-by: Sameeh Jubran <sameeh@daynix.com>
> > ---
> > qga/vss-win32/requester.cpp | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/qga/vss-win32/requester.cpp b/qga/vss-win32/requester.cpp
> > index 0cd2f0e..272e71b 100644
> > --- a/qga/vss-win32/requester.cpp
> > +++ b/qga/vss-win32/requester.cpp
> > @@ -463,7 +463,7 @@ void requester_thaw(int *num_vols, ErrorSet *errset)
> > hr = WaitForAsync(pAsync);
> > }
> > if (FAILED(hr)) {
> > - err_set(errset, hr, "failed to complete backup");
>
> We cannot do this. If the freeze operation didn't successfully maintain
> the frozen state for entire duration we *must* report an error to the
> user, otherwise users have no way to know that their snapshot might be
> completely corrupted. Well, I suppose they can look at
> guest-fsfreeze-thaw's return value and check that it matches the number
> of volumes that were originally frozen, but that aspect is intended as a
> sanity check to identify situations outside of qemu-ga's control, like
> another user/application unfreezing the filesystems before qemu-ga. This
> situation *is* within qemu-ga's control, and should be reported as an
> error. Same for the other failures below.
This patch was introduced to hide the error "{"error": {"class":
"GenericError", "desc": "couldn't hold writes: fsfreeze is limited up to 10
seconds: "}" which shows up whenever we
execute thaw after 10 seconds have passed from freeze event and in order to
align the behaviour Windows with Linux. However I agree with you about
informing the user about possible
corruption during the backup operation.
>
> > + fprintf(stderr, "failed to complete backup");
> > }
> > break;
> >
> > @@ -480,18 +480,18 @@ void requester_thaw(int *num_vols, ErrorSet
> *errset)
> >
> > case VSS_E_UNEXPECTED_PROVIDER_ERROR:
> > if (WaitForSingleObject(vss_ctx.hEventTimeout, 0) !=
> WAIT_OBJECT_0) {
> > - err_set(errset, hr, "unexpected error in VSS provider");
> > + fprintf(stderr, "unexpected error in VSS provider");
> > break;
> > }
> > /* fall through if hEventTimeout is signaled */
> >
> > case (HRESULT)VSS_E_HOLD_WRITES_TIMEOUT:
> > - err_set(errset, hr, "couldn't hold writes: "
> > + fprintf(stderr, "couldn't hold writes: "
> > "fsfreeze is limited up to 10 seconds");
> > break;
> >
> > default:
> > - err_set(errset, hr, "failed to do snapshot set");
> > + fprintf(stderr, "failed to do snapshot set");
> > }
> >
> > if (err_is_set(errset)) {
> > --
> > 2.9.3
> >
>
>
--
Respectfully,
*Sameeh Jubran*
*Linkedin <https://il.linkedin.com/pub/sameeh-jubran/87/747/a8a>*
*Software Engineer @ Daynix <http://www.daynix.com>.*
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-05 14:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-21 14:14 [Qemu-devel] [PATCH qemu-ga] qemu-ga: Don't display errors to the user on thaw command Sameeh Jubran
2017-04-02 7:33 ` Sameeh Jubran
2017-04-04 22:55 ` Michael Roth
2017-04-05 14:34 ` Sameeh Jubran
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.