Project

General

Profile

Actions

Bug #8028

closed

/lib/lsb/init-functions does not exist in latest firefly rc

Added by Alfredo Deza about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

ceph-deploy mon create-initial
[ceph_deploy.conf][DEBUG ] found configuration file at: /Users/alfredo/tmp/foo/cephdeploy.conf
[ceph_deploy.cli][INFO  ] Invoked (1.4.0): /Users/alfredo/.virtualenvs/ceph-deploy/bin/ceph-deploy mon create-initial
[ceph_deploy.mon][DEBUG ] Deploying mon, cluster ceph hosts node2
[ceph_deploy.mon][DEBUG ] detecting platform for host node2 ...
[node2][DEBUG ] connected to host: node2
[node2][DEBUG ] detect platform information from remote host
[node2][DEBUG ] detect machine type
[ceph_deploy.mon][INFO  ] distro info: CentOS 6.4 Final
[node2][DEBUG ] determining if provided host has same hostname in remote
[node2][DEBUG ] get remote short hostname
[node2][DEBUG ] deploying mon to node2
[node2][DEBUG ] get remote short hostname
[node2][DEBUG ] remote hostname: node2
[node2][DEBUG ] write cluster configuration to /etc/ceph/{cluster}.conf
[node2][DEBUG ] create the mon path if it does not exist
[node2][DEBUG ] checking for done path: /var/lib/ceph/mon/ceph-node2/done
[node2][DEBUG ] done path does not exist: /var/lib/ceph/mon/ceph-node2/done
[node2][INFO  ] creating keyring file: /var/lib/ceph/tmp/ceph-node2.mon.keyring
[node2][DEBUG ] create the monitor keyring file
[node2][INFO  ] Running command: sudo ceph-mon --cluster ceph --mkfs -i node2 --keyring /var/lib/ceph/tmp/ceph-node2.mon.keyring
[node2][DEBUG ] ceph-mon: mon.noname-a 192.168.111.101:6789/0 is local, renaming to mon.node2
[node2][DEBUG ] ceph-mon: set fsid to bda52013-8d77-4dfe-a479-1c0cc2064b93
[node2][DEBUG ] ceph-mon: created monfs at /var/lib/ceph/mon/ceph-node2 for mon.node2
[node2][INFO  ] unlinking keyring file /var/lib/ceph/tmp/ceph-node2.mon.keyring
[node2][DEBUG ] create a done file to avoid re-doing the mon deployment
[node2][DEBUG ] create the init path if it does not exist
[node2][DEBUG ] locating the `service` executable...
[node2][INFO  ] Running command: sudo /sbin/service ceph -c /etc/ceph/ceph.conf start mon.node2
[node2][WARNIN] /etc/init.d/ceph: line 15: /lib/lsb/init-functions: No such file or directory
[node2][ERROR ] RuntimeError: command returned non-zero exit status: 1
[ceph_deploy.mon][ERROR ] Failed to execute command: /sbin/service ceph -c /etc/ceph/ceph.conf start mon.node2
[ceph_deploy][ERROR ] GenericError: Failed to create 1 monitors
ceph --version
ceph version 0.79-75-g2a6d962 (2a6d962f476efaa586f64b68b7f62a9deae22c44)

It looks like this was added by:

012bb5fb src/init-ceph.in  15 (Dmitry Smirnov        2014-03-25 22:10:48 +1100  15) . /lib/lsb/init-functions

Actions #1

Updated by Ian Colle about 10 years ago

  • Assignee set to Alfredo Deza
  • Priority changed from Normal to Immediate
Actions #2

Updated by Alfredo Deza about 10 years ago

  • Assignee deleted (Alfredo Deza)
  • Priority changed from Immediate to Normal

Commenting out that one line allows me to start the monitors but I understand this has side-effects that are not entirely clear to me

Actions #3

Updated by Alfredo Deza about 10 years ago

  • Assignee set to Alfredo Deza
  • Priority changed from Normal to Urgent
Actions #4

Updated by Alfredo Deza about 10 years ago

Ok so this looks like this gets installed with the redhat-lsb package that has this file in it:


CentOS 5 » CentOS x86_64 » redhat-lsb-4.0-2.1.4.el5.x86_64.rpm  
redhat-lsb-4.0-2.1.4.el5.x86_64.rpm

redhat-lsb - LSB base libraries support for CentOS Enterprise Linux

    Distribution: CentOS 5
    Repository: CentOS x86_64
    Package name: redhat-lsb
    Package version: 4.0
    Package architecture: x86_64
    Package type: rpm
    Installed size: 22,16 KB
    Download size: 24,48 KB
    Binary package: redhat-lsb-4.0-2.1.4.el5.x86_64.rpm
    Source package: redhat-lsb-4.0-2.1.4.el5.src.rpm

The Linux Standard Base (LSB) is an attempt to develop a set of standards that will increase compatibility among Linux distributions. The redhat-lsb package provides utilities needed for LSB Compliant Applications. It also contains requirements that will ensure that all components required by the LSB that are provided by CentOS Linux are installed on the system.

And that might be a reason why we don't see it in our test machines because iirc we do install that as part of the process to get test machines up and running

Installing the redhat-lsb fixes this for me on CentOS 6.4

Actions #5

Updated by Sage Weil about 10 years ago

if test -f /lib/lsb/init-functions; then
    . /lib/lsb/init-functions
fi
. /etc/init.d/functions

from this thread

http://www.redhat.com/archives/rhl-devel-list/2007-August/msg01920.html

Actions #6

Updated by Sage Weil about 10 years ago

the offending commit by the way is 012bb5fb5bbc76e5a2c5037dc0c6558f0b1b0a45

Actions #7

Updated by Alfredo Deza about 10 years ago

but those do not export the same functions... what is it that we needed from init-functions that we had to add that line?

And as a separate note, do we need to revert this and re-release 0.79?

Actions #8

Updated by Dmitry Smirnov about 10 years ago

This is because of missing depends on "lsb-base". I reckon it (or similar package) should be available on RHEL/CentOS. Besides my commit is not a problem as other init scripts already had similar include.
So to me it looks like RPM packaging issue...

Actions #9

Updated by Sage Weil about 10 years ago

  • Status changed from New to Fix Under Review
Actions #10

Updated by Sage Weil about 10 years ago

  • Status changed from Fix Under Review to 7
Actions #11

Updated by Sage Weil about 10 years ago

  • Assignee changed from Alfredo Deza to Sage Weil
Actions #12

Updated by Sage Weil about 10 years ago

  • Assignee changed from Sage Weil to Alfredo Deza

The gitbuilders like this fine.. Alfredo, do you want to do a final test with ceph-deploy to make sure yum install finds the dependency properly?

https://github.com/ceph/ceph/pull/1634

Actions #13

Updated by Sage Weil about 10 years ago

  • Status changed from 7 to Fix Under Review
Actions #14

Updated by Alfredo Deza about 10 years ago

  • Assignee changed from Alfredo Deza to Sage Weil

It works great except that it pulls a lot of other things other than the init-functions that we need:

$ sudo yum install ceph
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.es.its.nyu.edu
 * epel: mirror.steadfast.net
 * extras: mirror.cs.uwp.edu
 * updates: mirror.cisp.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ceph.x86_64 0:0.79-88.g5c7f580.el6 will be installed
--> Processing Dependency: redhat-lsb for package: ceph-0.79-88.g5c7f580.el6.x86_64
--> Running transaction check
---> Package redhat-lsb.x86_64 0:4.0-7.el6.centos will be installed
--> Processing Dependency: redhat-lsb-printing(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-4.0-7.el6.centos.x86_64
--> Processing Dependency: redhat-lsb-graphics(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-4.0-7.el6.centos.x86_64
--> Processing Dependency: redhat-lsb-core(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-4.0-7.el6.centos.x86_64
--> Processing Dependency: redhat-lsb-compat(x86-64) = 4.0-7.el6.centos for package: redhat-lsb-4.0-7.el6.centos.x86_64
--> Running transaction check
---> Package redhat-lsb-compat.x86_64 0:4.0-7.el6.centos will be installed
---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be installed
---> Package redhat-lsb-graphics.x86_64 0:4.0-7.el6.centos will be installed
---> Package redhat-lsb-printing.x86_64 0:4.0-7.el6.centos will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================
 Package                                                         Arch                                               Version                                                            Repository                                        Size
==============================================================================================================================================================================================================================================
Installing:
 ceph                                                            x86_64                                             0.79-88.g5c7f580.el6                                               Ceph                                              16 M
Installing for dependencies:
 redhat-lsb                                                      x86_64                                             4.0-7.el6.centos                                                   base                                              11 k
 redhat-lsb-compat                                               x86_64                                             4.0-7.el6.centos                                                   base                                              10 k
 redhat-lsb-core                                                 x86_64                                             4.0-7.el6.centos                                                   base                                              25 k
 redhat-lsb-graphics                                             x86_64                                             4.0-7.el6.centos                                                   base                                              13 k
 redhat-lsb-printing                                             x86_64                                             4.0-7.el6.centos                                                   base                                              11 k

Transaction Summary
==============================================================================================================================================================================================================================================
Install       6 Package(s)

Total download size: 16 M

If we change the spec to only inlcude redhat-lsb-core we get just what we need, so I suggest we just add that.

$ sudo yum install redhat-lsb-core
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.es.its.nyu.edu
 * epel: mirror.steadfast.net
 * extras: mirror.cs.uwp.edu
 * updates: mirror.cisp.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package redhat-lsb-core.x86_64 0:4.0-7.el6.centos will be installed
--> Finished Dependency Resolution

Total download size: 25 k
Installed size: 22 k
Is this ok [y/N]: y
Downloading Packages:
redhat-lsb-core-4.0-7.el6.centos.x86_64.rpm                                                                                                                                                                            |  25 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : redhat-lsb-core-4.0-7.el6.centos.x86_64                                                                                                                                                                                    1/1
  Verifying  : redhat-lsb-core-4.0-7.el6.centos.x86_64                                                                                                                                                                                    1/1

Installed:
  redhat-lsb-core.x86_64 0:4.0-7.el6.centos

Complete!

[vagrant@node2 ~]$ ls /lib/lsb
init-functions
Actions #15

Updated by Sage Weil about 10 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF