Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-08 Thread Megh Bhatt
Hi Alberto,
Please see inline ….

On Apr 8, 2015, at 1:54 AM, aguti...@ac.upc.edu 
wrote:

Dear all,

I'm trying to create a new message to send with Sandesh protocol, however I 
don't know how to compile the generated code.

Just a high level overview which you might already know. The sandesh 
compiler/code generator will be present in build/bin/sandesh after you execute 
scons at the top level. The source code for same is at This is used to generate 
the python/C++ code based on the .sandesh file. The generated code - .py files 
for python and .cpp files for C++ need to be used with the pysandesh package 
for python and libsandesh for C++ in client applications to send Sandesh 
messages to the contrail collector.

Are you using C++ or python?

We intend to use this messaging for testing purposes (at the moment) by means 
of an extra application which will send Sandesh messages each second.


I have found the following explaination for the compilation with Scons:

 To use Sandesh, the following needs to be added to the module SConscript:
/
 # Generate the source files
 SandeshGenFiles  = env.SandeshGenCpp('VNS.sandesh')
 SandeshGenFiles += env.SandeshGenCpp('VNSwitch.sandesh')

 # The above returns VNS_types.h, VNS_types.cpp, VNS_constants.h
 # VNS_constants.cpp, VNSwitch_types.h, VNSwitch_types.cpp,
 # VNSwitch_constants.h, VNSwitch_constants.cpp

 # To include the header files above from your module's sources
 env.Append(CPPPATH = env['TOP'])

 # Extract the .cpp files to be used as sources
 SandeshGenSrcs = env.ExtractCpp(SandeshGenFiles)

 Add SandeshGenSrcs to the module source files

 Add libsandesh, and libbase to the module libraries.


However I don't really get what's going on (I'm new to Scons).

The SandeshGenCpp function/ scons builder is defined in tools/build/rules.py - 
https://github.com/Juniper/contrail-build

Below is a relevant snippet …


# SandeshGenCpp Methods
def SandeshCppBuilder(target, source, env):
opath = target[0].dir.path
sname = os.path.join(opath, os.path.splitext(source[0].name)[0])

code = subprocess.call(env['SANDESH'] + ' --gen cpp --gen html -I 
controller/src/ -I tools -out '
+ opath + " " + source[0].path, shell=True)
if code != 0:
raise SCons.Errors.StopError(SandeshCodeGeneratorError,
'SandeshCpp code generation failed')
tname = sname + "_html_template.cpp"
hname = os.path.basename(sname + ".xml")
cname = sname + "_html.cpp"
if not env.Detect('xxd'):
raise SCons.Errors.StopError(SandeshCodeGeneratorError,
'xxd not detected on system')
os.system("echo \"namespace {\"" + " >> " + cname)
os.system("(cd " + opath + " ; xxd -i " + hname + " >> " + 
os.path.basename(cname) + " )")
os.system("echo \"}\"" + " >> " + cname)
os.system("cat " + tname + " >> " + cname)



As you can see, it runs build/bin/sandesh —gen cpp —gen html   
<.sandesh file> to produce the .cpp, .h files which then need to be compiled in 
the client application.


I tried to copy the SConscript of the control module and adapt it but without 
results.

Can anyone help me?

Hope the above helps and please let me know if any more information is needed.

Thanks

Megh


Best Regards,
Alberto.



___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org

___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-13 Thread Megh Bhatt
bjectVNTable")
>>2: optional i32 cpu
>> }
>> 
>> uve sandesh UveVirtualNetworkAgentTrace {
>> 1: UveVirtualNetworkAgent data;
>> }
>> 
>> Then I did the following code:
>> int main() {
>>Sandesh::InitGenerator()
>> 
>>UveVirtualNetworkAgent a;
>>a.set_name("TestUnit");
>>a.set_cpu(100);
>>UveVirtualNetworkAgentTrace::Send(a);
>> }
>> 
>> However I don't know which of the 2 InitGenerator functions from the Sandesh 
>> module should I use and what is the meaning of each parameter.
>> 
>>static bool InitGenerator(const std::string &module,
>>const std::string &source,
>>const std::string &node_type,
>>const std::string &instance_id,
>>EventManager *evm,
>>unsigned short http_port,
>>CollectorSubFn csf,
>>const std::vector &collectors,
>>SandeshContext *client_context = NULL);
>> 
>>static void InitGenerator(const std::string &module,
>>const std::string &source,
>>const std::string &node_type,
>>const std::string &instance_id,
>>EventManager *evm,
>>unsigned short http_port,
>>SandeshContext *client_context = NULL);
>> 
>> Is there any source where it explains this part? I haven't found it yet.
>> 
>> And one more question: Does setting name(key="ObjectVNTable") to "TestUnit" 
>> create a new table in the database that I could query using de API of the 
>> analytics module?
>> 
>> Thank you for the support.
>> 
>> Best regards,
>> Alberto.
>> 
>> Quoting Megh Bhatt :
>> 
>>> Hi Alberto,
>>> Please see inline 
>>> 
>>> On Apr 8, 2015, at 1:54 AM, aguti...@ac.upc.edu<mailto:aguti...@ac.upc.edu> 
>>> wrote:
>>> 
>>> Dear all,
>>> 
>>> I'm trying to create a new message to send with Sandesh protocol, however I 
>>> don't know how to compile the generated code.
>>> 
>>> Just a high level overview which you might already know. The sandesh 
>>> compiler/code generator will be present in build/bin/sandesh after you 
>>> execute scons at the top level. The source code for same is at This is used 
>>> to generate the python/C++ code based on the .sandesh file. The generated 
>>> code - .py files for python and .cpp files for C++ need to be used with the 
>>> pysandesh package for python and libsandesh for C++ in client applications 
>>> to send Sandesh messages to the contrail collector.
>>> 
>>> Are you using C++ or python?
>>> 
>>> We intend to use this messaging for testing purposes (at the moment) by 
>>> means of an extra application which will send Sandesh messages each second.
>>> 
>>> 
>>> I have found the following explaination for the compilation with Scons:
>>> 
>>> To use Sandesh, the following needs to be added to the module SConscript:
>>> /
>>> # Generate the source files
>>> SandeshGenFiles  = env.SandeshGenCpp('VNS.sandesh')
>>> SandeshGenFiles += env.SandeshGenCpp('VNSwitch.sandesh')
>>> 
>>> # The above returns VNS_types.h, VNS_types.cpp, VNS_constants.h
>>> # VNS_constants.cpp, VNSwitch_types.h, VNSwitch_types.cpp,
>>> # VNSwitch_constants.h, VNSwitch_constants.cpp
>>> 
>>> # To include the header files above from your module's sources
>>> env.Append(CPPPATH = env['TOP'])
>>> 
>>> # Extract the .cpp files to be used as sources
>>> SandeshGenSrcs = env.ExtractCpp(SandeshGenFiles)
>>> 
>>> Add SandeshGenSrcs to the module source files
>>> 
>>> Add libsandesh, and libbase to the module libraries.
>>> 
>>> 
>>> However I don't really get what's going on (I'm new to Scons).
>>> 
>>> The SandeshGenCpp function/ scons builder is defined in 
>>> tools/build/rules.py - https://github.com/Juniper/contrail-build
>>> 
>>> Below is a relevant snippet ...
>>> 
>>> 
>>> # SandeshGenCpp Methods
>>>   def SandeshCppBuilder(target, source, env):
>>>   opath = target[0].dir.path
>>>   sname = os.path.join(opath, os.path.splitext(source[0].name)[0])
>>> 
>>>   code = subprocess.call(env[&#

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-13 Thread Megh Bhatt
Hi Alberto,
Please see inline …

On Apr 13, 2015, at 2:03 PM,   wrote:

> Hi Megh,
> 
> Thank you for the reply. I already went thru client_sm module but didn't get 
> any clue about when does the state change, thanks.
> 
> You are correct, TASK_UTIL_EXPECT_TRUE is just a conditional print. I tried 
> to make a loop with that condition (negated) but it seems to stay forever 
> there, so there must be something failing.
[Megh]: Are you saying even having loop with usleep() the condition is not met? 
> 
> I explored the traffic using tshark and I found that there was a handshake on 
> the ConnectToCollector, but at SandeshUVETest::Send(uve_data1) there is no 
> message because client state machine is not in the correct state.
> 
> Any clue about this?
[Megh]: The data will be dropped till the state moves to ESTABLISHED.

Thanks

Megh

> 
> Thank you once more for your support,
> Alberto.
> 
> Quoting Megh Bhatt :
> 
>> Hi Alberto,
>> Sorry for the delay. Please see inline ...
>> 
>> On Apr 13, 2015, at 3:14 AM,   
>> wrote:
>> 
>>> Hi,
>>> 
>>> I got the following code modifying the test suite available in the Sandesh 
>>> C++ library folder:
>>> 
>>>   int port = 8086;
>>>   ASSERT_LT(0, port);
>>>   std::cout << "Initializing Generator" << std::endl;
>>>   Sandesh::InitGenerator("SandeshUVEAlarmTest-Client", "192.168.100.1", 
>>> "Test", "0", evm_.get(), 0, NULL);
>>>   std::cout << "Connecting to collector" << std::endl;
>>>   Sandesh::ConnectToCollector("192.168.100.10", port);
>>>   std::cout << "Handshake done" << std::endl;
>>>   TASK_UTIL_EXPECT_TRUE(Sandesh::client()->state() == 
>>> SandeshClientSM::ESTABLISHED);
>> [Megh]: This should make sure that the client status is ESTABLISHED before 
>> sending the message below.
>>>   std::cout << "Connection to collector should be established" << std::endl;
>>>   // add uve
>>>   // case 0
>>>   SandeshUVEData uve_data1;
>>>   uve_data1.set_name("uve1");
>>>   SandeshUVETest::Send(uve_data1);
>>> 
>>> Here I disabled the sever initialization step as I want to use a real 
>>> collector node (192.168.100.10). The execution is sent from IP 
>>> 192.168.100.1.
>>> 
>>> However, when evaluating the client status it's not 
>>> SandeshClientSM::ESTABLISHED, it's in fact status 2, which is CONNECT. So 
>>> it seems to be a step missing.
>>> 
>>> On the connector log I get the following output for the execution:
>>> 2015-04-13 Mon 10:05:02:264.921 UTC  contrail [Thread 140679780972416, Pid 
>>> 1975]: Session 192.168.100.10:8086::192.168.100.1:54945(15)< Accepted 
>>> session from 192.168.100.1:54945
>>> 
>>> 2015-04-13 Mon 10:05:21:736.472 UTC  contrail [Thread 140679780972416, Pid 
>>> 1975]: Session 192.168.100.10:8086::192.168.100.1:54945(15)< Read failed 
>>> due to error 2 : End of file
>>> 
>>> On the application I get the following:
>>> 2015-04-13 Mon 12:11:17:354.925 CEST  Mahalanobis [Thread 140662758741952, 
>>> Pid 5233]: primary  192.168.100.10:8086
>>> 2015-04-13 Mon 12:11:17:354.945 CEST  Mahalanobis [Thread 140662758741952, 
>>> Pid 5233]: secondary  0.0.0.0:0
>>> Handshake done
>>> 2015-04-13 Mon 12:11:17:355.309 CEST  Mahalanobis [Thread 140662631671552, 
>>> Pid 5233]: Processing scm::EvStart in state Idle
>>> 2015-04-13 Mon 12:11:17:355.415 CEST  Mahalanobis [Thread 140662631671552, 
>>> Pid 5233]: Disconnect
>>> 2015-04-13 Mon 12:11:17:355.566 CEST  Mahalanobis [Thread 140662631671552, 
>>> Pid 5233]: Processing scm::EvDiscUpdate in state Disconnect
>>> 2015-04-13 Mon 12:11:17:355.850 CEST  Mahalanobis [Thread 140662631671552, 
>>> Pid 5233]: Connect : Start Connect timer 192.168.100.10:8086
>> [Megh]: From the logs it does not seem that the state machine has moved to 
>> ESTABLISHED. Your code should have failed when checking for the state above.
>>> 2015-04-13 Mon 12:11:17:355.984 CEST  Mahalanobis [Thread 140662631671552, 
>>> Pid 5233]: Processing scm::EvSandeshSend in state Connect
>>> 2015-04-13 Mon 12:11:17:356.012 CEST  Mahalanobis [Thread 140662631671552, 
>>> Pid 5233]: Wrong state: Connect for event: EvSandeshSend
>>> 2015-04-13 Mon 12:11:17:356.043 CEST  Mahalanobis [Thread 140662631671552, 
>>> Pid 5233]: Processing 

Re: [opencontrail-dev] Contrail-Controller: Opserver

2015-04-14 Thread Megh Bhatt
Hi Alicja,
Please see inline ...

On Apr 3, 2015, at 3:10 AM, Alicja Celigowska 
mailto:alicja.celigow...@codilime.com>> wrote:

Hi

I have a question about Opserver module in contrail-controller. There is a 
little problem when I want to gather information about network traffic 
(in_bytes, out_bytes per virtual machine): Returned values informs about 
traffic in last hour. It would be good to be able to customize this time. I 
looked at source code, to find out what can I do with this and then I saw this:

q["query"]["start_time"] = qdict["end_time"] - (3600 * 100)

Could we change this to:

q["query"]["start_time"] = qdict["end_time"] - (period * 100)

?

Additional parameter could be passed with GET request. By default it could be 
3600 as before.
[Megh]: The GET is just used to reflect the operational state of the virtual 
machine/virtual network and the stats shown over there do not support a whole 
lot of query parameters as pointed out by you. We have a POST API to do the 
query and in there the start and end time are given by the user.  The URL is 
http://:8081/analytics/query. In fact, we support 
aggregations like SUM, COUNT, MIN, MAX over there.

There is a python script  (contrail-stats) that does the POST and queries the 
Opserver. You can also use the browser with REST client/ POSTMAN or the UI to 
do the same query.

For example, for the example above, you can run the following:

contrail-stats --table UveVirtualNetworkAgent.vn_stats --select 
"SUM(vn_stats.in_tpkts)" vn_stats.other_vn --where 
name="default-domain:default-project:default-virtual-network" --start-time 
now-1m --end-time now

Please check contrail-stats —help to see list of statistics and query options 
supported.

Also, there is one more problem with tests in opserver. If I run:

"scons controller/src/opserver:test"

it fails with:

PyTestSuiteCov(["build/debug/opserver/test/opserver-test"], 
["build/debug/opserver/test/uveserver_test.py", 
"build/debug/opserver/test/analytics_uvetest.py", 
"build/debug/opserver/test/analytics_systest.py", 
"build/debug/opserver/test/analytics_statstest.py", 
"build/debug/opserver/test/analytics_db_test.py", 
"build/debug/opserver/test/overlay_to_underlay_mapper_test.py"])
/home/ubuntu/contrail_source/build/debug/opserver/test/uveserver_test.py PASS
/home/ubuntu/contrail_source/build/debug/opserver/test/analytics_uvetest.py FAIL

If I run this test manually (activating analytics_test env before) I see a lot 
of "Connection refused" error messages. It seems like I need to run it in 
complete environment (with working controller). At least it should be excluded 
from tests suite?
[Megh]: Can you please check the 
build/debug/opserver/test/analytics_uvetest.py.log for the errors. The test 
does require cassandra, redis and so might fail if those are not installed.

Thanks

Megh


Have a nice day

--
Alicja Celigowska
Software Engineer

[http://i.imgur.com/dxdOkEX.jpg]
-
M: +48 531 033 070
E: alicja.celigow...@codilime.com
-
CodiLime Sp. z o.o. - Ltd. company with its registered office in Poland, 01-167 
Warsaw, ul. Zawiszy 14/97. Registered by The District Court for the Capital 
City of Warsaw, XII Commercial Department of the National Court Register. 
Entered into National Court Register under No. KRS 388871. Tax 
identification number (NIP) 5272657478. Statistical number (REGON) 142974628.
-
The information in this email is confidential and may be legally privileged, it 
may contain information that is confidential in CodiLime Sp. z o.o. It is 
intended solely for the addressee. Any access to this email by third parties is 
unauthorized. If you are not the intended recipient of this message, any 
disclosure, copying, distribution or any action undertaken or neglected in 
reliance thereon is prohibited and may result in your liability for damages.
___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org

___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-14 Thread Megh Bhatt
ame = alarm2 seq 5
2015-04-14 Tue 17:26:49:485.302 PDT  ubuntu-build04 [Thread 140071693285312, 
Pid 5403]: SyncAllMaps for SandeshAlarmData without seqno , total = 2
2015-04-14 Tue 17:26:49:485.368 PDT  ubuntu-build04 [Thread 140071693285312, 
Pid 5403]: SyncUVE Syncing  val name = uve1 x = 55 seq 2
2015-04-14 Tue 17:26:49:485.433 PDT  ubuntu-build04 [Thread 140071693285312, 
Pid 5403]: SyncUVE Syncing  val name = uve2 seq 5
2015-04-14 Tue 17:26:49:485.496 PDT  ubuntu-build04 [Thread 140071693285312, 
Pid 5403]: SyncAllMaps for SandeshUVEData without seqno , total = 2

As you can see the state did become Established.

Thanks

Megh


On Apr 14, 2015, at 8:50 AM,   wrote:

> Hi,
> 
> I have established 2 loops after connectToCollector. One that waits the sm to 
> change to state 2 (Connected) and one that waits for state 4 (Established). 
> Just after connectToCollector the status is 0. Then, eventually, it changes 
> to 1 (Disconnected). Then to 2 and stays there.
> 
> An extract of log:
> ...
> ]: Processing scm::EvStart in state Idle
> 2015-04-14 Tue 17:42:50:824.700 CEST  Mahalanobis [Thread 140712661264128, 
> Pid 29117]: Disconnect
> Current STATUS: 0
> Current STATUS: 1
> ...
> Current STATUS: 1
> Handshake done (State 2)
> 2015-04-14 Tue 17:42:50:825.216 CEST  Mahalanobis [Thread 140712661264128, 
> Pid 29117]: Connect : Start Connect timer 192.168.100.10:8086
> 2015-04-14 Tue 17:42:50:825.346 CEST  Mahalanobis [Thread 140712661264128, 
> Pid 29117]: Processing scm::EvSandeshSend in state Connect
> 2015-04-14 Tue 17:42:50:825.367 CEST  Mahalanobis [Thread 140712661264128, 
> Pid 29117]: Wrong state: Connect for event: EvSandeshSend
> 2015-04-14 Tue 17:42:50:825.391 CEST  Mahalanobis [Thread 140712661264128, 
> Pid 29117]: Processing scm::EvSandeshSend in state Connect
> 2015-04-14 Tue 17:42:50:825.408 CEST  Mahalanobis [Thread 140712661264128, 
> Pid 29117]: Wrong state: Connect for event: EvSandeshSend
> 2015-04-14 Tue 17:42:50:825.430 CEST  Mahalanobis [Thread 140712661264128, 
> Pid 29117]: Processing scm::EvSandeshSend in state Connect
> 2015-04-14 Tue 17:42:50:825.448 CEST  Mahalanobis [Thread 140712661264128, 
> Pid 29117]: Wrong state: Connect for event: EvSandeshSend
> ...
> Waiting to the connection to be ESTABLISHED. Current status: 2
> Waiting to the connection to be ESTABLISHED. Current status: 2
> ... (and keeps looping)
> 
> It seems to be sending message in the connect to collector part. It doesn't 
> reach the sendUVE because I set a loop that waits for state to be ESTABLISHED.
> 
> Any guess? There may be something that I'm not doing good. "Wrong state: 
> Connect for event: EvSandeshSend" is quite suspicious.
> 
> Best regards,
> Alberto.
> 
> Quoting Megh Bhatt :
> 
>> Hi Alberto,
>> Please see inline ...
>> 
>> On Apr 13, 2015, at 2:03 PM,   
>> wrote:
>> 
>>> Hi Megh,
>>> 
>>> Thank you for the reply. I already went thru client_sm module but didn't 
>>> get any clue about when does the state change, thanks.
>>> 
>>> You are correct, TASK_UTIL_EXPECT_TRUE is just a conditional print. I tried 
>>> to make a loop with that condition (negated) but it seems to stay forever 
>>> there, so there must be something failing.
>> [Megh]: Are you saying even having loop with usleep() the condition is not 
>> met?
>>> 
>>> I explored the traffic using tshark and I found that there was a handshake 
>>> on the ConnectToCollector, but at SandeshUVETest::Send(uve_data1) there is 
>>> no message because client state machine is not in the correct state.
>>> 
>>> Any clue about this?
>> [Megh]: The data will be dropped till the state moves to ESTABLISHED.
>> 
>> Thanks
>> 
>> Megh
>> 
>>> 
>>> Thank you once more for your support,
>>> Alberto.
>>> 
>>> Quoting Megh Bhatt :
>>> 
>>>> Hi Alberto,
>>>> Sorry for the delay. Please see inline ...
>>>> 
>>>> On Apr 13, 2015, at 3:14 AM,   
>>>> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> I got the following code modifying the test suite available in the 
>>>>> Sandesh C++ library folder:
>>>>> 
>>>>>  int port = 8086;
>>>>>  ASSERT_LT(0, port);
>>>>>  std::cout << "Initializing Generator" << std::endl;
>>>>>  Sandesh::InitGenerator("SandeshUVEAlarmTest-Client", "192.168.100.1", 
>>>>> "Test", "0", evm_.get(), 0, NULL);
>>>>>  std::cout << "Conn

Re: [opencontrail-dev] Problem creating a new data structure with Sandesh

2015-04-14 Thread Megh Bhatt
Hi Alberto,

You can take a look at 
https://github.com/Juniper/contrail-controller/blob/master/src/vnsw/agent/uve/mock_generator.cc

which is an example generator that sends some UVEs and flow messages. It has 
bunch of command line options.

It can be compiled by running scons vrouter:mock_gen at the top.

Thanks

Megh



On Apr 14, 2015, at 5:30 PM, Megh Bhatt  wrote:

> Hi Alberto,
> Can you please share the diffs you made to the test? That will help.
> 
> I tried with the following changes and it worked fine
> 
> diff --git a/library/cpp/test/sandesh_message_test.cc 
> b/library/cpp/test/sandesh_message_test.cc
> index f27a0c1..4aab1b6 100644
> --- a/library/cpp/test/sandesh_message_test.cc
> +++ b/library/cpp/test/sandesh_message_test.cc
> @@ -475,12 +475,13 @@ protected:
> TEST_F(SandeshUVEAlarmTest, UVEAlarm) {
> server_->Initialize(0);
> thread_->Start();
> -int port = server_->GetPort();
> +//int port = server_->GetPort();
> +int port = 8086;
> ASSERT_LT(0, port);
> 
> Sandesh::InitGenerator("SandeshUVEAlarmTest-Client", "localhost", "Test",
>"0", evm_.get(), 0, NULL);
> -Sandesh::ConnectToCollector("127.0.0.1", port);
> +Sandesh::ConnectToCollector("10.84.13.23", port);
> TASK_UTIL_EXPECT_TRUE(Sandesh::client()->state() == 
> SandeshClientSM::ESTABLISHED);
> 
> // add uve
> ubuntu-build04@test$
> 
> Logs from the test below:
> 
> ubuntu-build04@github-icehouse$ 
> ./build/debug/tools/sandesh/library/cpp/test/sandesh_message_test 
> --gtest_filter=*Alarm*
> Note: Google Test filter = *Alarm*
> [==] Running 1 test from 1 test case.
> [--] Global test environment set-up.
> [--] 1 test from SandeshUVEAlarmTest
> [ RUN  ] SandeshUVEAlarmTest.UVEAlarm
> 2015-04-14 Tue 17:26:49:453.703 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: Server 0.0.0.0:50474 Initialization complete
> 2015-04-14 Tue 17:26:49:453.920 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: ROLE : Generator
> 2015-04-14 Tue 17:26:49:453.951 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: MODULE   : SandeshUVEAlarmTest-Client
> 2015-04-14 Tue 17:26:49:453.972 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: SOURCE   : localhost
> 2015-04-14 Tue 17:26:49:453.991 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: NODE TYPE: Test
> 2015-04-14 Tue 17:26:49:454.010 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: INSTANCE ID  : 0
> 2015-04-14 Tue 17:26:49:454.029 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: HTTP SERVER PORT : 0
> 2015-04-14 Tue 17:26:49:454.185 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: HTTP Introspect Init
> 2015-04-14 Tue 17:26:49:454.327 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: TCP [SYS_DEBUG]: TcpServerMessageLog: Server 0.0.0.0:60366  
> Initialization complete controller/src/io/tcp_server.cc 102
> 2015-04-14 Tue 17:26:49:454.388 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: Sandesh Http Server Port 60366
> 2015-04-14 Tue 17:26:49:454.449 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: NOT Writing http_port 60366TO : 
> /tmp/SandeshUVEAlarmTest-Client.3152.http_port
> 2015-04-14 Tue 17:26:49:454.482 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: COLLECTOR : 10.84.13.23
> 2015-04-14 Tue 17:26:49:454.502 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: COLLECTOR PORT : 8086
> 2015-04-14 Tue 17:26:49:454.531 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: CONNECT TO COLLECTOR: 1
> 2015-04-14 Tue 17:26:49:454.665 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: Idle
> 2015-04-14 Tue 17:26:49:454.940 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: SANDESH: No Client: 1429057609454838 SandeshModuleClientTrace: 
> data= [ name = localhost:Test:SandeshUVEAlarmTest-Client:0 client_info= [  
> status = Idle successful_connections = 0 pid = 5403 http_port = 60366 
> start_time = 1429057609454700 collector_name =  primary = 0.0.0.0:0 secondary 
> = 0.0.0.0:0 rx_socket_stats= [  bytes = 0 calls = 0 average_bytes = 0 
> blocked_duration =  blocked_count = 0 average_blocked_duration =  errors = 0 
> ] tx_socket_stats= [  bytes = 0 calls = 0 average_bytes = 0 blocked_duration 
> = 00:00:00 blocked_count = 0 average_blocked_duration =  errors = 0 ] ] ]
> 2015-04-14 Tue 17:26:49:455.030 PDT  ubuntu-build04 [Thread 140071693285312, 
> Pid 5403]: primary  10.84.13.23:8086
> 2015-04-14 Tue 17:26:49:455.063 PDT

Re: [opencontrail-dev] Doubt about custom tables (Sandesh Messages) for collector

2015-05-06 Thread Megh Bhatt
Hi Albero,
trace is a keyword, please change name to data_trace. Also please have optional 
bool deleted as element number 2 and then you should be good to go 

Thanks 

Megh 



> On May 6, 2015, at 6:57 AM, "aguti...@ac.upc.edu"  wrote:
> 
> Hi anish,
> 
> Thanks for your reply.
> 
> In that example, aggregation type "union" is applied over all the elements of 
> type ProcessCpuInfo?
> 
> I have adapted my structure following your example:
> struct DataTrace {
>1: u64 val1
>2: u64 val2
> }
> 
> struct AlbertoAgent {
>1: string name
>(key="ObjectAlberto")
>2: optional u64 cpu
>3: optional bool deleted
>4: optional list trace
>(tags=".val1,.val2")
> }
> 
> uve sandesh AlbertoTrace {
>1: AlbertoAgent data
> }
> 
> However there is a syntax error that I'm not able to detect (Error 
> message:(last token was 'trace')syntax error).
> 
> Am I in the correct way? Where is the error?
> 
> Thanks for your support,
> Alberto.
> 
> 
> Quoting Anish Mehta :
> 
>> Hi Alberto,
>> 
>> I assume you are talking about the stats functionality, which is turned on
>> using the "tags" annotation.
>> I can help more if you send the sandesh file
>> 
>> Meanwhile, I will demonstrate this feature using Analytics CPU Info.
>> 
>> This is the sandesh file:
>> 
>> struct  AnalyticsCpuState {
>>   1: string name
>> (key="ObjectCollectorInfo")
>>   2: optional bool  deleted
>>   3: optional list  cpu_info
>> (tags=".module_id,.mem_virt,.cpu_share,.mem_res", aggtype="union")
>> }
>> 
>> uve sandesh AnalyticsCpuStateTrace {
>>   1: AnalyticsCpuState data
>> }
>> 
>> 
>> The tags annotation will cause the "cpu_info" attribute to be recorded as
>> a Stat Sample.
>> This sample can then be queried via the Analytics Query API (the same API
>> used for the object-log)
>> The attributes listed in the tags annotation will be used for indexing.
>> (the "where" part of the query)
>> 
>> 
>> We implicitly index by the Source of message (Source of the Sandesh
>> Generator) and the UVE Key.
>> These fields are recorded as "name" and "Source".
>> The other index fields (as per the tags annotation) in this case are
>> cpu_info.module_id, cpu_info.mem_virt, cpu_info.cpu_share and
>> cpu_info.mem_res.
>> There are two other fields that will be present the sample -
>> cpu_info.inst_id and cpu_info.module_id.
>> These are not in the tags annotation, so we will not index by them.
>> 
>> From the command line, you can use the "contrail-stats" command to
>> exercise the Analytics Query API for stats.
>> Here's an example of usage:
>> 
>> contrail-stats --dtable AnalyticsCpuState.cpu_info --where "Source=*"
>> --select "T=300" "COUNT(cpu_info)" "name" "cpu_info.module_id"
>> "SUM(cpu_info.cpu_share)" --last 30m
>> 
>> This results in the following Analytics API POST request:
>> {"start_time": "now-30m", "sort_fields": [], "end_time": "now",
>> "select_fields": ["T=300", "COUNT(cpu_info)", "name",
>> "cpu_info.module_id", "SUM(cpu_info.cpu_share)"], "table":
>> "StatTable.AnalyticsCpuState.cpu_info", "where": [[{"suffix": null,
>> "value2": null, "name": "Source", "value": "", "op": 7}]]}
>> 
>> You can get more information here:
>> http://www.opencontrail.org/statistics-in-opencontrail-analytics/
>> This blog entry will also explain what "T" and "T=" mean.
>> 
>> If you share your sandesh file, I can give you more specific pointers.
>> Please reach out if you have other questions about this.
>> 
>> Regards,
>> 
>> Anish
>> 
>> 
>>> On 5/4/15, 3:39 AM, "aguti...@ac.upc.edu"  wrote:
>>> 
>>> Hi,
>>> 
>>> Any clues about how can I make a flow like the ones from Analytics
>>> node CPU info? I cannot figure how to do it with sandesh. Is it done
>>> using list type?
>>> 
>>> Best Regards,
>>> Alberto.
>>> 
>>> 
>>> 
>>> Quoting aguti...@ac.upc.edu:
>>> 
 Hi Anish,
 
 There was a mistake in the changes I did. Now it's correct and I get
 this:
 
 agutierrez@Mahalanobis:~/Documents/thesis/OpenContrail/query$
 ./getQuery.sh /uves/alberto/lvelasco?flat
 % Total% Received % Xferd  Average Speed   TimeTime
 Time  Current
Dload  Upload   Total   SpentLeft
 Speed
 100   1860   1860 0147  0 --:--:--  0:00:01
 --:--:--   147
 {
   "UveVirtualNetworkAgent": {
   "cpu": 31337,
   "cpu_info": [
   {
   "StatTable.UveVirtualNetworkAgent.cpu_info": [
   {
   "COUNT(cpu_info)": 1,
   "SUM(cpu_info.att1)": 2090,
   "SUM(cpu_info.att2)": 209
   }
   ]
   }
   ]
   }
 }
 
 I modified slightly the structure to have a list inside. Now my
 question is the following: How can I make a flow like the ones from
 Analytics node CPU info? I have taken a look to s

Re: [opencontrail-dev] contrail 3.0 kafka issue

2016-08-12 Thread Megh Bhatt
Please see inline …

On Aug 11, 2016, at 7:30 PM, Andy Wang 
mailto:wjw7...@126.com>> wrote:

Hi All,
I met one strange issue that when I use fuel to deploy contrail 3.0 with single 
controller node. Component Contrail Analytics could not work right.
when I got the following the error information uing the contrail-status in the 
controller.
[root@node-4 ~]# contrail-status
== Contrail Control ==
supervisor-control:   active
contrail-control  active
contrail-control-nodemgr  active
contrail-dns  active
contrail-namedactive

== Contrail Analytics ==
supervisor-analytics: active
contrail-alarm-gentimeout
contrail-analytics-apiinitializing 
(UvePartitions:UVE-Aggregation[Partitions:0] connection down)
contrail-analytics-nodemgractive
contrail-collectorinitializing (KafkaPub:192.168.0.1:9092 
connection down)
contrail-query-engine active
contrail-snmp-collector   active
contrail-topology active

== Contrail Config ==
supervisor-config:active
contrail-api:0active
contrail-config-nodemgr   active
contrail-device-manager   active
contrail-discovery:0  active
contrail-schema   active
contrail-svc-monitor  active
ifmap active

== Contrail Web UI ==
supervisor-webui:   active
contrail-webuiactive
contrail-webui-middleware active

== Contrail Database ==
contrail-database:active

== Contrail Supervisor Database ==
supervisor-database:  active
contrail-database-nodemgr active
kafka active


Process contrail-analytics-api  and contrail-collector  could not work and 
could not use 8143 port to debug contrail system.
I doubt this is related to kafka . I also find that connection number beteen 
kafka and contrail-alarm-gen  will reach a large number (4k+).

You mean the number of connections between kafka and contrail-alarm-gen is 4k?


Can you please provide the output of following commands:

ps aux | grep contrail-coll
ps aux | grep contrail-alarm
ps aux | grep contrail-analytics-api
ps aux | grep kafka
netstat -anp | grep 9092
cat /etc/contrail/contrail-collector.conf
cat /etc/contrail/contrail-alarm-gen.conf
cat /etc/contrail/contrail-analytics-api.conf


if it works for one or two hours , it may cause rabbitmq crashed.

Where are you seeing rabbitmq crashes? It seems unrelated to the kafka issue 
above.

Thanks

Megh

It has  puzzled me for several days, Any help is very appreciated.

Andy Wang





___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org

___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] analytics node is not able to up and running.

2016-09-27 Thread Megh Bhatt
Please change section DEFAULT cassandra_server_list in 
/etc/contrail/contrail-query-engine.conf to have port 9042 instead of 9160 and 
then it should work fine. Please also do the same in 
/etc/contrail/contrai-collector.conf and 
/etc/contrail/contrail-analytics-api.conf.

Thanks

Megh

On Sep 26, 2016, at 11:00 PM, anything possible 
mailto:poi6...@gmail.com>> wrote:

Hi, All
I build the code from github branch R3.1, and set up a single all-in-one node.
But somehow analytics node is not able to up and running, in particular 
contrail-collect, contrail-query-engine process.
Here is some log from contrail-collect:
2016-09-26 Mon 22:55:16:581.841 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR LISTEN PORT: 8086
2016-09-26 Mon 22:55:16:581.964 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR REDIS UVE PORT: 6379
2016-09-26 Mon 22:55:16:581.987 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR CASSANDRA SERVERS: 127.0.0.1:9160
2016-09-26 Mon 22:55:16:582.003 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR ZOOKEEPER SERVERS:
2016-09-26 Mon 22:55:16:582.020 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR SYSLOG LISTEN PORT: -1
2016-09-26 Mon 22:55:16:582.035 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR SFLOW LISTEN PORT: 6343
2016-09-26 Mon 22:55:16:582.048 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR IPFIX LISTEN PORT: 4739
2016-09-26 Mon 22:55:16:582.061 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: KAFKA BROKERS:
2016-09-26 Mon 22:55:16:582.106 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR analytics_data_ttl: 48
2016-09-26 Mon 22:55:16:582.122 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR analytics_flow_ttl: 2
2016-09-26 Mon 22:55:16:582.136 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR analytics_statistics_ttl: 168
2016-09-26 Mon 22:55:16:582.148 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: COLLECTOR analytics_config_audit_ttl: 2160
2016-09-26 Mon 22:55:16:585.316 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: Server 0.0.0.0:8086 Initialization complete
2016-09-26 Mon 22:55:16:585.388 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: SANDESH: NOT Writing collector_port 8086TO : 
/tmp/contrail-collector.114560.collector_port
2016-09-26 Mon 22:55:16:586.241 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: opencontrail-dev:Global: InitializeInternal: Initializing..
2016-09-26 Mon 22:55:16:590.587 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: CassLibrary: src/session.cpp:302 void 
cass::Session::connect_async(const cass::Config&, const string&, 
cass::Future*)] Issued connect event
2016-09-26 Mon 22:55:16:591.087 PDT  opencontrail-dev [Thread 140079071168256, 
Pid 114561]: CassLibrary: src/session.cpp:390 virtual void 
cass::Session::on_run()] Creating 2 IO worker threads
2016-09-26 Mon 22:55:16:591.328 PDT  opencontrail-dev [Thread 140079071168256, 
Pid 114561]: CassLibrary: src/session.cpp:216 cass::SharedRefPtr 
cass::Session::add_host(const cass::Address&)] Adding new host: 127.0.0.1
2016-09-26 Mon 22:55:16:591.857 PDT  opencontrail-dev [Thread 140079071168256, 
Pid 114561]: CassLibrary: src/connection.cpp:513 static void 
cass::Connection::on_connect(cass::Connector*)] Connected to host 127.0.0.1
2016-09-26 Mon 22:55:16:594.684 PDT  opencontrail-dev [Thread 140079071168256, 
Pid 114561]: CassLibrary: src/connection.cpp:549 static void 
cass::Connection::on_close(uv_handle_t*)] Connection to host 127.0.0.1 closed
2016-09-26 Mon 22:55:16:594.721 PDT  opencontrail-dev [Thread 140079071168256, 
Pid 114561]: CassLibrary: src/control_connection.cpp:204 virtual void 
cass::ControlConnection::on_close(cass::Connection*)] Lost control connection 
on host 127.0.0.1
2016-09-26 Mon 22:55:16:594.741 PDT  opencontrail-dev [Thread 140079071168256, 
Pid 114561]: CassLibrary: src/session.cpp:351 void 
cass::Session::internal_close()] Issued close
2016-09-26 Mon 22:55:16:594.934 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: 
SyncFutureWait:controller/src/database/cassandra/cql/cql_if.cc:1102: SyncWait: 
FAILED: No hosts available for the control connection
2016-09-26 Mon 22:55:16:594.973 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: ConnectSync:controller/src/database/cassandra/cql/cql_if.cc:1493: 
ConnectSync FAILED
2016-09-26 Mon 22:55:16:595.000 PDT  opencontrail-dev [Thread 140079255311168, 
Pid 114561]: opencontrail-dev:Global: InitializeInternal: Connection to DB 
FAILED
2016-09-26 Mon 22:55:16:595.038 PDT  opencontrail-dev [Thread 140079062775552, 
Pid 114561]: CassLibrary: src/io_worker.cpp:256 void 
cass::IOWorker::close_handles()] Active handles following close: 0
2016-09-26 Mon 22:55:16:595.039 PDT  opencontrail-dev [Thre

Re: [opencontrail-dev] cassandra server switchover

2016-11-28 Thread Megh Bhatt
Hi Suresh,
cassandra supports active/active or cluster consisting of multiple active nodes 
and hence we can provide list of IP addresses to contrail-collector. 
contrail-collector simultaneously connects to all the cassandra servers and 
will handle cassandra server failures.

Thanks

Megh

On Nov 28, 2016, at 11:43 PM, Suresh Kumar S 
mailto:sureshkuma...@altencalsoftlabs.com>> 
wrote:

Hi,

In the contrail-collector config file, we can specify multiple cassandra 
servers.
What is the purpose of it ?


contrail-collecter.conf snippet

# IP address and port to be used to connect to cassandra.
# Multiple IP:port strings separated by space can be provided
# cassandra_server_list=127.0.0.1:9042

Does contrail support  server switchover, I  mean when the current server is 
not reachable, will it switch to the new server(mentioned in the config) ?

Thanks
suresh
___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org

___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] cassandra server switchover

2016-11-29 Thread Megh Bhatt
In 2.21 the architecture is different, collector will establish one connection 
to one cassandra server per generator. If that fails, it will retry the next 
server. This is evident from the collector logs. It seems that you are getting 
TimedOutException which suggests your single remaining cassandra node might be 
getting overloaded.

If you check using netstat -anp for contrail-collector pid you should be seeing 
connections to the 10.10.10.5 cassandra node.

Thanks

Megh

On Nov 29, 2016, at 12:04 AM, Suresh Kumar S 
mailto:sureshkuma...@altencalsoftlabs.com>> 
wrote:

Hi Megh,

My scenario is very simple,

My setup : Devstack - Mitaka
   Contrail : 2.21.x

I have configured the cassandra cluster with two nodes, and specified those in 
the contrail-collector.conf file

cloud@contrail:/etc/cassandra$ cat /etc/contrail/contrail-collector.conf

[DEFAULT]
log_local = 1
log_level = SYS_DEBUG
cassandra_server_list = 10.10.10.5:9160 10.10.10.4:9160
hostname = contrail
hostip = 10.10.10.6

[DISCOVERY]
port = 5998
server = 10.10.10.6
cloud@contrail:/etc/cassandra$

Collector establishes the communication with 10.10.10.4, and works well.

I purposefully down the 10.10.10.4 cassandra server.  I expect contrail-control 
continue to work with 10.10.10.5 cassandra server.
But contrail-control keeps trying to connect  with 10.10.10.4 and fails to 
connect.


Note:
1. Collector establishes the communication with only one server(10.10.10.4)  
out of two mentioned.


collector logs are attached for debugging.

Thanks
suresh


From: "Megh Bhatt" mailto:me...@juniper.net>>
To: "Suresh Kumar S" 
mailto:sureshkuma...@altencalsoftlabs.com>>
Cc: Dev@lists.opencontrail.org<mailto:Dev@lists.opencontrail.org>
Sent: Tuesday, November 29, 2016 8:48:20 AM
Subject: Re: [opencontrail-dev] cassandra server switchover

Hi Suresh,
cassandra supports active/active or cluster consisting of multiple active nodes 
and hence we can provide list of IP addresses to contrail-collector. 
contrail-collector simultaneously connects to all the cassandra servers and 
will handle cassandra server failures.

Thanks

Megh

On Nov 28, 2016, at 11:43 PM, Suresh Kumar S 
mailto:sureshkuma...@altencalsoftlabs.com>> 
wrote:

Hi,

In the contrail-collector config file, we can specify multiple cassandra 
servers.
What is the purpose of it ?


contrail-collecter.conf snippet

# IP address and port to be used to connect to cassandra.
# Multiple IP:port strings separated by space can be provided
# cassandra_server_list=127.0.0.1:9042

Does contrail support  server switchover, I  mean when the current server is 
not reachable, will it switch to the new server(mentioned in the config) ?

Thanks
suresh
___
Dev mailing list
Dev@lists.opencontrail.org<mailto:Dev@lists.opencontrail.org>
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org




___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] process contrail-collector assertion failed

2016-12-12 Thread Megh Bhatt
Hi Andy,
It does look like the bug mentioned below. Please upgrade to a build that has 
the fix and/or if you are building from source you can update the 
contrail-collector binary.

Thanks

Megh

On Dec 12, 2016, at 3:22 AM, Katarzyna Orlowska 
mailto:korlow...@mirantis.com>> wrote:

Have you seen this bug? https://bugs.launchpad.net/juniperopenstack/+bug/1645885

On Mon, Dec 12, 2016 at 12:11 PM, Andy Wang 
mailto:wjw7...@126.com>> wrote:
Hi All,
I met one contrail-collector assertion failed in R3.0 release version with  
three nodes' cluster.
Someone met this issue ? Any suggestion is grateful
Thanks
Andy Wang

The log  from /var/log/contrail/contrail-collector-stdout.log  is as follows:
contrail-collector: 
/usr/include/boost/spirit/home/support/char_encoding/ascii.hpp:256: static int 
boost::spirit::char_encoding::ascii::isspace(int): Assertion `isascii_(ch)' 
failed.
2016-12-12 17:21:07,479:31152(0x2b4893857e00):ZOO_INFO@log_env@712: Client 
environment:zookeeper.version=zookeeper C client 3.4.6
2016-12-12 17:21:07,479:31152(0x2b4893857e00):ZOO_INFO@log_env@716: Client 
environment:host.name=controller2
2016-12-12 17:21:07,479:31152(0x2b4893857e00):ZOO_INFO@log_env@723: Client 
environment:os.name=Linux
2016-12-12 17:21:07,479:31152(0x2b4893857e00):ZOO_INFO@log_env@724: Client 
environment:os.arch=3.10.0-229.el7.x86_64
2016-12-12 17:21:07,479:31152(0x2b4893857e00):ZOO_INFO@log_env@725: Client 
environment:os.version=#1 SMP Fri Mar 6 11:36:42 UTC 2015
2016-12-12 17:21:07,479:31152(0x2b4893857e00):ZOO_INFO@log_env@733: Client 
environment:user.name=(null)
2016-12-12 17:21:07,479:31152(0x2b4893857e00):ZOO_INFO@log_env@741: Client 
environment:user.home=/var/lib/contrail
2016-12-12 17:21:07,479:31152(0x2b4893857e00):ZOO_INFO@log_env@753: Client 
environment:user.dir=/
2016-12-12 17:21:07,480:31152(0x2b4893857e00):ZOO_INFO@zookeeper_init@786: 
Initiating client connection, 
host=192.168.167.130:2181,192.168.167.129:2181,192.168.167.131:2181
 sessionTimeout=1 watcher=(nil) sessionId=0 sessionPasswd= 
context=(nil) flags=0
2016-12-12 17:21:07,480:31152(0x2b4893857e00):ZOO_DEBUG@start_threads@221: 
starting threads...
2016-12-12 17:21:07,483:31152(0x2b489c63e700):ZOO_DEBUG@do_io@367: started IO 
thread
2016-12-12 17:21:07,483:31152(0x2b489c83f700):ZOO_DEBUG@do_completion@459: 
started completion thread
2016-12-12 17:21:07,483:31152(0x2b489c63e700):ZOO_INFO@check_events@1705: 
initiated connection to server 
[192.168.167.131:2181]
2016-12-12 17:21:07,505:31152(0x2b489c63e700):ZOO_INFO@check_events@1752: 
session establishment complete on server 
[192.168.167.131:2181], 
sessionId=0x358f2485acb0013, negotiated timeout=1
2016-12-12 17:21:07,505:31152(0x2b489c63e700):ZOO_DEBUG@check_events@1758: 
Calling a watcher for a ZOO_SESSION_EVENT and the state=ZOO_CONNECTED_STATE
2016-12-12 
17:21:07,505:31152(0x2b489c83f700):ZOO_DEBUG@process_completions@2113: Calling 
a watcher for node [], type = -1 event=ZOO_SESSION_EVENT
2016-12-12 17:21:08,484:31152(0x2b4893857e00):ZOO_DEBUG@zoo_acreate@2762: 
Sending request xid=0x584e6c04 for path [/collector] to 
192.168.167.131:2181
2016-12-12 
17:21:08,510:31152(0x2b489c63e700):ZOO_DEBUG@process_sync_completion@1870: 
Processing sync_completion with type=6 xid=0x584e6c04 rc=0
2016-12-12 17:21:08,800:31152(0x2b4893857e00):ZOO_DEBUG@zoo_adelete@2802: 
Sending request xid=0x584e6c05 for path [/collector] to 
192.168.167.131:2181
2016-12-12 
17:21:08,823:31152(0x2b489c63e700):ZOO_DEBUG@process_sync_completion@1870: 
Processing sync_completion with type=0 xid=0x584e6c05 rc=0
2016-12-12 17:21:08,824:31152(0x2b489c63e700):ZOO_DEBUG@do_io@446: IO thread 
terminated
2016-12-12 17:21:08,824:31152(0x2b489c83f700):ZOO_DEBUG@do_completion@469: 
completion thread terminated
2016-12-12 17:21:08,824:31152(0x2b4893857e00):ZOO_INFO@zookeeper_close@2511: 
Closing zookeeper sessionId=0x358f2485acb0013 to 
[192.168.167.131:2181]
contrail-collector: 
/usr/include/boost/spirit/home/support/char_encoding/ascii.hpp:256: static int 
boost::spirit::char_encoding::ascii::isspace(int): Assertion `isascii_(ch)' 
failed.








___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org

___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org


Re: [opencontrail-dev] [Users] Opencontrail build issues.

2017-07-06 Thread Megh Bhatt
Please provide complete error message - the lines seem truncated. Which 
platform are you trying?

Thanks

Megh

On Jul 6, 2017, at 12:37 AM, 164980 ktr.cse.13 
mailto:raghav_sachd...@srmuniv.edu.in>> wrote:

Hi,
I am installing opencontrail from source.During build of contrail packages its 
throwing some of these errors.
In file included from build/include/sandesh/sandesh_types.h:15:0,
 from build/debug/vnsw/agent/uve/interface_types.cpp:12:
build/include/sandesh/derived_stats_algo.h: In instantiation of 
‘contrail::sandeT&) const [with ElemT = long unsigned int; AnomalyResT = 
AnomalyResult]’:
build/include/sandesh/derived_stats.h:156:50:   required from ‘void 
contrail::sath DSTT = contrail::sandesh::DSAnomaly; ElemT = long unsigned int; 
ResultT = Ano
build/debug/vnsw/agent/uve/interface_types.cpp:3212:104:   required from here
build/include/sandesh/derived_stats_algo.h:128:23: error: ‘class AnomalyResult’
 if (started_) res.set_metric(previous_);
   ^
build/include/sandesh/derived_stats_algo.h: In instantiation of 
‘contrail::sandeT&) const [with ElemT = unsigned int; AnomalyResT = 
AnomalyResult]’:
build/include/sandesh/derived_stats.h:156:50:   required from ‘void 
contrail::sath DSTT = contrail::sandesh::DSAnomaly; ElemT = unsigned int; 
ResultT = AnomalyR
build/debug/vnsw/agent/uve/interface_types.cpp:3250:107:   required from here
build/include/sandesh/derived_stats_algo.h:128:23: error: ‘class AnomalyResult’
In file included from build/include/sandesh/sandesh_types.h:15:0,
 from build/debug/vnsw/agent/uve/vrouter_types.cpp:12:
build/include/sandesh/derived_stats_algo.h: In instantiation of 
‘contrail::sandeT&) const [with ElemT = unsigned int; AnomalyResT = 
AnomalyResult]’:
build/include/sandesh/derived_stats.h:156:50:   required from ‘void 
contrail::sath DSTT = contrail::sandesh::DSAnomaly; ElemT = unsigned int; 
ResultT = AnomalyR
build/debug/vnsw/agent/uve/vrouter_types.cpp:13916:107:   required from here
build/include/sandesh/derived_stats_algo.h:128:23: error: ‘class AnomalyResult’
 if (started_) res.set_metric(previous_);
   ^
build/include/sandesh/derived_stats_algo.h: In instantiation of 
‘contrail::sandeT&) const [with ElemT = long unsigned int; AnomalyResT = 
AnomalyResult]’:
build/include/sandesh/derived_stats.h:169:62:   required from ‘void 
contrail::saing, ResultT>&, bool&, bool) const [with DSTT = 
contrail::sandesh::DSAnoma
build/debug/vnsw/agent/uve/vrouter_types.cpp:13977:95:   required from here
build/include/sandesh/derived_stats_algo.h:128:23: error: ‘class AnomalyResult’
g++ -o build/debug/vnsw/agent/vrouter/flow_stats/flow_stats_manager.o -c -O0 
-DDbuild/debug/base/sandesh -Icontroller/src/base/sandesh -Ibuild/debug/dns 
-Icontr -Icontroller/src/ifmap -Ibuild/debug/schema -Icontroller/src/schema 
-Ibuild/deb -Ibuild/debug/vnsw/agent/oper -Icontroller/src/vnsw/agent/oper 
-Ibuild/debug/vnrc/vnsw/agent/uve -Ibuild/debug/vrouter/sandesh 
-Ivrouter/sandesh -Ibuild/debug/agent/vrouter/ksync/linux 
-Icontroller/src/vnsw/agent/vrouter/ksync/linux -Ibuilft -Ivrouter/include 
-Icontroller/src -Ibuild/include -Icontroller/lib controlle
scons: *** [build/debug/vnsw/agent/uve/interface_types.o] Error 1
scons: *** [build/debug/vnsw/agent/uve/vrouter_types.o] Error 1
scons: building terminated because of errors

Please help to rectify these errors.

Thanks & Regards,
Raghav Sachdev

___
Users mailing list
us...@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/users_lists.opencontrail.org

___
Dev mailing list
Dev@lists.opencontrail.org
http://lists.opencontrail.org/mailman/listinfo/dev_lists.opencontrail.org