-
Notifications
You must be signed in to change notification settings - Fork 195
Conversation
Since the commit 26cef9d Podman has been used to build the osbuilder image if on Fedora. Fedora 32 onward defaults to cgroups v2 which break some tools. The Vagrantfile instructs the VM to switch back to cgroups v1 (that needs reboot). However currently it executes the setup script before the reboot (i.e. still cgroups v2) and then Podman has failed to build the osbuilder image. With this change the setup script is executed after the reboot, Podman happily uses cgroup v1, thus the osbuilder image is built. Fixes kata-containers#3760 Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Changes look fine to me, within my very limited knowledge of vagrant and Ruby. I'm testing them out on my system now. It seems slightly odd to me that cgroups v2 would break podman: AIUI podman, unlike docker, worked fine with cgroupsv2. But in any case the change is correct: we definitely want to run the setup script in the same kernel environment as the VM then continues to run in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me a bunch of attempts to get this working... but that appears to be because one of the Fedora servers was flaky, not anything to do with the patches.
Seems to work, excellent!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @wainersm.
.ci/setup_env_ubuntu.sh
Outdated
@@ -102,6 +102,12 @@ main() | |||
pkgs_to_install+=" ${rust_agent_pkgs[@]}" | |||
fi | |||
|
|||
# The redis-server package fails to install if IPv6 is disabled. Let's | |||
# check if that's the case and then enable it. | |||
if [[ $(sudo sysctl -n net.ipv6.conf.all.disable_ipv6) -eq 1 ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: You don't need to use double square brackets here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jodh-intel just updated it to remove the extra square bracket. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I still get the (see below) Btw, just recently I found out you can get Docker on the IBM architectures, but apparently not on RHEL (which I would have to use for CI).sd-bus call: Transport endpoint not connected
with Fedora.
The code that enable IPv6 was moved from the Vagrantfile to .ci/setup_env_ubuntu.sh so that the environment can be setup correctly even if not on a vagrant box. The following line was dropped because I don't think it's worth to change the developer's environment permanently: `sudo sed -i 's/\(net.ipv6.conf.all.disable_ipv6\).*/\1=0/' /etc/sysctl.conf` Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
2abd3dd
to
f886618
Compare
Double-checking: using Vagrant you are still getting the sd-bus error? Did you |
@wainersm scratch that -- I had forgotten to apply your changes 🤦♂️ taking a look... |
Did anyone else observe this?
This is system-installed Vagrant 2.2.6 on Ubuntu 20.04 x86_64 with libvirt. |
I always tested the vagrantfile on my Fedora 33 x86_64 machine. Let me create a Ubuntu VM to give it a try. |
@Jakob-Naucke I could reproduce it in a ubuntu 20.04 VM. I will open another issue. are you okay if I merge this fix? |
/test |
The aim with this pull request is to fix the
vagrant up fedora
command which is not currently working. I also send a bonus commit that is just an improvement. I tested bothvagrant up fedora
andvagrant up ubuntu
to ensure no regressions with ubuntu.@dgibson reported the problem on #3760 but actually I never hit the same issue. Here instead it has crashed because of commit 26cef9d.
@Jakob-Naucke I didn't touch your code which forces the use of Podman on Fedora-likes. Instead I ensure it work with this vagrant file. TBH, I don't know why (and didn't investigate) on the Fedora box with cgroups v2, Podman fails to build the guest image.
Fixes #3760