Bug 1135071
| Summary: | git-daemon does not start under systemd because git.service needs to be a template unit | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | David Shea <dshea> |
| Component: | git | Assignee: | Petr Stodulka <pstodulk> |
| Status: | CLOSED ERRATA | QA Contact: | Lukáš Zachar <lzachar> |
| Severity: | unspecified | Docs Contact: | Miroslav Svoboda <msvoboda> |
| Priority: | unspecified | ||
| Version: | 7.1 | CC: | amessina, chrisw, extras-qa, fabrice, igeorgex, isenfeld, jbowes, jhradile, jkt, jminter, mattias.ohlsson, ovasik, pingou, puiterwijk, tmz, vonsch |
| Target Milestone: | rc | Keywords: | Patch |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | git-1.8.3.1-5 | Doc Type: | Bug Fix |
| Doc Text: |
Because the file git.service was not a template unit, it was not possible to start git-daemon in systemd. git.socket failed to queue the service startup job, and the "Invalid argument" error was displayed. With this update, the template unit has been created by renaming the file git.service to git@.service. Also, "-" has been added before the path in the ExecStart command to prevent hanging of instance units. As a result, git.socket now works as expected, and git-daemon can be started in this situation.
|
Story Points: | --- |
| Clone Of: | 980574 | Environment: | |
| Last Closed: | 2015-08-06 10:28:16 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 980574, 1246735 | ||
| Bug Blocks: | 1191020, 1205796 | ||
|
Description
David Shea
2014-08-28 19:02:40 UTC
Is there a workaround? The bugreport mentions an attached patch, but I don's see anything in here. Part of the work advised here has been done in http://pkgs.fedoraproject.org/cgit/git.git/commit/?id=906d8479f79ee89ec399fa5988b11fa037f18d38 (In reply to Pierre-YvesChibon from comment #3) > Part of the work advised here has been done in > http://pkgs.fedoraproject.org/cgit/git.git/commit/ > ?id=906d8479f79ee89ec399fa5988b11fa037f18d38 That's a Fedora package, not an RHEL7 one. I have no systemd knowledge, and therefore I don't know how much of a problem a mere existence of a git.system below /usr is, in addition to a properly renamed git@.service under /etc. I'm using Apache for now. > That's a Fedora package, not an RHEL7 one. Which as you have noticed this bug originates from. > in addition to a properly renamed git@.service under /etc. Why would you want to put a .service file in /etc ? That's not quite where they belong. > Which as you have noticed this bug originates from. Yes, the bug's been indeed fixed in latest Fedora. > Why would you want to put a .service file in /etc ? That's not quite where > they belong. Because the systemd documentation [1] tells me to do it: Q: I want to change a service file, but rpm keeps overwriting it in /usr/lib/systemd/system all the time, how should I handle this? A: The recommended way is to copy the service file from /usr/lib/systemd/system to /etc/systemd/system and edit it there. The latter directory takes precedence over the former, and rpm will never overwrite it. If you want to use the distributed service file again you can simply delete (or rename) the service file in /etc/systemd/system again. [1] http://www.freedesktop.org/wiki/Software/systemd/FrequentlyAskedQuestions/ What I have no idea about is whether it's safe to have a "git@.service" under /etc and "git.service" under /usr. Not "directly" under /etc and /usr, sure, sorry for not being clear enough. Thanks for the explanation, I see what you mean now. I am not sure how systemd would handle such situation since you would not be overriding the file in /usr with the one in /etc as the two files have two different names. So safe, I would it is, but I am not sure it would work. /me will try to find someone more knowledgeable git.service would not cause any problem, whether in /usr or in /etc, except that its presence might be misleading. OTOH, it is totally useless under this name. With current configuration of git.socket, systemd cares only about git@.service. The fix is trivial: rename /usr/lib/systemd/system/git.service to /usr/lib/systemd/system/git@.service. Please don't put any service files under /etc. Zbigniew: Hi, I suppose that you mean - do not put any service files under /etc/* in rpm package. IMHO user should add own service files to /etc because it's his own configuration of system. It's better than modify defult behaviour inside /lib/*. Right? (In reply to pstodulk from comment #9) > Zbigniew: Hi, I suppose that you mean - do not put any service files under > /etc/* in rpm package. IMHO user should add own service files to /etc > because it's his own configuration of system. It's better than modify defult > behaviour inside /lib/*. Right? Yes to all three. used solution from patch above *** Bug 1246735 has been marked as a duplicate of this bug. *** Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1573.html |