* [PATCH v2] dpkg-base: Warn about unmounting problems
@ 2019-10-02 10:56 Baurzhan Ismagulov
2019-10-04 7:31 ` Jan Kiszka
0 siblings, 1 reply; 3+ messages in thread
From: Baurzhan Ismagulov @ 2019-10-02 10:56 UTC (permalink / raw)
To: isar-users
From: Baurzhan Ismagulov <ibr@ilbers.de>
If a problem occurs, log umount's error messages. Wait for the processes to
terminate and retry. If that doesn't help, warn the user about retrying
every 10 s to avoid clobbering CI logs.
Signed-off-by: Baurzhan Ismagulov <ibr@ilbers.de>
---
Changes in v2:
- Warn after some time.
meta/classes/dpkg-base.bbclass | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 2e8a0d1..006d8b1 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,14 @@ dpkg_do_mounts() {
}
dpkg_undo_mounts() {
- while ! sudo umount ${BUILDROOT} 2>/dev/null; do
+ i=1
+ while ! sudo umount ${BUILDROOT}; do
sleep 0.1
+ i=`expr $i + 1`
+ if [ $i -gt 100 ]; then
+ bbwarn "${BUILDROOT}: Couldn't unmount, retrying..."
+ i=1
+ fi
done
sudo rmdir ${BUILDROOT}
}
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dpkg-base: Warn about unmounting problems
2019-10-02 10:56 [PATCH v2] dpkg-base: Warn about unmounting problems Baurzhan Ismagulov
@ 2019-10-04 7:31 ` Jan Kiszka
2019-10-07 15:49 ` Baurzhan Ismagulov
0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2019-10-04 7:31 UTC (permalink / raw)
To: isar-users
On 02.10.19 12:56, Baurzhan Ismagulov wrote:
> From: Baurzhan Ismagulov <ibr@ilbers.de>
>
> If a problem occurs, log umount's error messages. Wait for the processes to
> terminate and retry. If that doesn't help, warn the user about retrying
> every 10 s to avoid clobbering CI logs.
>
> Signed-off-by: Baurzhan Ismagulov <ibr@ilbers.de>
> ---
> Changes in v2:
> - Warn after some time.
>
> meta/classes/dpkg-base.bbclass | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> index 2e8a0d1..006d8b1 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,14 @@ dpkg_do_mounts() {
> }
>
> dpkg_undo_mounts() {
> - while ! sudo umount ${BUILDROOT} 2>/dev/null; do
> + i=1
> + while ! sudo umount ${BUILDROOT}; do
> sleep 0.1
> + i=`expr $i + 1`
> + if [ $i -gt 100 ]; then
> + bbwarn "${BUILDROOT}: Couldn't unmount, retrying..."
> + i=1
> + fi
> done
> sudo rmdir ${BUILDROOT}
> }
>
Looks good to me.
Thanks,
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] dpkg-base: Warn about unmounting problems
2019-10-04 7:31 ` Jan Kiszka
@ 2019-10-07 15:49 ` Baurzhan Ismagulov
0 siblings, 0 replies; 3+ messages in thread
From: Baurzhan Ismagulov @ 2019-10-07 15:49 UTC (permalink / raw)
To: isar-users
On Fri, Oct 04, 2019 at 09:31:57AM +0200, Jan Kiszka wrote:
> > If a problem occurs, log umount's error messages. Wait for the processes to
> > terminate and retry. If that doesn't help, warn the user about retrying
> > every 10 s to avoid clobbering CI logs.
>
> Looks good to me.
Thanks, applied to next.
With kind regards,
Baurzhan.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-10-07 15:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-02 10:56 [PATCH v2] dpkg-base: Warn about unmounting problems Baurzhan Ismagulov
2019-10-04 7:31 ` Jan Kiszka
2019-10-07 15:49 ` Baurzhan Ismagulov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox