Hello, Bug #1479698
— BR TomekC. > Wiadomość napisana przez Raj Reddy <[email protected]> w dniu 28 lip 2015, > o godz. 18:42: > > Hi Tomasz > > thanks for the analysis. > can you open a PR on open contrail to enhance the yaml reading, I will take > care of it.. > > thanks > Raj > >> On Jul 28, 2015, at 1:42 AM, Tomasz Charewicz <[email protected] >> <mailto:[email protected]>> wrote: >> >> Hello, >> >> I found why, the service contrail-database-nodemgr after upgrade is not >> working. >> >> Cassandra in my envrioment has a configuration of data directory in format: >> >> data_file_directories: [/home/cassandra/data] >> >> But when the contrail service is starting, it looks for configuration in >> format: >> >> root@ubuntu:/var/log/contrail# grep -A 1 'data_file_directories:' >> /etc/cassandra/cassandra.yaml >> data_file_directories: >> - /var/lib/cassandra/data >> >> Responsible for that is library database_event_manager.py. It’s grep a >> config file to search where is the data dir. >> >> if (linux_dist == 'Ubuntu'): >> popen_cmd = "grep -A 1 'data_file_directories:'" + \ >> " /etc/cassandra/cassandra.yaml | grep '-' | cut -d'-' >> -f2" >> else: >> popen_cmd = "grep -A 1 'data_file_directories:'" + \ >> " /etc/cassandra/conf/cassandra.yaml | grep '-' | cut >> -d'-' -f2" >> >> (cassandra_data_dir, error_value) = \ >> Popen(popen_cmd, shell=True, stdout=PIPE).communicate() >> cassandra_data_dir = cassandra_data_dir.strip() >> analytics_dir = cassandra_data_dir + '/ContrailAnalytics' >> >> I think that library can read the configuration of cassandra in better way. >> Configuration of cassandra is in yaml format, and the python can read it >> very easly. >> >> — >> BR >> TomekC. >> >>> Wiadomość napisana przez Tomasz Charewicz <[email protected] >>> <mailto:[email protected]>> w dniu 28 lip 2015, o godz. 07:31: >>> >>> Hello, >>> >>> Thank you for a quick answer. >>> >>> Cassandra in my setup is in /home directory. >>> >>> root@node-6:/home# ls -la >>> total 12 >>> drwxr-xr-x 3 root root 4096 Mar 26 12:11 . >>> drwxr-xr-x 23 root root 4096 Apr 15 14:19 .. >>> drwxr-xr-x 5 root root 4096 Mar 26 12:11 cassandra >>> >>> Keyspace for ContrailAnalystics is created, but not present in >>> /var/lib/cassandra/data/ >>> >>> root@node-6:/home/cassandra/data/ContrailAnalytics# ls -la >>> total 240 >>> drwxr-xr-x 25 root root 4096 Mar 26 12:41 . >>> drwxr-xr-x 11 root root 4096 Apr 24 16:41 .. >>> drwxr-xr-x 2 root root 12288 Jul 27 12:04 FlowRecordTable >>> drwxr-xr-x 2 root root 12288 Jul 27 12:12 FlowTableDvnDipVer2 >>> drwxr-xr-x 2 root root 12288 Jul 27 12:04 FlowTableProtDpVer2 >>> drwxr-xr-x 2 root root 12288 Jul 27 12:04 FlowTableProtSpVer2 >>> drwxr-xr-x 2 root root 12288 Jul 27 12:04 FlowTableSvnSipVer2 >>> drwxr-xr-x 2 root root 12288 Jul 27 12:04 FlowTableVRouterVer2 >>> drwxr-xr-x 2 root root 16384 Jul 28 07:22 MessageTable >>> drwxr-xr-x 2 root root 12288 Jul 28 07:22 MessageTableCategory >>> drwxr-xr-x 2 root root 16384 Jul 28 07:22 MessageTableKeyword >>> drwxr-xr-x 2 root root 12288 Jul 28 07:22 MessageTableMessageType >>> drwxr-xr-x 2 root root 12288 Jul 28 07:22 MessageTableModuleId >>> drwxr-xr-x 2 root root 12288 Jul 28 07:22 MessageTableSource >>> drwxr-xr-x 2 root root 12288 Jul 28 07:22 MessageTableTimestamp >>> drwxr-xr-x 2 root root 12288 Jul 28 07:22 ObjectTable >>> drwxr-xr-x 2 root root 12288 Jul 28 07:22 ObjectValueTable >>> drwxr-xr-x 2 root root 4096 Jul 28 07:22 StatsTableByDblTagV3 >>> drwxr-xr-x 2 root root 4096 Jul 27 17:15 StatsTableByStrStrTagV3 >>> drwxr-xr-x 2 root root 16384 Jul 28 07:22 StatsTableByStrTagV3 >>> drwxr-xr-x 2 root root 4096 Mar 26 12:41 StatsTableByStrU64TagV3 >>> drwxr-xr-x 2 root root 4096 Mar 26 12:41 StatsTableByU64StrTagV3 >>> drwxr-xr-x 2 root root 4096 Jul 28 07:22 StatsTableByU64TagV3 >>> drwxr-xr-x 2 root root 4096 Mar 26 12:41 StatsTableByU64U64TagV3 >>> drwxr-xr-x 2 root root 4096 Mar 26 12:41 SystemObjectTable >>> >>> I made symlink from /var/lib/cassandra to /home/cassandra but service >>> contrail-database-nodemgr is still in initialization state. >>> >>> BR >>> TomekC. >>> >>>> Wiadomość napisana przez Raj Reddy <[email protected] >>>> <mailto:[email protected]>> w dniu 28 lip 2015, o godz. 02:53: >>>> >>>> It expects the ContrailAnalytics keyspace in Cassandra.. >>>> That should get automatically created w/ fab or server manager >>>> installation or after Analytics points to cassandra cluster.. >>>> Can you investigate why /var/lib/cassandra/data/ContrailAnalytics >>>> directory is not present.. >>>> >>>> regards >>>> Raj >>>> >>>>> On Jul 27, 2015, at 4:27 AM, Tomasz Charewicz <[email protected] >>>>> <mailto:[email protected]>> wrote: >>>>> >>>>> Hi, >>>>> >>>>> After a upgrade OpenContrail to version 2.20, I have a problem with >>>>> service contrail-database-nodemgr. >>>>> All the time this service is in initializing state with note „Disk space >>>>> for analytics db not retrievable. >>>>> >>>>> == Contrail Database == >>>>> supervisor-database: active >>>>> contrail-database active >>>>> contrail-database-nodemgr initializing (Disk space for analytics db >>>>> not retrievable.) >>>>> >>>>> Cassandra is working properly. >>>>> >>>>> root@node-6:/etc/contrail# nodetool status >>>>> Datacenter: datacenter1 >>>>> ======================= >>>>> Status=Up/Down >>>>> |/ State=Normal/Leaving/Joining/Moving >>>>> -- Address Load Tokens Owns Host ID >>>>> Rack >>>>> UN 10.185.4.24 15.15 GB 256 32.8% >>>>> 1d02f0c7-266c-4cb2-a303-af3a95a602ef rack1 >>>>> UN 10.185.4.26 17.91 GB 256 34.0% >>>>> 064268f8-6f3a-4a90-a291-7f4fec561bb0 rack1 >>>>> UN 10.185.4.25 18.19 GB 256 33.1% >>>>> f8ce7c87-7dbb-4e67-84f1-ea5c823956cc rack1 >>>>> >>>>> Content of configuartion file for that service is below, nothing special. >>>>> >>>>> root@node-6:/etc/contrail# cat >>>>> /etc/contrail/contrail-database-nodemgr.conf >>>>> >>>>> [DEFAULT] >>>>> hostip=10.185.4.24 >>>>> minimum_diskGB=48 >>>>> >>>>> [DISCOVERY] >>>>> server=10.185.4.20 >>>>> port=5998 >>>>> >>>>> [COLLECTOR] >>>>> #server_list=ip1:port1 ip2:port2 >>>>> >>>>> In logs I can find a error. >>>>> Sending UVE:NodeStatusUVE(_context='', _scope='', _category='', >>>>> _send_queue_enabled=True, _seqnum=0, _versionsig=2778367443, >>>>> _source='node-6', _instance_id='0', _client=None, _type=6, _hints=1, >>>>> _http_server=None, _logger=None, _more=False, _node_type='Database', >>>>> data=NodeStatus(status=None, name='node-6', deleted=None, >>>>> disk_usage_info=[DiskPartitionUsageStats(partition_space_available_1k=29768024, >>>>> partition_space_used_1k=28004112, partition_name='/dev/sda3', >>>>> partition_type='ext4'), >>>>> DiskPartitionUsageStats(partition_space_available_1k=30786704, >>>>> partition_space_used_1k=32928, partition_name='/dev/mapper/vm-nova', >>>>> partition_type='xfs'), >>>>> DiskPartitionUsageStats(partition_space_available_1k=141984, >>>>> partition_space_used_1k=33544, partition_name='/dev/sda2', >>>>> partition_type='ext3')], process_status=None, all_core_file_list=None, >>>>> _table='ObjectDatabaseInfo', process_info=None, description=None), >>>>> _module='contrail-database-nodemgr', _level=2147483647, >>>>> _timestamp=1437992642521090, _client_context='', >>>>> _connect_to_collector=True, _role=0)Exception AssertionError: >>>>> AssertionError() in <module 'threading' from >>>>> '/usr/lib/python2.7/threading.pyc'> ignored >>>>> >>>>> Does anyone have an idea how to fix it? >>>>> >>>>> — >>>>> best regards >>>>> TomekC. >>>>> _______________________________________________ >>>>> Users mailing list >>>>> [email protected] <mailto:[email protected]> >>>>> http://lists.opencontrail.org/mailman/listinfo/users_lists.opencontrail.org >>>>> >>>>> <http://lists.opencontrail.org/mailman/listinfo/users_lists.opencontrail.org> >>>> >>> >> >
_______________________________________________ Users mailing list [email protected] http://lists.opencontrail.org/mailman/listinfo/users_lists.opencontrail.org
