* [PATCH] dpkg-base: Warn about unmounting problems
@ 2019-10-02 7:12 Baurzhan Ismagulov
2019-10-02 7:29 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Baurzhan Ismagulov @ 2019-10-02 7:12 UTC (permalink / raw)
To: isar-users
From: Baurzhan Ismagulov <ibr@ilbers.de>
If a problem occurs, log umount's error messages and warn the user about
retrying.
Signed-off-by: Baurzhan Ismagulov <ibr@ilbers.de>
---
meta/classes/dpkg-base.bbclass | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 2e8a0d1..42eca62 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -1,5 +1,6 @@
# This software is a part of ISAR.
# Copyright (C) 2017-2019 Siemens AG
+# Copyright (C) 2019 ilbers GmbH
#
# SPDX-License-Identifier: MIT
@@ -78,8 +79,9 @@ dpkg_do_mounts() {
}
dpkg_undo_mounts() {
- while ! sudo umount ${BUILDROOT} 2>/dev/null; do
- sleep 0.1
+ while ! sudo umount ${BUILDROOT}; do
+ bbwarn "${BUILDROOT}: Couldn't unmount, retrying..."
+ sleep 1
done
sudo rmdir ${BUILDROOT}
}
--
2.20.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dpkg-base: Warn about unmounting problems
2019-10-02 7:12 [PATCH] dpkg-base: Warn about unmounting problems Baurzhan Ismagulov
@ 2019-10-02 7:29 ` Jan Kiszka
2019-10-02 7:54 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2019-10-02 7:29 UTC (permalink / raw)
To: Baurzhan Ismagulov, isar-users
On 02.10.19 09:12, Baurzhan Ismagulov wrote:
> From: Baurzhan Ismagulov <ibr@ilbers.de>
>
> If a problem occurs, log umount's error messages and warn the user about
> retrying.
>
> Signed-off-by: Baurzhan Ismagulov <ibr@ilbers.de>
> ---
> meta/classes/dpkg-base.bbclass | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> index 2e8a0d1..42eca62 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -1,5 +1,6 @@
> # This software is a part of ISAR.
> # Copyright (C) 2017-2019 Siemens AG
> +# Copyright (C) 2019 ilbers GmbH
> #
> # SPDX-License-Identifier: MIT
>
> @@ -78,8 +79,9 @@ dpkg_do_mounts() {
> }
>
> dpkg_undo_mounts() {
> - while ! sudo umount ${BUILDROOT} 2>/dev/null; do
> - sleep 0.1
> + while ! sudo umount ${BUILDROOT}; do
> + bbwarn "${BUILDROOT}: Couldn't unmount, retrying..."
> + sleep 1
This needlessly extends the waiting time by using a course-grained delay. And
let's only warn warn after a some seconds.
Jan
> done
> sudo rmdir ${BUILDROOT}
> }
>
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dpkg-base: Warn about unmounting problems
2019-10-02 7:29 ` Jan Kiszka
@ 2019-10-02 7:54 ` Jan Kiszka
2019-10-02 9:29 ` Baurzhan Ismagulov
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2019-10-02 7:54 UTC (permalink / raw)
To: Baurzhan Ismagulov, isar-users
On 02.10.19 09:29, [ext] Jan Kiszka wrote:
> On 02.10.19 09:12, Baurzhan Ismagulov wrote:
>> From: Baurzhan Ismagulov <ibr@ilbers.de>
>>
>> If a problem occurs, log umount's error messages and warn the user about
>> retrying.
>>
>> Signed-off-by: Baurzhan Ismagulov <ibr@ilbers.de>
>> ---
>> meta/classes/dpkg-base.bbclass | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
>> index 2e8a0d1..42eca62 100644
>> --- a/meta/classes/dpkg-base.bbclass
>> +++ b/meta/classes/dpkg-base.bbclass
>> @@ -1,5 +1,6 @@
>> # This software is a part of ISAR.
>> # Copyright (C) 2017-2019 Siemens AG
>> +# Copyright (C) 2019 ilbers GmbH
>> #
>> # SPDX-License-Identifier: MIT
>> @@ -78,8 +79,9 @@ dpkg_do_mounts() {
>> }
>> dpkg_undo_mounts() {
>> - while ! sudo umount ${BUILDROOT} 2>/dev/null; do
>> - sleep 0.1
>> + while ! sudo umount ${BUILDROOT}; do
>> + bbwarn "${BUILDROOT}: Couldn't unmount, retrying..."
>> + sleep 1
>
> This needlessly extends the waiting time by using a course-grained delay. And
> let's only warn warn after a some seconds.
To make it clearer: I've seen delays (i.e. failures before this patch), but I
haven't measured them. I could imagine, though, that most of them are short
races. And then a warning should only be issued when the delays become
excessive, maybe 10 seconds.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] dpkg-base: Warn about unmounting problems
2019-10-02 7:54 ` Jan Kiszka
@ 2019-10-02 9:29 ` Baurzhan Ismagulov
0 siblings, 0 replies; 4+ messages in thread
From: Baurzhan Ismagulov @ 2019-10-02 9:29 UTC (permalink / raw)
To: isar-users
On Wed, Oct 02, 2019 at 09:54:22AM +0200, Jan Kiszka wrote:
> > This needlessly extends the waiting time by using a course-grained
> > delay. And let's only warn warn after a some seconds.
>
> To make it clearer: I've seen delays (i.e. failures before this patch), but
> I haven't measured them. I could imagine, though, that most of them are
> short races. And then a warning should only be issued when the delays become
> excessive, maybe 10 seconds.
Thanks, will update.
With kind regards,
Baurzhan.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-02 9:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 7:12 [PATCH] dpkg-base: Warn about unmounting problems Baurzhan Ismagulov
2019-10-02 7:29 ` Jan Kiszka
2019-10-02 7:54 ` Jan Kiszka
2019-10-02 9:29 ` Baurzhan Ismagulov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox