Display Namespace Master List in Lattus

Overview

This utility is useful when you need to troubleshoot anything that is happening with namespaces. You need to know which storagedaemon is the master and where it resides so you can look at the correct logs. There is information that only goes into the master’s logs.

 


Script

Create an “/opt/qbase3/Quantum” directory as a work area for Lattus.

 

<<<>>>
root@Controller1:/opt/qbase3/Quantum# cat masterlist
#!/opt/qbase3/bin/python
from pymonkey.InitBase import q
import pprint

 

# USAGE: /opt/qbase3/Quantum/masterlist
# print the header
print "Namespace, SD, master_node IP, port"
print
# display namespace master information
output = [ (sd[0], sd[1], q.dss.manage.showStorageDaemon(sd[1])['address'].split(':')) for sd in [ (ns, q.dss.manage.showNameSpace(ns)['master_node_id']) for ns in q.dss.manage.listNameSpaces() ] ]
pprint.pprint(output)

<<<>>>

 

Output example:


root@Controller1:/opt/qbase3/Quantum# ./masterlist

 

Namespace, SD, master_node IP, port

 

[('_metastorebackup', 0, ['10.10.1.41', '23520']),
('_osis_model_backup', 1, ['10.10.1.41', '23521']),
('SN_adic_backup_cpy2', 3, ['10.10.1.42', '23521']),
('testS3bucketcreation', 0, ['10.10.1.41', '23520']),
('_logging_backup', 17, ['10.10.1.4', '23521']),
('system', 0, ['10.10.1.41', '23520']),
('Stuff', 9, ['10.10.1.45', '23521']),
('axr2S3', 2, ['10.10.1.42', '23520']),
('SnSustaining', 9, ['10.10.1.45', '23521'])]

 

 


 



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