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

racker-sim question #97

Open
toanju opened this issue Jan 14, 2022 · 9 comments
Open

racker-sim question #97

toanju opened this issue Jan 14, 2022 · 9 comments

Comments

@toanju
Copy link

toanju commented Jan 14, 2022

Hi,

Description

I was looking into racker today and got stuck in setting up the racker-sim here:
https://github.com/kinvolk/racker/blob/main/racker-sim/ipmi-env.sh#L223

Guessing that my environment (see below) is likely not the intended one I am looking for hints how to get the sim running.

Environment and steps to reproduce

Env: debian 10 with required binaries installed

Default Steps:

wget https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_qemu_image.img.bz2
bunzip2 flatcar_production_qemu_image.img.bz2
QEMU_ARGS="" ./ipmi-env.sh create nodes.csv 00:11:22:33:44:00 ./flatcar_production_qemu_image.img /var/tmp/ipmi-sim

cheers
Tobi

@pothos
Copy link
Member

pothos commented Jan 14, 2022

Hi,
did you get an error message?

The dependencies are checked at the script startup and you are supposed to run the script with your user account.
The folder you passed in /var/tmp/ipmi-sim should exist and be owned by your user account - if this is the problem we can add a mkdir -p step to make sure it exists.

I've only tested in on Fedora (/usr/bin/docker being actually podman but it should not matter).

@toanju
Copy link
Author

toanju commented Jan 14, 2022

my bad. Yes, the error message was:

mount: /var/tmp/ipmi-sim/node1-bmc: mount(2) system call failed: Too many levels of symbolic links.

With some tweaks I got everything running until that mount call referenced above.

@pothos
Copy link
Member

pothos commented Jan 14, 2022

The folder you passed in /var/tmp/ipmi-sim should exist and be owned by your user account - if this is the problem we can add a mkdir -p step to make sure it exists.

Just checked it, the folder already gets created if needed.

mount: /var/tmp/ipmi-sim/node1-bmc: mount(2) system call failed: Too many levels of symbolic links. With some tweaks I got everything running until that mount call referenced above.

What tweaks were needed to get there? (Edit: I suggest you delete the directory and start again)

@pothos
Copy link
Member

pothos commented Jan 14, 2022

Trying it on Debian I see that in general sudo -E capsh --user="$USER" -- -c 'echo hello >/dev/stdout' doesn't work but only sudo -E capsh --user="$USER" -- -c 'echo hello >&1

@pothos
Copy link
Member

pothos commented Jan 14, 2022

I pushed a workaround for this, but Ctrl-C still doesn't work to terminate gracefully, you have to use killall ipmi_sim.

Before you start it, make sure you have no socat, qemu-system-x86_64 or ipmi_sim processes around.

@toanju
Copy link
Author

toanju commented Jan 14, 2022

yeah, some binaries are not found when using which as normal user as they are not in the path... tweaked the script to use sudo /bin/which...

The actual problem seems to be gone with Debian 11. So I am guessing that it is solved in overlayfs. So far I am guessing that the lower fs in the overlay mount, i.e. the root folder '/' includes the upper and working dir, thus, we may see a recursion which leads to 'Too many levels of symbolic links.' (wild guessing though).

Anyway, using Debian 11 seems to work fine. Will do a PR with the according changes I applied later (likely not tonight ;)

@toanju
Copy link
Author

toanju commented Jan 14, 2022

I pushed a workaround for this, but Ctrl-C still doesn't work to terminate gracefully, you have to use killall ipmi_sim.

Before you start it, make sure you have no socat or ipmi_sim processes around.

What are the messages here? I removed the QEMU_ARGS="" in the meantime.

Trying it on Debian I see that in general sudo -E capsh --user="$USER" -- -c 'echo hello >/dev/stdout' doesn't work but only sudo -E capsh --user="$USER" -- -c 'echo hello >&1

Both work on Debian 11.

@toanju
Copy link
Author

toanju commented Jan 14, 2022

And thanks for the quick replies!

@pothos
Copy link
Member

pothos commented Jan 14, 2022

Then the capsh problems seem to be related to Debian sid ;)
Oh, the Debian 10 kernel is 4.19, sounds like something changed with overlayfs since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants