Bug 764880 (GLUSTER-3148)

Summary: object-strorage: dependencies for centos
Product: [Community] GlusterFS Reporter: Saurabh <saurabh>
Component: object-storageAssignee: Gaurav <ggangalw>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: pre-releaseCC: gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Saurabh 2011-07-11 06:08:28 UTC
presently on centos these are packages that are getting installed,


Total download size: 23 M
Is this ok [y/N]: y
Downloading Packages:
(1/25): python-netifaces-0.5-1.el5.x86_64.rpm                                                                                         |  11 kB     00:00     
(2/25): python-greenlet-0.3.1-2.el5.x86_64.rpm                                                                                        |  20 kB     00:00     
(3/25): pyxattr-0.4.0-2.el5.x86_64.rpm                                                                                                |  24 kB     00:00     
(4/25): python-coverage-2.85-2.el5.noarch.rpm                                                                                         |  30 kB     00:00     
(5/25): memcached-1.4.5-1.el5.kb.x86_64.rpm                                                                                           |  72 kB     00:00     
(6/25): libgcc-4.1.2-50.el5.i386.rpm                                                                                                  |  96 kB     00:00     
(7/25): libgcc-4.1.2-50.el5.x86_64.rpm                                                                                                |  99 kB     00:00     
(8/25): python-simplejson-2.0.9-2.el5.x86_64.rpm                                                                                      | 140 kB     00:02     
(9/25): python-configobj-4.4.0-2.el5.noarch.rpm                                                                                       | 218 kB     00:01     
(10/25): curl-7.15.5-9.el5_6.3.x86_64.rpm                                                                                             | 230 kB     00:00     
(11/25): curl-7.15.5-9.el5_6.3.i386.rpm                                                                                               | 233 kB     00:00     
(12/25): libgfortran-4.1.2-50.el5.x86_64.rpm                                                                                          | 243 kB     00:00     
(13/25): python-eventlet-0.9.12-2.el5.noarch.rpm                                                                                      | 272 kB     00:00     
(14/25): python-webob-0.9.8-2.el5.noarch.rpm                                                                                          | 297 kB     00:00     
(15/25): curl-devel-7.15.5-9.el5_6.3.i386.rpm                                                                                         | 309 kB     00:00     
(16/25): python-nose-0.11.3-2.el5.noarch.rpm                                                                                          | 310 kB     00:00     
(17/25): curl-devel-7.15.5-9.el5_6.3.x86_64.rpm                                                                                       | 317 kB     00:00     
(18/25): libstdc++-4.1.2-50.el5.x86_64.rpm                                                                                            | 353 kB     00:00     
(19/25): libstdc++-4.1.2-50.el5.i386.rpm                                                                                              | 362 kB     00:00     
(20/25): xfsprogs-2.9.4-1.el5.centos.x86_64.rpm                                                                                       | 1.3 MB     00:01     
(21/25): libstdc++-devel-4.1.2-50.el5.x86_64.rpm                                                                                      | 2.8 MB     00:04     
(22/25): cpp-4.1.2-50.el5.x86_64.rpm                                                                                                  | 2.9 MB     00:04     
(23/25): gcc-gfortran-4.1.2-50.el5.x86_64.rpm                                                                                         | 3.5 MB     00:05     
(24/25): gcc-c++-4.1.2-50.el5.x86_64.rpm                                                                                              | 3.8 MB     00:05     
(25/25): gcc-4.1.2-50.el5.x86_64.rpm                                                                                                  | 5.3 MB     00:07     
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                        518 kB/s |  23 MB     00:45     
Running rpm_check_debug
Running Transaction Test

but it's hung at "Running Transaction Test"

Comment 1 Saurabh 2011-07-11 07:23:40 UTC
well, while going forward with installation has given me these issues,


[root@centos-qa-client-3 swift]# vim swift_config.sh 
[root@centos-qa-client-3 swift]# sudo sh swift_config.sh
cp: cannot create regular file `/etc/rsyslog.d/10-swift.conf': No such file or directory
chown: `syslog.adm': invalid user
sudo: service: command not found


here in centos we don't find /etc/rsyslog.d 

[root@centos-qa-client-3 swift]# ls /etc/rsyslog*
/etc/rsyslog.conf



Also, in my earlier posts as I mentioned earlier for sqlite3, even if you guys think that it is a requirement then please let me know about the correct *.rpm required,


dspam-sqlite3.x86_64 : SQLite v3.x storage driver for libdspam
ruby-sqlite3.x86_64 : A Ruby interface for the SQLite database engine
rubygem-sqlite3-ruby.x86_64 : Allows Ruby scripts to interface with a SQLite3 database
sqlite-devel.i386 : Development tools for the sqlite3 embeddable SQL database engine.
sqlite-devel.x86_64 : Development tools for the sqlite3 embeddable SQL database engine.
zabbix-proxy-sqlite3.x86_64 : Zabbix proxy compiled to use SQLite
zabbix-server-sqlite3.x86_64 : Zabbix server compiled to use SQLite
zabbix-web-sqlite3.x86_64 : Zabbix web frontend for SQLite

Comment 2 Saurabh 2011-07-11 07:41:09 UTC
While installing using setup.py, this is thrown as error,

by default centos is using 2.4 and Ubuntu is having 2.6 seems that is the problem over here

