jewel: build/ops: remove SYSTEMD_RUN from initscript #9872

Merged
merged 1 commit into from Oct 14, 2016

Projects

None yet

4 participants

@odivlad
Contributor
odivlad commented Jun 22, 2016 edited

Closes: http://tracker.ceph.com/issues/16441

systemd-run logic in initscripts was introduced because of ticket http://tracker.ceph.com/issues/7627.
If we have systemd-based distro, we should use systemd unit files from systemd directory to start/stop ceph daemons.
Otherwise, daemon() from /etc/init.d/functions on systemd distro starts service in system.slice and everything works well for case, for example, when we use hammer on RH7. With this code it will start daemon with daemon() function from init.d/functions.
systemd-run can not be run on non-systemd distros, so it's not needed on SysV systems.

Backport of: #9871

Signed-off-by: Vladislav Odintsov odivlad@gmail.com

@odivlad odivlad changed the title from remove SYSTEMD_RUN from initscript to jewel: remove SYSTEMD_RUN from initscript Jun 22, 2016
@smithfarm smithfarm changed the title from jewel: remove SYSTEMD_RUN from initscript to [DNM] jewel: remove SYSTEMD_RUN from initscript Jun 23, 2016
@smithfarm
Contributor

Changelog:

  • marked DNM until master PR has been merged and cherry-pick SHA1 double-checked
@smithfarm
Contributor

@odivlad Thanks for the backport! Next time, though, please wait until the master PR has been merged and then do the backports using "git cherry-pick -x" so we have the xref to the master SHA1 in the commit message.

@odivlad
Contributor
odivlad commented Jul 11, 2016

@smithfarm, since my PR to master (#9871) is already merged, please, remove [DNM] prefix.
I've also updated this PR with cherry-picked commits. PR is ready for review.

@smithfarm
Contributor

@odivlad Please update the commit message with a description of how the conflicts were resolved (for use in possible future forensic analyses).

@smithfarm smithfarm added the build/ops label Jul 11, 2016
@smithfarm smithfarm added this to the jewel milestone Jul 11, 2016
@odivlad
Contributor
odivlad commented Jul 14, 2016

@smithfarm, can you please provide the example of such description?

@tchaikov
Contributor
tchaikov commented Jul 14, 2016 edited

@odivlad you can "git log origin/hammer" for some examples. like

in 4eea92b

Conflicts:
   src/rgw/rgw_rados.cc (hammer write_data() takes rgw_obj reference as
   4th argument, hammer throttle_data() takes rgw_obj as 2nd argument)

and in a2e7ca1

  Conflicts:
   src/test/msgr/perf_msgr_client.cc
   src/test/msgr/perf_msgr_server.cc
   src/test/perf_local.cc
         These three files were not introduced on hammer, just remove
@odivlad
Contributor
odivlad commented Jul 14, 2016

done

@smithfarm smithfarm was assigned by dachary Aug 10, 2016
@smithfarm
Contributor

If a lead weighs in saying this should be backported to jewel, then I'm OK with it. Otherwise not. See discussion in #9871.

@odivlad odivlad init-radosgw: do not use systemd-run in sysvinit
`systemd-run` logic in initscripts was introduced because of ticket
http://tracker.ceph.com/issues/7627.

If we have systemd-based operating system, we should use systemd unit files
from systemd directory to start/stop ceph daemons.
Otherwise, `daemon()` from `/etc/init.d/functions` on systemd distro starts service
in `system.slice` and everything works well.

`systemd-run` can not be run on non-systemd distros, so it's not needed
on SysV systems.

also, ceph-disk is now able to run the "systemctl"
to enable and start the ceph-osd, and ceph-deploy is also now
playing well with systemd when it comes to ceph-mon and ceph-mds

Fixes: http://tracker.ceph.com/issues/16440

Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
(cherry picked from commit 1fd4f92)
cca589f
@odivlad
Contributor
odivlad commented Oct 10, 2016

@smithfarm, I've updated PR with patching only radosgw initscripts.

@smithfarm
Contributor

@oritwas wrote that she is OK to merge this, so I'm removing DNM.

@smithfarm smithfarm changed the title from [DNM] jewel: remove SYSTEMD_RUN from initscript to jewel: remove SYSTEMD_RUN from initscript Oct 10, 2016
@dachary dachary merged commit 52e596f into ceph:jewel Oct 14, 2016

2 checks passed

Signed-off-by all commits in this PR are signed
Details
default Build finished.
Details
@odivlad odivlad deleted the odivlad:fix-init-el7-jewel branch Oct 14, 2016
@theanalyst theanalyst changed the title from jewel: remove SYSTEMD_RUN from initscript to jewel: build/ops: remove SYSTEMD_RUN from initscript Nov 16, 2016
@theanalyst theanalyst changed the title from jewel: build/ops: remove SYSTEMD_RUN from initscript to "jewel: build/ops: remove SYSTEMD_RUN from initscript" Nov 17, 2016
@theanalyst theanalyst changed the title from "jewel: build/ops: remove SYSTEMD_RUN from initscript" to jewel: build/ops: remove SYSTEMD_RUN from initscript Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment