knorrie / network-examples

Linux networking examples and tutorials
Other
949 stars 80 forks source link

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

Open TinCanTech opened 2 years ago

TinCanTech commented 2 years ago

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

Following Cloning and configuring new containers;

The container/config uses:

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:

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

TinCanTech commented 2 years ago

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.

knorrie commented 2 years ago

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

TinCanTech commented 2 years ago

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.

knorrie commented 2 years ago

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