network-examples icon indicating copy to clipboard operation
network-examples copied to clipboard

The tutorial instructions and scripts should be able to deal with ext4/overlayfs out of the box

Open TinCanTech opened this issue 2 years ago • 4 comments

Working through: https://github.com/knorrie/network-examples/blob/master/birdhouse-intro/README.md

Following Cloning and configuring new containers;

The container/config uses:

  • lxc.rootfs.path = overlay:/var/lib/lxc/birdbase/rootfs:/var/lib/lxc/weaver/delta0

However, this does not mount /var/lib/lxc/weaver/rootfs This causes later copied data to be omitted when the container is running.

After searching and testing, I found that this configuration works correctly:

  • lxc.rootfs.path = overlay:/var/lib/lxc/weaver/rootfs:/var/lib/lxc/birdbase/rootfs:/var/lib/lxc/weaver/delta0

Also note, the mounting-order is Crucial, otherwise data in weaver/rootfs is still unavailable.

TinCanTech avatar Nov 23 '21 16:11 TinCanTech

This becomes a major problem for "Hands ON: Step 4" of https://github.com/knorrie/network-examples/blob/master/ospf-intro/README.md

The data copied into ALL ${container}/rootfs folders is not available to the running containers without the change above.

TinCanTech avatar Nov 23 '21 16:11 TinCanTech

Hi! Thanks for trying out the tutorial.

I suspect your filesystem is ext4 and lxc is trying to use overlayfs for the snapshot functionality. In this case the situation indeed ends up being differently than in my case while writing all of it (using btrfs).

The instructions or little parts of tooling that are provided should do the right thing in both cases, so that the user does not end up spending energy on debugging irrelevant stuff.

The necessary changes for this simply did not happen yet.

Also see https://github.com/knorrie/network-examples/issues/12 which is about the same thing. The least I could immediately do was add a note about this (e3b5d60469) in the text.

I have an idea, let's rename this issue from "Node/config: lxc.rootfs.path = overlay: x : y : z is incorrect" to "The tutorial instructions and scripts should be able to deal with ext4/overlayfs out of the box" and keep it open until that's the case. Are you ok with that?

Hans

knorrie avatar Nov 23 '21 21:11 knorrie

Hi,

you can edit this ticket as you prefer.

You are right, I am using ext4 and did not understand the depth of the problem. At least I found a temporary solution and can continue, for now. Thanks.

TinCanTech avatar Nov 23 '21 21:11 TinCanTech

Ok, done. I want to do this combined with doing #15

knorrie avatar Nov 23 '21 21:11 knorrie