Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loop device search in docker when there are no loop devices before container launch #7090

Merged

Conversation

JohnTheCoolingFan
Copy link
Contributor

@JohnTheCoolingFan JohnTheCoolingFan commented Aug 14, 2024

Description

Currently, if losetup -f has to create a new device node and is run in a docker container, the device will be created on host butt will not be available to the already running container. This PR mitigates that by running losetup -f in a container in case there are no loop devices (/dev/loop0 is checked). The container exits after executing losetup and the main build container is run after.

The MKNOD capability does not affect the issue, so it was removed.

For additional context, previous attempts at fixing: #6576 #6642 #6927 #6936

GitHub issue reference: #6568
Jira reference number AR-2132

How Has This Been Tested?

  • Fresh boot on a system that doesn't have loop devices created by default
  • Run a dockerized build ./compile.sh build PREFER_DOCKER=yes

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

@JohnTheCoolingFan JohnTheCoolingFan requested a review from a team as a code owner August 14, 2024 22:15
@github-actions github-actions bot added size/small PR with less then 50 lines Framework Framework components labels Aug 14, 2024
efectn
efectn previously approved these changes Aug 14, 2024
Copy link
Member

@efectn efectn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just tested it, the fix works very well

@igorpecovnik igorpecovnik added Ready to merge Reviewed, tested and ready for merge 11 Milestone: Fourth quarter release Giveaway labels Aug 15, 2024
@igorpecovnik igorpecovnik merged commit bed3f85 into armbian:main Aug 18, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11 Milestone: Fourth quarter release Framework Framework components Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines
Development

Successfully merging this pull request may close these issues.

4 participants