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

Why is there an APK package that contains a systemd service (non-compatible with Alpine)? #616

Closed
mowies opened this issue Jul 30, 2024 · 6 comments · Fixed by #630
Closed
Labels
bug Something isn't working question Further information is requested

Comments

@mowies
Copy link
Member

mowies commented Jul 30, 2024

What is the use case of the APK package releases containing a systemd service? From my understanding, Alpine Linux is not compatible with systemd services and would need a different service setup to work correctly using open-rc.

When installing the package on Alpine, I don't get any errors, files are copied correctly into the right places, but also the service is not started, so I guess it fails somewhat silently.

@dosubot dosubot bot added bug Something isn't working question Further information is requested labels Jul 30, 2024
Copy link

dosubot bot commented Jul 30, 2024

The APK package contains a systemd service because the OpenTelemetry Collector releases are designed to be compatible with multiple Linux distributions, not just Alpine Linux. The use case for including a systemd service in the APK package is to provide a consistent way to manage the OpenTelemetry Collector service across different Linux distributions that use systemd for service management.

The package includes a systemd service file, which is placed in the /lib/systemd/system directory. This is standard for distributions that use systemd, ensuring that the OpenTelemetry Collector can be managed as a systemd service on those systems. The inclusion of the systemd service in the APK package allows for consistent service management across various Linux distributions, even though Alpine Linux itself does not use systemd [1][2][3][4][5].

The postinstall.sh script handles service registration and startup by checking if the systemctl command is available. If systemctl is available, it enables the otelcol.service and starts it if the configuration file /etc/otelcol/config.yaml exists. There is no specific logic for Alpine Linux in the provided script [6].

For Alpine Linux, which uses OpenRC instead of systemd, you would need to create and manage an OpenRC service script manually, as the current package does not include OpenRC-specific scripts or configurations.

To continue talking to Dosu, mention @dosu.

@mowies
Copy link
Member Author

mowies commented Jul 30, 2024

@dosu what other linux distributions use APK packages?

Copy link

dosubot bot commented Jul 30, 2024

Alpine Linux is the primary Linux distribution that uses APK packages. APK (Alpine Package Keeper) is the package management system used by Alpine Linux. Other distributions that are based on Alpine Linux, such as postmarketOS, also use APK packages. However, APK is not commonly used outside of Alpine Linux and its derivatives.

To continue talking to Dosu, mention @dosu.

@mowies
Copy link
Member Author

mowies commented Jul 30, 2024

so then this perfectly explains my doubts that the released APK packages are useful in their current state 😄

@mowies
Copy link
Member Author

mowies commented Aug 7, 2024

In the collector SIG meeting on August 7th, we decided to drop the APK packages from the releases for now and file an issue for a proper implementation using open-rc files.

@mowies
Copy link
Member Author

mowies commented Aug 8, 2024

Pinging @open-telemetry/collector-maintainers to get some more feedback on this since not many core people were in the SIG meeting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant