dermotbradley/create-alpine-disk-image

Not unmounting in case script breaks execution.

HugoFlorentino opened this issue · 5 comments

If for any reason script fails without building image, mount points used for chroot remain mounted and calling the script again may fail, creating yet more mount points, and so on.

Have you actually encountered this problem?

The created script registers a TRAP function exactly so that the chroot mountpoints should be removed when an error occurs:

https://github.com/dermotbradley/create-alpine-disk-image/blob/main/lib/disk-image-functions#L2634

Have you actually encountered this problem?

I have, multiple times.

The created script registers a TRAP function exactly so that the chroot mountpoints should be removed when an error occurs:

Well apparently it isn't working as expected.

Without some information I don't see how I can investigate.

Is it happening always at the same point or at multiple different places? Is it happening every time or is there some sort of pattern to when it happens? Have you looked at the logfile (with debugging enabled) to see where it is getting to before it fails?

Without some information I don't see how I can investigate.

Is it happening always at the same point or at multiple different places? Is it happening every time or is there some sort of pattern to when it happens? Have you looked at the logfile (with debugging enabled) to see where it is getting to before it fails?

I will try doing a few more tests for x86 and x86_64 with and without debugging.

Closing old issue.