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

update(systemd): add falco.service alias to all systemd units #3332

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented Sep 18, 2024

What type of PR is this?

/kind feature

Any specific area of the project related to this PR?

/area engine

What this PR does / why we need it:

This PR allows to refer to the engine systemd services with a consistent unique alias falco.service. In addition, the alias systemd system helps to prevent from running more than one Falco instance with systemd at the time, since it is not possible to enable two systemd service, with the same alias, at the same time.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

update(systemd): users can refer to systemd falco services with a constistent unique alias falco.service

@poiana
Copy link
Contributor

poiana commented Sep 18, 2024

Welcome @ekoops! It looks like this is your first PR to falcosecurity/falco 🎉

@poiana poiana requested review from Kaizhe and mstemm September 18, 2024 10:32
@poiana poiana added the size/XS label Sep 18, 2024
@FedeDP
Copy link
Contributor

FedeDP commented Sep 18, 2024

Very nice fix, thank you!
cc @Andreagit97 that worked a lot with me on the systemd units :)

/milestone 0.39.0

@poiana poiana added this to the 0.39.0 milestone Sep 18, 2024
@ekoops
Copy link
Contributor Author

ekoops commented Sep 18, 2024

As you can see, systemd doesn't allow to enable multiple services having the same alias:

vagrant@vagrant:/etc/systemd/system$ sudo systemctl daemon-reload
vagrant@vagrant:/etc/systemd/system$ cat test.service | grep Alias
Alias=t.service
vagrant@vagrant:/etc/systemd/system$ cat test2.service | grep Alias
Alias=t.service
vagrant@vagrant:/etc/systemd/system$ sudo systemctl enable test.service
vagrant@vagrant:/etc/systemd/system$ sudo systemctl enable test2.service
Failed to enable unit: File /etc/systemd/system/t.service already exists and is a symlink to /etc/systemd/system/test.service.
vagrant@vagrant:/etc/systemd/system$ sudo systemctl enable t.service
Failed to enable unit: Refusing to operate on alias name or linked unit file: t.service

Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Sep 18, 2024

LGTM label has been added.

Git tree hash: 0105b25c4b0349fe68769a9a7ee9bcb182877f80

Copy link
Member

@Andreagit97 Andreagit97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Sep 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, ekoops, FedeDP

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit d66c4ce into falcosecurity:master Sep 18, 2024
33 of 34 checks passed
@ekoops ekoops deleted the ekoops/add-falco-alias-systemd branch September 18, 2024 13:47
@ekoops ekoops restored the ekoops/add-falco-alias-systemd branch September 18, 2024 13:48
@ekoops ekoops deleted the ekoops/add-falco-alias-systemd branch September 18, 2024 13:48
This was referenced Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants