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

Debian 8 and systemd #8

Open
madssj opened this issue Jul 30, 2015 · 13 comments
Open

Debian 8 and systemd #8

madssj opened this issue Jul 30, 2015 · 13 comments

Comments

@madssj
Copy link
Contributor

madssj commented Jul 30, 2015

So, on a fresh install on a debian 8 machine, this formular breaks.

It seems, that the varnish package (correctly) doesn't use SysV style services, but systemd. I made a file stub for the systemd service, but would like to know how you think this should be handled?

@puneetk
Copy link
Contributor

puneetk commented Jul 30, 2015

This might be related to upstream, paging @whiteinge and @UtahDave

On Jul 30, 2015, at 9:15 AM, Mads Sülau Jørgensen [email protected] wrote:

So, on a fresh install on a debian 8 machine, this formular breaks.

It seems, that the varnish package (correctly) doesn't use SysV style services, but systemd. I made a file stub for the systemd service, but would like to know how you think this should be handled?


Reply to this email directly or view it on GitHub #8.

@madssj
Copy link
Contributor Author

madssj commented Jul 30, 2015

@puneetk the upstream package handles it fine, but this salt formula does not manage the systemd service files, as it should.

@whiteinge
Copy link
Contributor

I don't see that this formula is managing the varnish init scripts at all. @puneetk is saying that the debian_service module in upstream Salt has not yet been updated to add systemd support. This statement looks correct.

@madssj will you please file an issue on the main Salt repository for this?

@madssj
Copy link
Contributor Author

madssj commented Jul 31, 2015

@whiteinge it doesn't. But it does manage the defaults file for varnish. The defaults files are not used on debian with systemd, so in that case this formular needs another way of managing those settings.

So while there might be an issue with salt itself, this particular issue is not it. Agreed?

@whiteinge
Copy link
Contributor

Thanks for the clarification.

In that case conditionals for Debian 8 need to be added to the map file describing which files to use for 8 and which files to use for previous versions. There are many ways to go about this depending on what the exact changes are. The node-formula has one possible technique using if-statements, the snmmp-formula uses an addtitional map dictionary for the last-mile config. Does that answer your question in the OP?

@madssj
Copy link
Contributor Author

madssj commented Jul 31, 2015

Well that's the thing. You don't necessarily run systemd because you run Debian 8, which I think it's also true for other OSes. So how to detect which in init system is being used is the real question.

The file management should be pretty straight forward.

@whiteinge
Copy link
Contributor

whiteinge commented Jul 31, 2015 via email

@madssj
Copy link
Contributor Author

madssj commented Aug 1, 2015

I'd check the name of pid 1. I'll make a PR soon. Thanks.

@arthurzenika
Copy link

As discussed here https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749272 I believe that the formula could deploy a custom /etc/systemd/system/varnish.service file.

@aboe76
Copy link
Member

aboe76 commented Jan 19, 2017

@arthurlogilab isn't #14 the right way? if so review it or merge it?

@arthurzenika
Copy link

@aboe76 I hadn't seen that pull request, it's interesting. I have a different implementation in the works on my fork https://github.com/arthurlogilab/varnish-formula/

@bogdanr 's contribution is 1) missing the custom pillars as they are defined in the example (malloc is hardcoded to 1G) 2) in my opinion /etc/default/varnish should be untouched to avoid confusion so adding varnish.systemd would not be my choice of design. (the following comment is in /etc/default/varnish on debian jessie # Note: If systemd is installed, this file is obsolete and ignored.

arthurzenika@3d3bf3d shows a slightly different approach

@blbradley
Copy link

@aboe76 Not exactly. See my comment in #14 for more explanation.

@madssj You are looking for systemd drop-in units functionality. You can override statements in a systemd service unit using a drop-in. I'd recommend managing the drop-in unit in your own states.

@aboe76
Copy link
Member

aboe76 commented Jan 31, 2017

@arthurlogilab can you create a pull request?

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

6 participants