* [PATCH v2] deb-dl-dir: Avoid hanging mounts on failed download
@ 2024-10-24 10:09 Anton Mikanovich
2024-10-24 10:41 ` Uladzimir Bely
2024-10-25 13:57 ` Uladzimir Bely
0 siblings, 2 replies; 3+ messages in thread
From: Anton Mikanovich @ 2024-10-24 10:09 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
If apt-get fails during debsrc_download execution, one mount will be
left behind. If ISAR_FAIL_ON_CLEANUP is set to 1, an additional error
will be observed:
| Err:1 http://ftp.de.debian.org/debian bookworm/main rtmpdump 2.4+20151223.gitfa8646d.1-2 (dsc)
| Could not connect to ftp.de.debian.org:80 (141.76.2.4), connection timed out
| Err:2 http://ftp.de.debian.org/debian bookworm/main rtmpdump 2.4+20151223.gitfa8646d.1-2 (tar)
| Unable to connect to ftp.de.debian.org:80:
| Err:3 http://ftp.de.debian.org/debian bookworm/main rtmpdump 2.4+20151223.gitfa8646d.1-2 (diff)
| Unable to connect to ftp.de.debian.org:80:
| E: Failed to fetch http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1-2.dsc Could not connect to ftp.de.debian.org:80 (141.76.2.4), connection timed out
| E: Failed to fetch http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1.orig.tar.gz Unable to connect to ftp.de.debian.org:80:
| E: Failed to fetch http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1-2.debian.tar.xz Unable to connect to ftp.de.debian.org:80:
| E: Failed to fetch some archives.
| WARNING: exit code 100 from a shell command.
| DEBUG: Executing shell function rootfs_do_umounts
| DEBUG: Shell function rootfs_do_umounts finished
| DEBUG: Python function do_rootfs_postprocess finished
NOTE: recipe isar-image-ci-1.0-r0: task do_rootfs_postprocess: Failed
NOTE: Tasks Summary: Attempted 699 tasks of which 391 didn't need to be rerun and 1 failed.
ERROR: build/tmp/work/debian-bookworm-armhf/isar-image-ci-qemuarm/1.0-r0/rootfs/deb-src left mounted
Protect mounting with a trap for cleanup in case of failure.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/classes/deb-dl-dir.bbclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index 55e56c50..7ebd057e 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -48,6 +48,9 @@ debsrc_download() {
debsrc_do_mounts "${rootfs}"
+ trap 'exit 1' INT HUP QUIT TERM ALRM USR1
+ trap 'debsrc_undo_mounts "${rootfs}"' EXIT
+
( flock 9
set -e
printenv | grep -q BB_VERBOSE_LOGS && set -x
--
2.34.1
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20241024100946.214428-1-amikan%40ilbers.de.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] deb-dl-dir: Avoid hanging mounts on failed download
2024-10-24 10:09 [PATCH v2] deb-dl-dir: Avoid hanging mounts on failed download Anton Mikanovich
@ 2024-10-24 10:41 ` Uladzimir Bely
2024-10-25 13:57 ` Uladzimir Bely
1 sibling, 0 replies; 3+ messages in thread
From: Uladzimir Bely @ 2024-10-24 10:41 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On Thu, 2024-10-24 at 13:09 +0300, Anton Mikanovich wrote:
> If apt-get fails during debsrc_download execution, one mount will be
> left behind. If ISAR_FAIL_ON_CLEANUP is set to 1, an additional error
> will be observed:
>
> > Err:1 http://ftp.de.debian.org/debian bookworm/main rtmpdump
> > 2.4+20151223.gitfa8646d.1-2 (dsc)
> > Could not connect to ftp.de.debian.org:80 (141.76.2.4),
> > connection timed out
> > Err:2 http://ftp.de.debian.org/debian bookworm/main rtmpdump
> > 2.4+20151223.gitfa8646d.1-2 (tar)
> > Unable to connect to ftp.de.debian.org:80:
> > Err:3 http://ftp.de.debian.org/debian bookworm/main rtmpdump
> > 2.4+20151223.gitfa8646d.1-2 (diff)
> > Unable to connect to ftp.de.debian.org:80:
> > E: Failed to fetch
> > http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1-2.dsc
> > Could not connect to ftp.de.debian.org:80 (141.76.2.4),
> > connection timed out
> > E: Failed to fetch
> > http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1.orig.tar.gz
> > Unable to connect to ftp.de.debian.org:80:
> > E: Failed to fetch
> > http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1-2.debian.tar.xz
> > Unable to connect to ftp.de.debian.org:80:
> > E: Failed to fetch some archives.
> > WARNING: exit code 100 from a shell command.
> > DEBUG: Executing shell function rootfs_do_umounts
> > DEBUG: Shell function rootfs_do_umounts finished
> > DEBUG: Python function do_rootfs_postprocess finished
> NOTE: recipe isar-image-ci-1.0-r0: task do_rootfs_postprocess: Failed
> NOTE: Tasks Summary: Attempted 699 tasks of which 391 didn't need to
> be rerun and 1 failed.
> ERROR: build/tmp/work/debian-bookworm-armhf/isar-image-ci-
> qemuarm/1.0-r0/rootfs/deb-src left mounted
>
> Protect mounting with a trap for cleanup in case of failure.
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> meta/classes/deb-dl-dir.bbclass | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-
> dir.bbclass
> index 55e56c50..7ebd057e 100644
> --- a/meta/classes/deb-dl-dir.bbclass
> +++ b/meta/classes/deb-dl-dir.bbclass
> @@ -48,6 +48,9 @@ debsrc_download() {
>
> debsrc_do_mounts "${rootfs}"
>
> + trap 'exit 1' INT HUP QUIT TERM ALRM USR1
> + trap 'debsrc_undo_mounts "${rootfs}"' EXIT
> +
> ( flock 9
> set -e
> printenv | grep -q BB_VERBOSE_LOGS && set -x
> --
> 2.34.1
>
Since patch v2 is technically a v1 with updated commit message, already
well-tested in CI, we would like to merge it soon (e.g. 2024-10-25), if
there are no objections.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/bcfcb58316941bc9e6f26fca824044c9042bdb69.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] deb-dl-dir: Avoid hanging mounts on failed download
2024-10-24 10:09 [PATCH v2] deb-dl-dir: Avoid hanging mounts on failed download Anton Mikanovich
2024-10-24 10:41 ` Uladzimir Bely
@ 2024-10-25 13:57 ` Uladzimir Bely
1 sibling, 0 replies; 3+ messages in thread
From: Uladzimir Bely @ 2024-10-25 13:57 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On Thu, 2024-10-24 at 13:09 +0300, Anton Mikanovich wrote:
> If apt-get fails during debsrc_download execution, one mount will be
> left behind. If ISAR_FAIL_ON_CLEANUP is set to 1, an additional error
> will be observed:
>
> > Err:1 http://ftp.de.debian.org/debian bookworm/main rtmpdump
> > 2.4+20151223.gitfa8646d.1-2 (dsc)
> > Could not connect to ftp.de.debian.org:80 (141.76.2.4),
> > connection timed out
> > Err:2 http://ftp.de.debian.org/debian bookworm/main rtmpdump
> > 2.4+20151223.gitfa8646d.1-2 (tar)
> > Unable to connect to ftp.de.debian.org:80:
> > Err:3 http://ftp.de.debian.org/debian bookworm/main rtmpdump
> > 2.4+20151223.gitfa8646d.1-2 (diff)
> > Unable to connect to ftp.de.debian.org:80:
> > E: Failed to fetch
> > http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1-2.dsc
> > Could not connect to ftp.de.debian.org:80 (141.76.2.4),
> > connection timed out
> > E: Failed to fetch
> > http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1.orig.tar.gz
> > Unable to connect to ftp.de.debian.org:80:
> > E: Failed to fetch
> > http://ftp.de.debian.org/debian/pool/main/r/rtmpdump/rtmpdump_2.4%2b20151223.gitfa8646d.1-2.debian.tar.xz
> > Unable to connect to ftp.de.debian.org:80:
> > E: Failed to fetch some archives.
> > WARNING: exit code 100 from a shell command.
> > DEBUG: Executing shell function rootfs_do_umounts
> > DEBUG: Shell function rootfs_do_umounts finished
> > DEBUG: Python function do_rootfs_postprocess finished
> NOTE: recipe isar-image-ci-1.0-r0: task do_rootfs_postprocess: Failed
> NOTE: Tasks Summary: Attempted 699 tasks of which 391 didn't need to
> be rerun and 1 failed.
> ERROR: build/tmp/work/debian-bookworm-armhf/isar-image-ci-
> qemuarm/1.0-r0/rootfs/deb-src left mounted
>
> Protect mounting with a trap for cleanup in case of failure.
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> meta/classes/deb-dl-dir.bbclass | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-
> dir.bbclass
> index 55e56c50..7ebd057e 100644
> --- a/meta/classes/deb-dl-dir.bbclass
> +++ b/meta/classes/deb-dl-dir.bbclass
> @@ -48,6 +48,9 @@ debsrc_download() {
>
> debsrc_do_mounts "${rootfs}"
>
> + trap 'exit 1' INT HUP QUIT TERM ALRM USR1
> + trap 'debsrc_undo_mounts "${rootfs}"' EXIT
> +
> ( flock 9
> set -e
> printenv | grep -q BB_VERBOSE_LOGS && set -x
> --
> 2.34.1
>
Applied to next.
--
Best regards,
Uladzimir.
--
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/93beef8a0a8e736e3746a955829e5b8c9650c940.camel%40ilbers.de.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-25 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-24 10:09 [PATCH v2] deb-dl-dir: Avoid hanging mounts on failed download Anton Mikanovich
2024-10-24 10:41 ` Uladzimir Bely
2024-10-25 13:57 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox