DESCRIPTION

CBQE-2542 :: Add support for configuring single node cluster with data services

- We can provision 1 node cluster with data services
- These services can be defined via .ini file or services_init parameter
- Implemented for all tests inheriting from basetestcase.py
- works for dev box and remote VMs

Change-Id: Ib14538d7f106575910206c75c6b13c01380b2238


COMMENTS

author: Hugo Blankenship
date: 2015-01-07 01:56:36.023000000

Patch Set 8:

Build Started http://factory.couchbase.com/job/testrunner-Jasmin Rangel-master/3653/

-------------------------------------
author: Quentin Ali
date: 2015-01-07 01:57:10.642000000

Patch Set 8:

There was a bug when passing services_init. Fixed it.

You can try something on the following lines:
./testrunner -i test.ini -t 2i.indexscans_2i.SecondaryIndexingScanTests.test_multi_create_query_explain_drop_index,groups=orderby:simple:full:isnotnull,dataset=default,doc-per-day=1,n1ql_port=9499,nodes_init=1,cbq_version=sherlock,skip_build_tuq=True,services_init=kv:n1ql:index

-------------------------------------
author: Quentin Ali
date: 2015-01-07 02:00:36.281000000

Patch Set 8:

for cluster with 2 nodes initially

./testrunner -i test.ini -t 2i.indexscans_2i.SecondaryIndexingScanTests.test_multi_create_query_explain_drop_index,groups=orderby:simple:full:isnotnull,dataset=default,doc-per-day=1,n1ql_port=9499,nodes_init=1,cbq_version=sherlock,skip_build_tuq=True,services_init=kv:n1ql:index-kv,nodes_init=2

-------------------------------------
author: Hugo Blankenship
date: 2015-01-07 02:10:25.619000000

Patch Set 8: Verified+1

Build Successful 

http://factory.couchbase.com/job/testrunner-Jasmin Rangel-master/3653/ : SUCCESS

-------------------------------------
author: Esperanza Cherry
date: 2015-01-07 06:16:16.035000000

Patch Set 8: Code-Review-1

(2 comments)

one question related to 'port' parameter

Line:135, pytests/basetestcase.py -> self.servers[0] is more clearly then self.servers[:1]

Line:732, lib/membase/api/rest_client.py -> it's not clear with this condition. it turns out that we use "port" parameter only when it's 127.0.0.1 cluster. in other cases it is simply ignored

-------------------------------------
author: Quentin Ali
date: 2015-01-07 06:30:57.487000000

Patch Set 8:

(2 comments)

Line:135, pytests/basetestcase.py -> self.servers[0] is a list, meanwhile self.servers[:1] is a list. We expect to pass a list.

Line:734, lib/membase/api/rest_client.py -> it works with 127.0.0.1. I confirmed it with Alk, it was his recommendation

-------------------------------------
author: Quentin Ali
date: 2015-01-07 06:33:39.754000000

Patch Set 8:

(1 comment)

Line:135, pytests/basetestcase.py -> I meant to say, self.servers[0] is not a list.

-------------------------------------
author: Titus Ho
date: 2015-01-07 16:48:34.944000000

Patch Set 8: Code-Review-1

(2 comments)

Getting 404 calling setupServices api.( see comment )

Line:738, lib/membase/api/rest_client.py -> this api responds with a 404 (not found)

the ns_server documents suggest that services are a feature of serviceGroups added when a node is placed into a group.  the call here is attaching service to node itself.  

let me know if api has changed or what real api path is

Line:111, lib/tasks/task.py -> needs checking that response status == True

-------------------------------------
author: Quentin Ali
date: 2015-01-07 16:52:41.174000000

Patch Set 8:

(1 comment)

Line:738, lib/membase/api/rest_client.py -> /node/controller/setupServices is NOT  documented so far. Something Alk informed me about. I have tested it and it works. The only time this would fail is when service is already provisioned. Such cases will occur since we cannot remove a service (not supported in sherlock).

-------------------------------------
author: Quentin Ali
date: 2015-01-07 16:54:37.567000000

Patch Set 8:

(1 comment)

Line:111, lib/tasks/task.py -> will add this part

-------------------------------------
