Bug 1225183 - ceph sysvinit script calls ceph-disk when it may not be present
Summary: ceph sysvinit script calls ceph-disk when it may not be present
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Build
Version: 1.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 1.3.2
Assignee: Ken Dreyer (Red Hat)
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
: 1274810 (view as bug list)
Depends On:
Blocks: ceph131rn
TreeView+ depends on / blocked
 
Reported: 2015-05-26 18:48 UTC by Travis Rhoden
Modified: 2022-02-21 18:35 UTC (History)
4 users (show)

Fixed In Version: ceph-0.94.5-2.el7cp
Doc Type: Known Issue
Doc Text:
Ceph init script calls a non-present command The Ceph init script calls the *ceph-disk* command which is not present on monitor nodes. Consequently, when running the *service ceph start* command with no arguments, an error is returned. This error does not effect functionality of starting and stopping daemons.
Clone Of:
Environment:
Last Closed: 2016-02-29 14:42:15 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHCEPH-3486 0 None None None 2022-02-21 18:35:39 UTC
Red Hat Product Errata RHBA-2016:0313 0 normal SHIPPED_LIVE Red Hat Ceph Storage 1.3.2 bug fix and enhancement update 2016-02-29 19:37:43 UTC

Description Travis Rhoden 2015-05-26 18:48:40 UTC
Description of problem:

With the ceph-mon vs ceph-osd split packaging, it is a common/expected thing for a node to have ceph-mon installed and not ceph-osd (and vice versa).  However, the init script (/etc/init.d/ceph) has a call to `ceph-disk`, which may not be present on the machine.

This just produces an error at the end, and only happens if running "service ceph start" with no arguments.  If running something like "service ceph start mon.`hostname`, the code is not triggered.


Version-Release number of selected component (if applicable):

[root@srv ~]# rpm -q ceph-mon
ceph-mon-0.94.1-11.el7cp.x86_64

How reproducible:

Very

Steps to Reproduce:
1. Use ice-setup and ceph-deploy to install a 1-node cluster with 1 mon and no OSDs
2. Go to monitor node and issue: "service ceph stop; service ceph start"

Actual results:

[root@srv ~]# service ceph status
=== mon.srv ===
mon.srv: running {"version":"0.94.1"}
[root@srv ~]# service ceph stop
=== mon.srv ===
Stopping Ceph mon.srv on srv...kill 12961...done
[root@srv ~]#
[root@srv ~]#
[root@srv ~]#
[root@srv ~]#
[root@srv ~]# ps -ef | grep ceph
root     13516 13343  0 14:37 pts/0    00:00:00 grep --color=auto ceph
[root@srv ~]# service ceph start
=== mon.srv ===
Starting Ceph mon.srv on srv...
Running as unit run-13614.service.
Starting ceph-create-keys on srv...
/etc/init.d/ceph: line 496: ceph-disk: command not found

Expected results:

No error about a missing script/binary

Additional info:

Since it's the last thing that happens in the script, this does not effect functionality of starting/stopping daemons.  It's just noise.  It could be fixed with something like a check to see that the ceph-disk executable exists before calling it.

Comment 2 Ken Dreyer (Red Hat) 2015-07-14 21:41:29 UTC
Since this is cosmetic, I'm pushing it to 1.3.2

Comment 3 Harish NV Rao 2015-10-28 09:27:33 UTC
*** Bug 1274810 has been marked as a duplicate of this bug. ***

Comment 8 Ken Dreyer (Red Hat) 2016-01-19 17:01:07 UTC
https://github.com/ceph/ceph/pull/7286 solves this in my testing.

Comment 12 Hemanth Kumar 2016-02-02 11:01:32 UTC
call to ceph-disk has been taken care when it it is not present., 
works fine now.
Moving to Verified state..


Result:
--------------
[ubuntu@magna042 ~]$ sudo service ceph status
=== mon.magna042 === 
mon.magna042: running {"version":"0.94.5-4.el7cp"}


[ubuntu@magna042 ~]$ ps -ef | grep ceph
root     31239     1  0 10:55 ?        00:00:00 /bin/bash -c ulimit -n 32768; TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES=128MB /usr/bin/ceph-mon -i magna042 --pid-file /var/run/ceph/mon.magna042.pid -c /etc/ceph/ceph.conf --cluster ceph -f
root     31247 31239  0 10:55 ?        00:00:00 /usr/bin/ceph-mon -i magna042 --pid-file /var/run/ceph/mon.magna042.pid -c /etc/ceph/ceph.conf --cluster ceph -f
ubuntu   32070 31758  0 10:57 pts/0    00:00:00 grep --color=auto ceph

[ubuntu@magna042 ~]$ sudo service ceph stop
=== mon.magna042 === 
Stopping Ceph mon.magna042 on magna042...kill 31247...done

[ubuntu@magna042 ~]$ ps -ef | grep ceph
ubuntu   32152 31758  0 10:58 pts/0    00:00:00 grep --color=auto ceph

[ubuntu@magna042 ~]$ sudo service ceph start
=== mon.magna042 === 
Starting Ceph mon.magna042 on magna042...
Running as unit run-32355.service.
Starting ceph-create-keys on magna042...

Comment 14 errata-xmlrpc 2016-02-29 14:42:15 UTC
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://access.redhat.com/errata/RHBA-2016:0313


Note You need to log in before you can comment on or make changes to this bug.