Ticket #7: aacraid-status.2.patch

File aacraid-status.2.patch, 1.1 KB (added by consult@…, 3 years ago)
  • aacraid-status

    old new  
    6464        if re.match(r'^Segment [0-9]+\s+: .*$',line.strip()): 
    6565            splitter = re.compile('(\(.*\))') 
    6666            line = line.split(':')[1] 
    67             members.append(splitter.split(line)[1].strip('(').strip(')')) 
     67            if re.match(r'^ Missing',line): 
     68                members.append('?,?') 
     69            else: 
     70                members.append(splitter.split(line)[1].strip('(').strip(')')) 
     71        if re.match(r'^Group [0-9], Segment [0-9]+\s+: .*$',line.strip()): 
     72            splitter = re.compile('(\(.*\))') 
     73            line = line.split(':')[1] 
     74            if re.match(r'^ Missing',line): 
     75                members.append('?,?') 
     76            else: 
     77                members.append(splitter.split(line)[1].strip('(').strip(')')) 
    6878    return [type,status,size,members] 
    6979 
    7080def returnControllerTasks(output): 
     
    188198 
    189199if bad: 
    190200    print '\nThere is at least one disk/array in a NOT OPTIMAL state.' 
     201    print '\nUse "arcconf GETCONFIG [1-9]" to get details.' 
    191202    sys.exit(1)