Skip to content

Commit

Permalink
Closes-Bug: #1618249 - SM Monitoring has some bugs in show, processing
Browse files Browse the repository at this point in the history
If some server is not there in the full list, show all monitoring info fails.
Also for some servers, the disk processing fails due to wrong if condition

Change-Id: I2f024bb7fe6ca3032f8c4241e86367a7790c4dc1
  • Loading branch information
nitishkrishna committed Aug 29, 2016
1 parent 0660479 commit 9e13811
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/server_mgr_ipmi_monitoring.py
Expand Up @@ -349,7 +349,7 @@ def fetch_and_process_disk_info(self, hostname, ip, sshclient):

for line in fileoutput:
if line is not None:
if line.find('sd') != -1 or line.find('dm') != -1:
if (line.find('sd') != -1 or line.find('dm') != -1) and line.find('Linux')!=0:
disk_data = Disk()
disk_data_tot = Disk_totals()
prev_disk_info = Disk_totals()
Expand Down Expand Up @@ -715,13 +715,18 @@ def get_monitoring_info(self):
return_dict = dict()
return_dict["name"] = str(server['id'])
return_dict["cluster_id"] = server['cluster_id']
main_dict = self.filter_monitoring_results(
parsed_data_dict[str(server['id'])],
ret_data["type"])
summary_dict = self.filter_monitoring_results(
sum_parsed_data_dict[str(server['id'])],
ret_data["type"]
)
if str(server['id']) in parsed_data_dict.keys():
main_dict = self.filter_monitoring_results(
parsed_data_dict[str(server['id'])],
ret_data["type"])
else:
main_dict = {}
if str(server['id']) in sum_parsed_data_dict.keys():
summary_dict = self.filter_monitoring_results(
sum_parsed_data_dict[str(server['id'])],
ret_data["type"])
else:
summary_dict = {}
for summary_key in summary_dict:
main_dict[str(summary_key)] = summary_dict[summary_key]
return_dict[str(uve_name)] = main_dict
Expand Down

0 comments on commit 9e13811

Please sign in to comment.