Carlo's Notes

***v2 26/08/2016***

#####Connect logs to be checked#####

/var/log/carbon.log (you can see the clients sending updates to connect)
/opt/graphite/storage/whisper/domain/default/cluster/default/host/ (directories per each client storing the DB with the information received from conenct)
/opt/quantum/python27/bin/whisper-dump.py (tool to dump out the content of the clients' db)
/var/www/html/connect/logs/mint.log (log to see a given web chart from where is pulling the data)
http://connect_ip:7003 (graphite databases chart, you can access the whisper db with a web tool)
/usr/cvfs/config/ha_peer (has to be set with the metadata IP)
If no data get displaied in the main connect web page, you want make sure that the graphite server's ip stored in the DB is correct, see DB section.
/usr/cvfs/config (the directory permission has to be 755 otherwise no data will be displayed in Connect License section)
/usr/cvfs/config/.auth_secret (the presence of this file won't let connect to discover clients and the other MDC correctly)

#####Config files to check#####

/opt/quantum/connector/etc/connecthostname (has to contain the metadata ip of the seconday MDC on both the MDCs and clients)
/opt/quantum/mintd/etc/mintd.cfg (in graphite section, this will override the correct hostname for the MDC or clients metadata network FQDN)
hostname = aaa.quantum.com

in the same file mintd.cfg at the [mint] section:

[mint]
host = 10.105.12.53 (this ip has to be everywhere the Ip of the MDC2, it seems to work with any interface but I would reccomand to keep using the metadata IP)
port = 2004


/etc/hosts make sure that the MDCs and the clients can resolve correctly the metadata IP/hostname
/opt/quantum/connector/etc/connecthostname (has to contain the metadata ip of the seconday MDC on both the MDCs and clients)

#####Connect DB#####

How to connect to postgres SQL db and how to add manually qxs array for monitoring:
sudo su - postgres
psql connect_db


Check that the graphite server's ip is correct (MDC2 IP):
connect_db=# select variable_value from mint_setting where variable_name='graphite_server'; (if wrong, update it and restart conenct: /etc/init.d/quantum_supervisord restart)


If the MDC can't ping the stornextconnect public web site, for example if has no Internext connection:
update mint_setting set variable_value = 'no' where variable_value = 'qstore_avail';


Add or modify number of QXS to be monitored:
*****Valid types appear to be 412, 1200, 2400 and 5600 ******

EG for two 2400 arrays that the administrator has called “xcellis-qxsX” and “xcellis-qxsY” with IPs 172.16.1.80->3 :

Log on to node-2, become the postgres administrator then list the database tables and then the mint-setting table and look for qxs values.
The following example show 1 existing qxs 1200 array configured, you will probably see none.
Note that if there are existing arrays and different types you’ll need to modify accordingly, types are comma separated:
[root@sus-m445b ~]# sudo su - postgres
-bash-4.1$ psql connect_db
psql (8.4.20)
Type "help" for help.

connect_db=# \dt
                            List of relations
Schema |                   Name                   | Type  |    Owner
--------+------------------------------------------+-------+--------------

public | mint_setting                             | table | connect_user


connect_db=# select variable_name,variable_value, created_date, modified_date from mint_setting;
       variable_name       |         variable_value          |      created_date      |     modified_date
---------------------------+---------------------------------+------------------------+------------------------

qxsTypes                  | 1200                            | 2015-12-08 10:42:29-06 | 2015-12-08 10:42:29-06
qxs_1200_RAIDArraysTotal  | 1                               | 2015-12-08 10:42:29-06 | 2015-12-08 10:42:29-06
qxs1200-0-name            | sus-qxs                         | 2015-12-08 10:42:29-06 | 2015-12-08 10:42:29-06
qxs1200-0-a               | 10.65.167.163                   | 2015-12-08 10:42:29-06 | 2015-12-08 10:42:29-06
qxs1200-0-b               | 10.65.167.147                   | 2015-12-08 10:42:29-06 | 2015-12-08 10:42:29-06

Now add the new arrays, first the types and number :

INSERT INTO mint_setting (variable_name,variable_value,created_date,modified_date,created_by_id,modified_by_id) VALUES ('qxsTypes','2400','2016-01-22 14:30:00-00', '2016-01-22 14:30:00-00',0,0);
INSERT INTO mint_setting (variable_name,variable_value,created_date,modified_date,created_by_id,modified_by_id) VALUES ('qxs_1200_RAIDArraysTotal','2', '2016-01-22 14:30:00-00', '2016-01-22 14:30:00-00',0,0);

Now the first array, instance number “0” :

INSERT INTO mint_setting (variable_name,variable_value,created_date,modified_date,created_by_id,modified_by_id) VALUES ('qxs1200-0-name','xcellis-qxsX', '2016-01-22 14:30:00-00', '2016-01-22 14:30:00-00',0,0);
INSERT INTO mint_setting (variable_name,variable_value,created_date,modified_date,created_by_id,modified_by_id) VALUES ('qxs1200-0-a','1172.16.1.80', '2016-01-22 14:30:00-00', '2016-01-22 14:30:00-00',0,0);
INSERT INTO mint_setting (variable_name,variable_value,created_date,modified_date,created_by_id,modified_by_id) VALUES ('qxs1200-0-b','172.16.1.81', '2016-01-22 14:30:00-00', '2016-01-22 14:30:00-00',0,0);

Now the second one, instance “1” :

INSERT INTO mint_setting (variable_name,variable_value,created_date,modified_date,created_by_id,modified_by_id) VALUES ('qxs2400-1-name','xcellis-qxsY', '2016-01-22 14:30:00-00', '2016-01-22 14:30:00-00',0,0);
INSERT INTO mint_setting (variable_name,variable_value,created_date,modified_date,created_by_id,modified_by_id) VALUES ('qxs2400-1-a','172.16.1.82', '2016-01-22 14:30:00-00', '2016-01-22 14:30:00-00',0,0);
INSERT INTO mint_setting (variable_name,variable_value,created_date,modified_date,created_by_id,modified_by_id) VALUES ('qxs2400-1-b','172.16.1.83', '2016-01-22 14:30:00-00', '2016-01-22 14:30:00-00',0,0);

Now exit the database :

      \q

You’ll need to refresh the Connect dashboard and after a few seconds the new arrays should be visible.

Database delete and update commands are of the form :

DELETE  FROM  mint_setting WHERE variable_name = 'qxs1200-0-b';

UPDATE  mint_setting  SET  variable_value = 2  WHERE  variable_name ='qxs_1200_RAIDArraysTotal';

You can also create a file with all the commands in and use it as input to the database or pipe commands in :

psql connect_db  <  commands.sql

      echo "select variable_name,variable_value, created_date, modified_date from mint_setting;" | psql connect.sql


IMPORTANT: Connect reset is armless on a Giant Leap installation, could casue several other issues if done during a Xcellis installation.
##########How to reset connect installation#####

   rm -rf /var/www/html/connect*
   ln -sfT /var/www/html/bootstrap /var/www/html/connect
   service quantum_supervisord restart
   dropdb -e connect_db
   dropuser -e connect_user
   # verify following does not exist:  /var/www/html/connect/config/config.json
   sed -i 's/#Listen 80/Listen 80/' /etc/httpd/conf/httpd.conf
   service httpd restart
################################################



 



This page was generated by the BrainKeeper Enterprise Wiki, © 2018