Ask Your Question
1

Unable to install swift All in One

asked 2013-09-16 19:09:24 -0600

nbanda3 gravatar image

Hi, I am using VM Player and installed Fedora 14. Followed this link to install Swift All in one http://docs.openstack.org/developer/swift/development_saio.html (http://docs.openstack.org/developer/s...) I am getting below errors

Command: yum install python-coverage python-devel python-nose python-simplejson python-xattr python-eventlet python-greenlet python-pastedeploy python-netifaces python-pip python-dnspython python-mock

Error: No package python-pastedeploy available. No package python-dnspython available. No package python-mock available.

Command: sudo pip install -r swift/test-requirements.txt Error: sudo: pip: command not found

Command: remakerings script Error: Invalid add value: r1z1-127.0.0.1:6010/sdb1 Invalid add value: r1z2-127.0.0.1:6020/sdb2 Invalid add value: r1z3-127.0.0.1:6030/sdb3 Invalid add value: r1z4-127.0.0.1:6040/sdb4

Can anyone help me out?

edit retag flag offensive close merge delete

Comments

hey nbanda3 i am getting same error after remakerings command from SAIO document. Can you please tell me that how you resolved it

Bhagyashri gravatar imageBhagyashri ( 2015-12-27 13:06:50 -0600 )edit

10 answers

Sort by » oldest newest most voted
0

answered 2013-09-18 20:21:51 -0600

nbanda3 gravatar image

Thanks clayg, that solved my question.

edit flag offensive delete link more
0

answered 2013-09-16 20:20:17 -0600

nbanda3 gravatar image

Hi, Thanks for the reply.. python-pip is already installed and still getting the error "sudo: pip: command not found".

I have created the remakerings script from that guide. I have added step 7 and looks like below (please correct if any wrong) and followed steps 1 to 9 and when I run 9th step(remakerings) and getting below error

script(please correct if i am wrong)

.bashrc

User specific aliases and functions

alias rm='rm -i' alias cp='cp -i' alias mv='mv -i'

Source global definitions

if [ -f /etc/bashrc ]; then . /etc/bashrc fi export SWIFT_TEST_CONFIG_FILE=/etc/swift/test.conf export PATH=${PATH}:~/bin

Error Invalid add value: r1z1-127.0.0.1:6010/sdb1 Invalid add value: r1z2-127.0.0.1:6020/sdb2 Invalid add value: r1z3-127.0.0.1:6030/sdb3 Invalid add value: r1z4-127.0.0.1:6040/sdb4 Traceback (most recent call last): File "/usr/bin/swift-ring-builder", line 500, in <module> last_balance = builder.get_balance() File "/usr/lib/python2.7/site-packages/swift/common/ring/builder.py", line 287, in get_balance sum(d['weight'] for d in self.devs if d is not None) ZeroDivisionError: integer division or modulo by zero Invalid add value: r1z1-127.0.0.1:6011/sdb1 Invalid add value: r1z2-127.0.0.1:6021/sdb2 Invalid add value: r1z3-127.0.0.1:6031/sdb3 Invalid add value: r1z4-127.0.0.1:6041/sdb4 Traceback (most recent call last): File "/usr/bin/swift-ring-builder", line 500, in <module> last_balance = builder.get_balance() File "/usr/lib/python2.7/site-packages/swift/common/ring/builder.py", line 287, in get_balance sum(d['weight'] for d in self.devs if d is not None) ZeroDivisionError: integer division or modulo by zero Invalid add value: r1z1-127.0.0.1:6012/sdb1 Invalid add value: r1z2-127.0.0.1:6022/sdb2 Invalid add value: r1z3-127.0.0.1:6032/sdb3 Invalid add value: r1z4-127.0.0.1:6042/sdb4 Traceback (most recent call last): File "/usr/bin/swift-ring-builder", line 500, in <module> last_balance = builder.get_balance() File "/usr/lib/python2.7/site-packages/swift/common/ring/builder.py", line 287, in get_balance sum(d['weight'] for d in self.devs if d is not None) ZeroDivisionError: integer division or modulo by zero

edit flag offensive delete link more
0

answered 2013-09-16 22:10:28 -0600

nbanda3 gravatar image

Hi,

It seems i have fixed the pip. After this below command sucessfully got executed at user level

sudo pip install -r swift/test-requirements.txt

But still for swift version i am getting below error

[swiftproject@localhost root]$ swift --version Command not found. Install package 'swift' to provide command 'swift'? [N/y]

[swiftproject@localhost root]$ python -c "import swift;print swift.__version__" Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: 'module' object has no attribute '__version__' [swiftproject@localhost root]$ which pip /usr/bin/pip

edit flag offensive delete link more
0

answered 2013-09-16 20:46:40 -0600

nbanda3 gravatar image

In fact i have followed all the steps in that document but getting errors when i run remakerings. I have created a user with name swiftproject and groupname: swiftproject and added this entry in sudoers list.

All the commands were executed at root level

edit flag offensive delete link more
0

answered 2013-09-16 19:50:29 -0600

clay-gerrard gravatar image

Isn't Fedora on like version 19 now? You can probably install on 14... but the instructions may not be exactly right (they may not be right for Fedora 19 either, I've most recently audited them on Ubuntu Precise & Cent 6.4).

You're gunna need pip, yum install python-pip should work; you'll probably get paste, dnspython, and mock later when you pip install requirements - so don't worry if you don't have packages for those.

The remakerings script needs to be manually created (step 3) and you need to make sure ~/bin is in your path (step 7):

http://docs.openstack.org/developer/swift/development_saio.html#setting-up-scripts-for-running-swift (http://docs.openstack.org/developer/s...)

On Mon, Sep 16, 2013 at 12:11 PM, Naresh < question235840@answers.launchpad.net > wrote:

New question #235840 on OpenStack Object Storage (swift): https://answers.launchpad.net/swift/+question/235840 (https://answers.launchpad.net/swift/+...)

Hi, I am using VM Player and installed Fedora 14. Followed this link to install Swift All in one http://docs.openstack.org/developer/swift/development_saio.html (http://docs.openstack.org/developer/s...) I am getting below errors

Command: yum install python-coverage python-devel python-nose python-simplejson python-xattr python-eventlet python-greenlet python-pastedeploy python-netifaces python-pip python-dnspython python-mock

Error: No package python-pastedeploy available. No package python-dnspython available. No package python-mock available.

Command: sudo pip install -r swift/test-requirements.txt Error: sudo: pip: command not found

Command: remakerings script Error: Invalid add value: r1z1-127.0.0.1:6010/sdb1 Invalid add value: r1z2-127.0.0.1:6020/sdb2 Invalid add value: r1z3-127.0.0.1:6030/sdb3 Invalid add value: r1z4-127.0.0.1:6040/sdb4

Can anyone help me out?


You received this question notification because you are a member of Swift Core, which is an answer contact for OpenStack Object Storage (swift).

edit flag offensive delete link more
0

answered 2013-09-16 20:51:47 -0600

clay-gerrard gravatar image

Maybe the swift version you have doesn't support regions? The version you see when you run swift --version is for the command line client. You could try to run python -c "import swift; print swift.__version__"

If you're on 1.6 (1.7?) or something old, try pulling out the r1 part form the commands so it looks like:

swift-ring-builder object.builder add z1-127.0.0.1:6010/sdb1 1 swift-ring-builder object.builder add z2-127.0.0.1:6020/sdb2 1 swift-ring-builder object.builder add z3-127.0.0.1:6030/sdb3 1 swift-ring-builder object.builder add z4-127.0.0.1:6040/sdb4 1

The pip thing is probably going to come back and bite you, but it may just be something with root's path. Try running pip as you then again as root:

which pip
sudo -i
which pip
edit flag offensive delete link more
0

answered 2013-09-16 21:13:44 -0600

nbanda3 gravatar image

Please see the output.. do I need to install swift from below ? My question is, if I follow the swift all in guide, every dependency must be installed right?

[root@localhost ~]# swift -version Command not found. Install package 'swift' to provide command 'swift'? [N/y]

[root@localhost ~]# python -c "import swift;print swift._version_" Traceback (most recent call last): File "<string>", line 1, in <module> AttributeError: 'module' object has no attribute '_version_'

[root@localhost ~]# which pip /usr/bin/which: no pip in (/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin)

[root@localhost ~]# sudo -i [root@localhost ~]# which pip /usr/bin/which: no pip in (/usr/lib64/ccache:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin)

edit flag offensive delete link more
0

answered 2013-09-16 21:29:45 -0600

clay-gerrard gravatar image

Some dependencies can be installed via packages, depending on your distro, others can be installed via pip - but you'll need to get pip working.

Try reading this for pip on Fedora, see if that makes sense:

http://stackoverflow.com/questions/4126745/python-pip-yum-package-provides-pip-python-instead-of-pip (http://stackoverflow.com/questions/41...)

^ fix pip

the swift version command is double underscores:

swift.__version__

instead of

swift._version_

The root/sudo also seems like it may be throwing you for a whirl:

http://docs.openstack.org/developer/swift/development_saio.html#what-s-in-a-your-user-name (http://docs.openstack.org/developer/s...)

Starting in the following section, the commands in the guide are expected to be run as user developing on Swift:

http://docs.openstack.org/developer/swift/development_saio.html#getting-the-code (http://docs.openstack.org/developer/s...)

Also, please consider that the 'Swift All In One" guide provides instructions for setting up a development environment for Swift; so they are not the most well suited for all needs. Have you read:

http://docs.openstack.org/grizzly/openstack-compute/install/apt/content/ch_installing-openstack-object-storage.html (http://docs.openstack.org/grizzly/ope...)

edit flag offensive delete link more
0

answered 2013-09-16 21:21:46 -0600

nbanda3 gravatar image

If I remove r1 in remakerings scripts got executed.

Then If i run

~/swift/.unittests (error is below) startmain (error Unable to locate config file for main-server. /etc/swift/main-server.conf does not exist?)

[root@localhost ~]# ~/swift/.unittests

E

ERROR: Failure: ImportError (No module named pbr.version)

Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/nose/loader.py", line 382, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/python2.7/site-packages/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/python2.7/site-packages/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/root/swift/test/__init__.py", line 37, in <module> import swift File "/root/swift/swift/__init__.py", line 19, in <module> import pbr.version ImportError: No module named pbr.version

Name Stmts Exec Cover Missing

/root/swift/swift/__init__ 10 3 30% 22-32 /root/swift/test/__init__ 33 5 15% 23-34, 38-77 /usr/lib/python2.7/site-packages/nose/case 195 50 25% 5-26, 29, 34, 43, 46, 49, 52-55, 60-61, 65, 70-71, 75-97, 104-114, 133-137, 141, 149, 152, 155, 173, 177-383 /usr/lib/python2.7/site-packages/nose/core 154 22 14% 3-32, 35, 40, 46, 52, 57, 64-170, 180, 184, 195, 197-322 /usr/lib/python2.7/site-packages/nose/failure 22 9 40% 1-20, 28, 32-35, 39 /usr/lib/python2.7/site-packages/nose/importer 92 44 47% 7-21, 23, 26, 35, 41, 52, 66, 77-84, 89, 91-123, 132, 146-147, 151-154 /usr/lib/python2.7/site-packages/nose/loader 331 37 11% 9-55, 76, 83-84, 94-326, 341, 354-365, 371, 387, 392-433, 441, 447-579 /usr/lib/python2.7/site-packages/nose/plugins/capture 53 14 26% 12-54, 60-65, 70, 80-92, 97, 101-107, 111 /usr/lib/python2.7/site-packages/nose/plugins/cover 164 3 1% 13-150, 157-291 /usr/lib/python2.7/site-packages/nose/plugins/errorclass 65 10 15% 95-139, 142, 145-147, 149, 156-215 /usr/lib/python2.7/site-packages/nose/plugins/logcapture 120 15 12% 18-82, 84-167, 171-177, 191-204, 209, 214-219, 226-229, 233-234 /usr/lib/python2.7/site-packages/nose/plugins/manager 261 39 14% 47-81, 84-85, 92, 95, 103-104, 107, 124, 140, 144-157, 163-165, 173-177, 181-239, 247-448 /usr/lib/python2.7/site-packages/nose/proxy 101 40 39% 18-29, 31-42, 44, 49, 61, 63, 67-77, 79, 85-88, 99, 103-105, 109-111, 116, 124-154, 159-162, 168-174 /usr/lib/python2.7/site-packages/nose/result 132 33 25% 11-36, 42, 46-54, 62-64, 70-74, 80, 84-86, 91-96, 100, 107, 112-154, 161-181, 185, 189-199 /usr/lib/python2.7/site-packages/nose/selector 134 22 16% 9-34, 36, 39, 47-221, 223, 230-231, 243, 246-250 /usr/lib/python2.7/site-packages/nose/suite 392 156 39% 10-49, 54-66, 70-77, 81-92, 98-101, 105, 109-110, 115-145, 151, 159-171, 175, 178-196, 206, 209-214, 218-219, 228-267, 271-272, 274-275, 278, 293-295, 299, 304, 316-321, 324-327, 331-332, 342-343, 352-354, 358, 370, 375-392, 394, 397, 408, 424-425, 428, 436, 441, 444-447, 453, 455, 461, 464-465, 470, 485-535, 538-539, 546, 554-602

/usr/lib/python2.7/site-packages/nose/util 352 62 17% 3-139, 150-176, 184-193, 216, 220-255, 287, 290, 304-319 ...

(more)
edit flag offensive delete link more
0

answered 2013-09-16 21:50:29 -0600

nbanda3 gravatar image

Hi I read those documents and ran the swift development code as user only. Please find the steps

Installing dependencies - executed as root Using a loopback device for storage-executed as root Setting up rsync -executed as root Starting memcached -executed as root Getting the code -executed as user Do the following commands as root, but verify that Swift has access to resulting configuration files.(how to check this) Configuring each node-executed as root Setting up scripts for running Swift-executed as root

May be pip is creating the problem. I will check that. Can you please suggest if their is any mistake in the above execution levels?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-09-16 19:09:24 -0600

Seen: 709 times

Last updated: Sep 18 '13