Builds fail in docker. #212

Closed
opened 2016-05-10 10:33:30 +00:00 by philm · 13 comments
philm commented 2016-05-10 10:33:30 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

I'm trying to do some docker automation with Manjaro iso building, at first I had some issues with the chroot aspect but upon doing some research I found that running the container in --privileged mode resolves these issues.

Upon attempting to do a build again I was struck with another issue as shown below:

==> Prepare [Desktop installation] (xfce-image)
 --> overlayfs mount: [/var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image]
mount: wrong fs type, bad option, bad superblock on overlay,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
==> ERROR: A failure occurred in make_image_custom().
    Aborting...
 --> overlayfs umount: []

Okay so lets see what dmesg | tail gives us:
[ 8612.927652] overlayfs: filesystem on '/var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image' not supported as upperdir

I believe the issue has something to do with this function but I'm not sure how to fix it to work within the docker instance, It seems like its because upper and the resulting mount location are the same and you're thus essentially trying to mount /var/lib/manjaro-tools/buildiso/xfce/x86_64/root-image, /var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image and /var/lib/manjaro-tools/buildiso/xfce/x86_64/work back into /var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image.

I think this would be solved via doing something like:

mount_image(){
        IMAGE_ACTIVE_MOUNTS=()
    mkdir -p "${work_dir}/work"
        mkdir "${work_dir}/mnt"
    track_image -t overlay overlay -olowerdir="${work_dir}/root-image",upperdir="$1",workdir="${work_dir}/work" "${work_dir}/mnt"
}

This is based upon how the person does the ./entrypoint.sh script.

But then you need to change other parts of the sources to point to "${work_dir}/mnt" but I'm not familiar enough with the code to say any more speculation.

If you want to test the docker instance run:
docker run --privileged -it --name manjaro-tools -v /etc/lsb-release:/etc/lsb-release orbos/manjaro:manjaro-tools

*Created by: edge226* I'm trying to do some docker automation with Manjaro iso building, at first I had some issues with the chroot aspect but upon doing some research I found that running the container in --privileged mode resolves these issues. Upon attempting to do a build again I was struck with another issue as shown below: ``` ==> Prepare [Desktop installation] (xfce-image) --> overlayfs mount: [/var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image] mount: wrong fs type, bad option, bad superblock on overlay, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. ==> ERROR: A failure occurred in make_image_custom(). Aborting... --> overlayfs umount: [] ``` Okay so lets see what `dmesg | tail` gives us: `[ 8612.927652] overlayfs: filesystem on '/var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image' not supported as upperdir` I believe the issue has something to do with [this](https://github.com/manjaro/manjaro-tools/blob/master/lib/util-iso-overlayfs.sh#L18) function but I'm not sure how to fix it to work within the docker instance, It seems like its because upper and the resulting mount location are the same and you're thus essentially trying to mount /var/lib/manjaro-tools/buildiso/xfce/x86_64/root-image, /var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image and /var/lib/manjaro-tools/buildiso/xfce/x86_64/work back into /var/lib/manjaro-tools/buildiso/xfce/x86_64/xfce-image. I think this would be solved via doing something like: ``` mount_image(){ IMAGE_ACTIVE_MOUNTS=() mkdir -p "${work_dir}/work" mkdir "${work_dir}/mnt" track_image -t overlay overlay -olowerdir="${work_dir}/root-image",upperdir="$1",workdir="${work_dir}/work" "${work_dir}/mnt" } ``` This is based upon how the person does the ./entrypoint.sh script. But then you need to change other parts of the sources to point to `"${work_dir}/mnt"` but I'm not familiar enough with the code to say any more speculation. If you want to test the docker instance run: `docker run --privileged -it --name manjaro-tools -v /etc/lsb-release:/etc/lsb-release orbos/manjaro:manjaro-tools`
philm commented 2016-05-15 05:21:34 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

I see that You've looked at this and I'm willing to work on potential solutions with you on these issues to get them resolved quickly. Can I get some responses to my feedback? Lack of feedback will cause things to move along slower.

*Created by: edge226* I see that You've looked at this and I'm willing to work on potential solutions with you on these issues to get them resolved quickly. Can I get some responses to my feedback? Lack of feedback will cause things to move along slower.
philm commented 2016-05-15 08:02:04 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

@edge226: which platform is installed in docker? does it support overlayfs? If not you can still use the aufs option

*Created by: philmmanjaro* @edge226: which platform is installed in docker? does it support overlayfs? If not you can still use the aufs option
philm commented 2016-05-15 08:19:21 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

@philmmanjaro Its an i5 2500k. x86_64
I believe it does from the info in this post. I thought I modified the main post pointing to this but I must not have saved it. I was quite tired at the end of all the testing when I reported this.

I think I saw about the aufs option and I dont think it worked either. What is the correct flag for that?

*Created by: edge226* @philmmanjaro Its an i5 2500k. x86_64 I believe it does from the info in [this](http://stackoverflow.com/questions/32510778/error-using-mount-command-within-dockerfile) post. I thought I modified the main post pointing to this but I must not have saved it. I was quite tired at the end of all the testing when I reported this. I think I saw about the aufs option and I dont think it worked either. What is the correct flag for that?
philm commented 2016-05-15 08:22:48 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: philmmanjaro

It is in our manjaro-tools.conf. Simply uncomment it like this:

# experimental; use overlayfs instead of aufs
# requires minimum 4.0 kernel on the build host and on iso in profile.conf
use_overlayfs="false"
*Created by: philmmanjaro* It is in our **manjaro-tools.conf**. Simply uncomment it like this: ``` # experimental; use overlayfs instead of aufs # requires minimum 4.0 kernel on the build host and on iso in profile.conf use_overlayfs="false" ```
philm commented 2016-05-15 08:23:19 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

@philmmanjaro if you need i686 its pretty easy. Here are the two files used: mkimage-manjaro.sh and mkimage-manjaro-pacman.conf.

I modded the arch ones to work on manjaro and shared them on the forum a few days before the SSL issue happened.

*Created by: edge226* @philmmanjaro if you need i686 its pretty easy. Here are the two files used: [mkimage-manjaro.sh](https://raw.githubusercontent.com/edge226/docker/master/contrib/mkimage-manjaro.sh) and [mkimage-manjaro-pacman.conf](https://raw.githubusercontent.com/edge226/docker/master/contrib/mkimage-manjaro-pacman.conf). I modded the arch ones to work on manjaro and shared them on the forum a few days before the SSL issue happened.
philm commented 2016-05-15 08:27:57 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

I think I need to build new docker images at this time. I tried to do the net profile and I get:

error: target not found: prebootloader
==> ERROR: Failed to install packages to new root
==> ERROR: Failed to install all packages
==> ERROR: A failure occurred in make_image_root().
    Aborting...
*Created by: edge226* I think I need to build new docker images at this time. I tried to do the net profile and I get: ``` error: target not found: prebootloader ==> ERROR: Failed to install packages to new root ==> ERROR: Failed to install all packages ==> ERROR: A failure occurred in make_image_root(). Aborting... ```
philm commented 2016-05-15 08:32:29 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

@philmmanjaro There are many applications for docker such as automated package building with a CI. I'm working on setting that stuff up for my OS and in a sense I already have a very good understanding of how it works due to me automating all my website builds via when markdown is pushed to the repo. But I use gitlab instead of github now.

*Created by: edge226* @philmmanjaro There are many applications for docker such as automated package building with a CI. I'm working on setting that stuff up for my OS and in a sense I already have a very good understanding of how it works due to me automating all my website builds via when markdown is pushed to the repo. But I use gitlab instead of github now.
philm commented 2016-05-15 08:39:30 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

New image is being pushed now.

Done being pushed and testing again.

*Created by: edge226* New image is being pushed now. Done being pushed and testing again.
philm commented 2016-05-15 08:45:57 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

Same thing happens with an updated image that was just refreshed, Does that mean I'm missing a dep for manjaro-tools or something?

*Created by: edge226* Same thing happens with an updated image that was just refreshed, Does that mean I'm missing a dep for manjaro-tools or something?
philm commented 2016-05-15 08:49:54 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

Ah looked at the net install and removed that stuff as a test. Seems like something went wrong either on your end or on one of your mirrors.

*Created by: edge226* Ah looked at the net install and removed that stuff as a test. Seems like something went wrong either on your end or on one of your mirrors.
philm commented 2016-05-15 08:54:20 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

@philmmanjaro

==> Prepare [Desktop installation] (net-image)
 --> aufs mount: [/var/lib/manjaro-tools/buildiso/net/x86_64/net-image]
mount: wrong fs type, bad option, bad superblock on none,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
==> ERROR: A failure occurred in make_image_custom().
    Aborting...

Then we have dmesg | tail -n 1

# dmesg | tail -n 1
[435212.172152] aufs test_add:246:mount[18866]: unsupported filesystem, /var/lib/manjaro-tools/buildiso/net/x86_64/net-image (aufs)
*Created by: edge226* @philmmanjaro ``` ==> Prepare [Desktop installation] (net-image) --> aufs mount: [/var/lib/manjaro-tools/buildiso/net/x86_64/net-image] mount: wrong fs type, bad option, bad superblock on none, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so. ==> ERROR: A failure occurred in make_image_custom(). Aborting... ``` Then we have dmesg | tail -n 1 ``` # dmesg | tail -n 1 [435212.172152] aufs test_add:246:mount[18866]: unsupported filesystem, /var/lib/manjaro-tools/buildiso/net/x86_64/net-image (aufs) ```
philm commented 2016-05-15 09:09:42 +00:00 (Migrated from gitlab2.manjaro.org)

Created by: edge226

@philmmanjaro You can see the rate at which it took me to update was around 10 minutes. Thats how quick the docker turnaround time is and it can be made quicker through automation in a CI system.

*Created by: edge226* @philmmanjaro You can see the rate at which it took me to update was around 10 minutes. Thats how quick the docker turnaround time is and it can be made quicker through automation in a CI system.
DeMysteriisMundi commented 2020-05-03 13:40:35 +00:00 (Migrated from gitlab2.manjaro.org)

mentioned in issue #323

mentioned in issue #323
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tools/manjaro-tools#212
No description provided.