Commit 4fad939
committed
service: fix ExecStart= for Red Hat Software Collections
Historically we used `pg_ctl` in ExecStart=, which we later
wrapped into postgresql-ctl script - and later we moved to
/bin/postmaster directly.
The postgresql-ctl script had two purposes:
(a) some additional/compat logic on top of pg_ctl and
(b) it enabled the software collection by `scl_source`.
When we moved to ExecStart=/bin/postmaster we realized that (a) is
not needed anymore but we forgot about (b).
Now we got report that server fails to load modules because it
doesn't have LD_LIBRARY_PATH set accordingly in Software
Collections scenario.
Ideally, we would wrap %_bindir/postmaster by something like
%_bindir/postmaster-scl. But this would mean that we'd have to
request selinux-policy change, and wait till it gets updated. So
instead of shell wrapper script, invoke /bin/sh directly. The
/bin/sh is symlink to /bin/bash, which has shell_exec_t label;
and SELinux policy allows shell_exec_t -> postgresql_exec_t ->
postgresql_t transition.
This started to be an issue after sd_notify switch, done in
925b34c.
Related: rhbz#1550567, rhbz#16311851 parent bcf2360 commit 4fad939
3 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| 164 | + | |
| 165 | + | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
| |||
193 | 198 | | |
194 | 199 | | |
195 | 200 | | |
| 201 | + | |
196 | 202 | | |
197 | 203 | | |
198 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
0 commit comments