[root@centos-qa-client-3 swift]# python setup.py install
  File "setup.py", line 39
    with open("ChangeLog", "w") as changelog_file:
            ^
SyntaxError: invalid syntax

Comment 3 Saurabh 2011-07-11 08:51:48 UTC
as the configuration file for object-storage describes dependencies for ubuntu to work for openstack swift to work, similarly the config should list the dependencies required for CentOS.

As, trying the things similarly for CentOS as on Ubuntu for installing openstack swift,

these dependencies may not hold good,
 install python-software-properties
 ppa:swift-core/ppa
 update

also, the packages like sqlite3 may not be required at all for either of the paltform as with gluster integration of openstack swift, the backend will be glusterfs rather a sqlite db.

also some clarification required for these packages like,
for python-dev, which one of the following should be used for installation,

1) python26-devel.x86_64 : The libraries and header files needed for Python development
2) python-devel.x86_64 : The libraries and header files needed for Python development.
   Although here I consider that "no. 2" should be used but still a conformation from developer.

now for python-pastedeploy, 

1)python-paste.noarch : Tools for using a Web Server Gateway Interface stack
2)python-paste-deploy.noarch : Load, configure, and compose WSGI applications and servers
3)python-paste-script.noarch : A pluggable command-line frontend

all three are required or just the first two suffice.

Comment 4 Gaurav 2011-07-12 02:45:41 UTC
Centos5 has python2.4 as default python installation, swift works with python2.6 onwards, you need to install 2.6 first, but it will not override the default installation, so the packages installed via yum will be for 2.4 only, you need to download the source for each package and install, you can also use "python -m easy_install <package>" for some packages. Once done with installing all dependency pacckages set PYTHONPATH=<location for 2.6 site-packages>. Then swift should be installed.

Sqlite is needed for installation of this release, will be removed next release onwards.

Comment 5 Gaurav 2011-07-18 05:45:26 UTC
yum install memcached
yum install openssl openssl-devel

Download Python2.6 source "wget http://www.python.org/ftp/python/2.6/Python-2.6.tgz"
You then need to edit the Modules/Setup.dist file and uncomment the following (starting on line number 215 in my 2.6 source):
SSL=/urs/local/ssl
_ssl _ssl.c
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl
-L$(SSL)/lib -lssl -lcrypto 
Run "./configure", "make", "make install"
export PYTHONPATH=/usr/local/lib/python2.6/site-packages/

Install setuptools using source to use easy_install-2.6.
Download setuptools using"wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e"
Do "python2.6 setup.py install"

easy_install-2.6 paste
easy_install-2.6 pastedeploy
easy_install-2.6 eventlet
easy_install-2.6 greenlet
easy_install-2.6 xattr
easy_install-2.6 configobj
easy_install-2.6 coverage
easy_install-2.6 webob
easy_install-2.6 simplejson
easy_install-2.6 nose
easy_install-2.6 netifaces

Comment 6 Saurabh 2011-07-18 09:36:09 UTC
did as mentioned above, and created test and auth volumes, 
and added user with admin privileges,

still curl fails to collect token,


[root@centos-qa-client-3 ~]# mount | grep xfs
/srv/swift-disk on /mnt/sdb1 type xfs (rw,noatime,nodiratime,loop=/dev/loop0,nobarrier,logbufs=8)



[root@centos-qa-client-3 ~]# /root/3.2.2/inst/sbin/gluster volume info test

Volume Name: test
Type: Distribute
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 10.1.12.135:/mnt/sdb1/test
Brick2: 10.1.12.135:/mnt/sdb1/test1
[root@centos-qa-client-3 ~]# /root/3.2.2/inst/sbin/gluster volume info auth

Volume Name: auth
Type: Distribute
Status: Started
Number of Bricks: 2
Transport-type: tcp
Bricks:
Brick1: 10.1.12.135:/mnt/sdb1/auth
Brick2: 10.1.12.135:/mnt/sdb1/auth1



[root@centos-qa-client-3 ~]# gluster-object-list  -K sj -A https://127.0.0.1:443/auth test
{"services": {"storage": {"default": "local", "local": "https://10.1.12.135:443/v1/AUTH_test"}}, "account_id": "AUTH_test", "users": [{"name": "tester"}]}
[root@centos-qa-client-3 ~]# gluster-object-list  -K sj -A https://127.0.0.1:443/auth test tester
{"groups": [{"name": "test:tester"}, {"name": "test"}, {"name": ".admin"}], "gid": "-1", "uid": "-1", "auth": "plaintext:testing"}
[root@centos-qa-client-3 ~]# 


basically the fuse mount is not getting created,

[root@centos-qa-client-3 ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/srv/swift-disk on /mnt/sdb1 type xfs (rw,noatime,nodiratime,loop=/dev/loop0,nobarrier,logbufs=8)
10.1.12.136:/opt on /opt type nfs (rw,addr=10.1.12.136)
glusterfs#localhost:auth on /mnt/swift/auth type fuse (rw,allow_other,default_permissions,max_read=131072)

Comment 7 Saurabh 2011-07-18 09:54:35 UTC
also, under log dir, I am just finding


[root@centos-qa-client-3 ~]# ls /var/log/swift
hourly

no other file is created

Comment 8 Saurabh 2011-07-18 10:08:18 UTC
missed one step while creating authentication, and now the curl works fine to PUT/GET data

Comment 9 Saurabh 2011-07-18 10:08:45 UTC
verified it