Start the API Service in tox venv failed

Bug #1479190 reported by yuntongjin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Searchlight
Fix Released
Medium
Travis Tripp

Bug Description

in doc/source/dev-environment.rst,
   # Start the API Service.
   (venv) $ searchlight-api
will failed with:
ERROR: Unable to locate paste config file for searchlight-api.

Revision history for this message
Steve McLellan (sjmc7) wrote :

As a temporary measure you can copy searchlight-api-paste.ini from etc/ in the source root. I'll try and take a look into how it's supposed to get into the tox venv.

Revision history for this message
Travis Tripp (travis-tripp) wrote :

When you ran this step: did you do it with venv activated?

python setup.py develop

e.g.
source .tox/venv/bin/activate

Steve McLellan (sjmc7)
Changed in searchlight:
importance: Undecided → Medium
tags: added: low-hanging-fruit
Changed in searchlight:
assignee: nobody → Sasikiran (sasikiran-vaddi)
Revision history for this message
Sasikiran (sasikiran-vaddi) wrote :

Is it mandatory for searchlight to have openstack components installed.

I tried to run the index operation got connection errors.
$> searchlight-manage index sync

2015-11-16 15:19:46.613 9967 ERROR elasticsearch NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f2d28cf58d0>: Failed to establish a new connection: [Errno 111] Connection refused

I am not sure whether I'm missing something or (https://github.com/openstack/searchlight/blob/master/doc/source/dev-environment.rst) the following link has inadequate information.

Revision history for this message
Steve McLellan (sjmc7) wrote :

@Saskiran - it sounds like you don't have elasticsearch running. You can install it either from your operating system's package management or by downloading it and running it manually. I would recommend using a version pre-2.0.0. If it is running, you may need to set the 'hosts' parameter in the [elasticsearch] config group. Feel free to ask in #openstack-searchlight if you need help.

Revision history for this message
Travis Tripp (travis-tripp) wrote :

@Saskiran, are you still working on this? I think you just need to make the following change in a patch. I just treid it and it worked for me.That worked for me.

index 81a5516..5233d73 100644
--- a/doc/source/dev-environment.rst
+++ b/doc/source/dev-environment.rst
@@ -314,7 +314,7 @@ communicating with your server).
    $ source .tox/venv/bin/activate

    # Start the API Service.
- (venv) $ searchlight-api
+ (venv) $ searchlight-api --config-file etc/searchlight.conf

Changed in searchlight:
status: New → Triaged
Changed in searchlight:
assignee: Sasikiran (sasikiran-vaddi) → nobody
Changed in searchlight:
assignee: nobody → Travis Tripp (travis-tripp)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to searchlight (master)

Fix proposed to branch: master
Review: https://review.openstack.org/274966

Changed in searchlight:
status: Triaged → In Progress
Revision history for this message
Travis Tripp (travis-tripp) wrote :
Changed in searchlight:
milestone: none → mitaka-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to searchlight (master)

Reviewed: https://review.openstack.org/274966
Committed: https://git.openstack.org/cgit/openstack/searchlight/commit/?id=d5c559b010288f9702117c992703592f76903ca1
Submitter: Jenkins
Branch: master

commit d5c559b010288f9702117c992703592f76903ca1
Author: Travis Tripp <email address hidden>
Date: Mon Feb 1 18:50:10 2016 -0700

    Add config-file to dev env setup instructions

    The dev env setup instructions are missing the --config-file option.

    Change-Id: I5b02760580142c9d2afbf81aaf7125036d9fc2c8
    Closes-Bug: 1479190

Changed in searchlight:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/searchlight 0.2.0.0b3

This issue was fixed in the openstack/searchlight 0.2.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.