Skip to content

Commit fc597d4

Browse files
committed
Merge PR ceph#29030 into master
* refs/pull/29030/head: qa/tasks/ceph_deploy: assume systemd and simplify shutdown wonkiness Reviewed-by: Alfredo Deza <[email protected]>
2 parents a043fc8 + 97a45c9 commit fc597d4

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

qa/tasks/ceph_deploy.py

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -511,25 +511,17 @@ def ceph_volume_osd_create(ctx, config):
511511
if config.get('keep_running'):
512512
return
513513
log.info('Stopping ceph...')
514-
ctx.cluster.run(args=['sudo', 'stop', 'ceph-all', run.Raw('||'),
515-
'sudo', 'service', 'ceph', 'stop', run.Raw('||'),
516-
'sudo', 'systemctl', 'stop', 'ceph.target'])
517-
518-
# Are you really not running anymore?
519-
# try first with the init tooling
520-
# ignoring the status so this becomes informational only
521-
ctx.cluster.run(
522-
args=[
523-
'sudo', 'status', 'ceph-all', run.Raw('||'),
524-
'sudo', 'service', 'ceph', 'status', run.Raw('||'),
525-
'sudo', 'systemctl', 'status', 'ceph.target'],
526-
check_status=False)
514+
ctx.cluster.run(args=['sudo', 'systemctl', 'stop', 'ceph.target'],
515+
check_status=False)
516+
time.sleep(4)
527517

528518
# and now just check for the processes themselves, as if upstart/sysvinit
529519
# is lying to us. Ignore errors if the grep fails
530520
ctx.cluster.run(args=['sudo', 'ps', 'aux', run.Raw('|'),
531521
'grep', '-v', 'grep', run.Raw('|'),
532522
'grep', 'ceph'], check_status=False)
523+
ctx.cluster.run(args=['sudo', 'systemctl', run.Raw('|'),
524+
'grep', 'ceph'], check_status=False)
533525

534526
if ctx.archive is not None:
535527
# archive mon data, too
@@ -709,9 +701,7 @@ def execute_cdeploy(admin, cmd, path):
709701
yield
710702
finally:
711703
log.info("cleaning up")
712-
ctx.cluster.run(args=['sudo', 'stop', 'ceph-all', run.Raw('||'),
713-
'sudo', 'service', 'ceph', 'stop', run.Raw('||'),
714-
'sudo', 'systemctl', 'stop', 'ceph.target'],
704+
ctx.cluster.run(args=['sudo', 'systemctl', 'stop', 'ceph.target'],
715705
check_status=False)
716706
time.sleep(4)
717707
for i in range(3):

0 commit comments

Comments
 (0)