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

Cannot start FRR on Fedora and Arch using kathara/frr image #10

Open
tcaiazzi opened this issue Nov 3, 2023 · 3 comments
Open

Cannot start FRR on Fedora and Arch using kathara/frr image #10

tcaiazzi opened this issue Nov 3, 2023 · 3 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed kathara/frr linux/arch linux/red-hat

Comments

@tcaiazzi
Copy link
Member

tcaiazzi commented Nov 3, 2023

Thanks to @Aperence and @BuonHobo, we found an error while starting frr.service on Fedora (KatharaFramework/Kathara-Labs#31) and Arch (KatharaFramework/Kathara#248).

Substantially, when running FRR on a Fedora or Arch host using the kathara/frr image, it returns the error fork(): Cannot allocate memory.

root@r3:/# systemctl start frr
fork(): Cannot allocate memory
Failed to start watchfrr! ... failed!

Currently, we don't know the reason for the problem, however @BuonHobo provided us a workaround to temporary fix it 😍

It's pretty simple, it only requires adding a file named /etc/systemd/system/frr.service.d/workaround.conf in the kathara/frr image.

This is the file's content:

[Service]
ExecStart=
ExecStop=
ExecReload=
ExecStart=/usr/bin/su -c "/usr/lib/frr/frrinit.sh start"
ExecStop=/usr/bin/su -c "/usr/lib/frr/frrinit.sh stop"
ExecReload=/usr/bin/su -c "/usr/lib/frr/frrinit.sh reload"

This will override the default frr systemd unit so that it wraps the command with su.

We need to include the workaround in the next kathara/frr release.

@tcaiazzi tcaiazzi changed the title Cannot start frr on Fedora and Arch using kathara/frr image Cannot start FRR on Fedora and Arch using kathara/frr image Nov 3, 2023
@tcaiazzi tcaiazzi added the bug Something isn't working label Nov 3, 2023
@BuonHobo
Copy link
Contributor

BuonHobo commented Nov 3, 2023

Thank you for the mention!

I've already forked this repo and made the change to fix it, you can see it here.

I had spoken with @lorenzo93 about opening a PR but we decided not to (he said you'd rather find a real fix).

If you want, I can open a PR later today with this (small) change.

@tcaiazzi
Copy link
Member Author

tcaiazzi commented Nov 3, 2023

I had spoken with @lorenzo93 about opening a PR but we decided not to (he said you'd rather find a real fix).

Oh, I missed it. However, after discussing, we think it is better to include the workaround to avoid problems with students. I will test the new image on all the platforms and if it works, we will add the workaround.

@BuonHobo
Copy link
Contributor

BuonHobo commented Nov 3, 2023

I also think it's better for the (admittedly few) students with Fedora and Arch. I opened the PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed kathara/frr linux/arch linux/red-hat
Projects
Status: In Progress
Development

No branches or pull requests

3 participants