Advertisement
Guest User

Untitled

a guest
Jan 30th, 2013
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.76 KB | None | 0 0
  1. 2013-01-28 16:21:42,317 script(Cisco.IOS.get_spanning_tree,b777.line-r.ru,**{}) failed: <type 'exceptions.AttributeError'>
  2. 'NoneType' object has no attribute 'group'
  3. START OF TRACEBACK
  4. ------------------------------------------------------------------------
  5. File: /usr/local/noc/sa/profiles/Cisco/IOS/get_spanning_tree.py (Line: 152)
  6. Function: process_mstp
  7. 145 v = self.cli("show spanning-tree mst configuration")
  8. 146 match = self.rx_mstp_region.search(v)
  9. 147 r = {
  10. 148 "mode": "MSTP",
  11. 149 "instances": [],
  12. 150 "configuration": {
  13. 151 "MSTP": {
  14. 152 ==> "region": match.group("region"),
  15. 153 "revision": match.group("revision"),
  16. 154 }
  17. 155 }
  18. 156 }
  19. 157 iv = {} # instance -> vlans
  20. 158 for instance, vlans in self.rx_mstp_instance.findall(v):
  21. Variables:
  22. self = <Script(script-213.108.208.61-Cisco.IOS.get_spanning_tree, started 34378370432)>
  23. cli_stp = '\nMST0\n Spanning tree enabled protocol mstp\n Root ID Priority 32768\n Address 0007.b32a.d000\n This bridge is the root\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\n\n Bridge ID Priority 32768 (priority 32768 sys-id-ext 0)\n Address 0007.b32a.d000\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\n\nInterface Role Sts Cost Prio.Nbr Type\n---------------- ---- --- --------- -------- --------------------------------\nGi2/5 Desg FWD 20000 128.133 Edge P2p \nGi2/10 Desg FWD 20000 128.138 Edge P2p \nGi2/11 Desg FWD 20000 128.139 Edge P2p \nGi2/12 Desg FWD 20000 128.140 Edge P2p \nGi2/13 Desg FWD 20000 128.141 Edge P2p \nGi2/14 Desg FWD 20000 128.142 Edge P2p \nGi2/15 Desg FWD 20000 128.143 P2p \nGi2/16 Desg FWD 20000 128.144 Edge P2p \nPo1 Desg FWD 10000 128.1665 P2p \nPo2 Desg FWD 10000 128.1666 P2p \n\n'
  24. ports = {0: {'Po 2': {'state': 'forwarding', 'edge': False, 'role': 'designated', 'point_to_point': True}, 'Po 1': {'state': 'forwarding', 'edge': False, 'role': 'designated', 'point_to_point': True}, 'Gi 2/15': {'state': 'forwarding', 'edge': False, 'role': 'designated', 'point_to_point': True}, 'Gi 2/14': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/16': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/11': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/10': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/13': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/12': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/5': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}}}
  25. match = None
  26. v = 'Name []\nRevision 0 Instances configured 1\n\nInstance Vlans mapped\n-------- ---------------------------------------------------------------------\n0 1-4094\n-------------------------------------------------------------------------------\n'
  27. ------------------------------------------------------------------------
  28. File: /usr/local/noc/sa/profiles/Cisco/IOS/get_spanning_tree.py (Line: 204)
  29. Function: execute
  30. 197 def execute(self):
  31. 198 v = self.cli("show spanning-tree")
  32. 199 if "Spanning tree enabled protocol ieee" in v:
  33. 200 return self.process_pvst(v, proto="PVST+")
  34. 201 elif "Spanning tree enabled protocol rstp" in v:
  35. 202 return self.process_pvst(v, proto="rapid-PVST+")
  36. 203 elif "Spanning tree enabled protocol mstp" in v:
  37. 204 ==> return self.process_mstp(v)
  38. 205 elif "No spanning tree instance exists" in v \
  39. 206 or "No spanning tree instances exist" in v:
  40. 207 return {"mode": "None", "instances": []}
  41. Variables:
  42. self = <Script(script-213.108.208.61-Cisco.IOS.get_spanning_tree, started 34378370432)>
  43. v = '\nMST0\n Spanning tree enabled protocol mstp\n Root ID Priority 32768\n Address 0007.b32a.d000\n This bridge is the root\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\n\n Bridge ID Priority 32768 (priority 32768 sys-id-ext 0)\n Address 0007.b32a.d000\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\n\nInterface Role Sts Cost Prio.Nbr Type\n---------------- ---- --- --------- -------- --------------------------------\nGi2/5 Desg FWD 20000 128.133 Edge P2p \nGi2/10 Desg FWD 20000 128.138 Edge P2p \nGi2/11 Desg FWD 20000 128.139 Edge P2p \nGi2/12 Desg FWD 20000 128.140 Edge P2p \nGi2/13 Desg FWD 20000 128.141 Edge P2p \nGi2/14 Desg FWD 20000 128.142 Edge P2p \nGi2/15 Desg FWD 20000 128.143 P2p \nGi2/16 Desg FWD 20000 128.144 Edge P2p \nPo1 Desg FWD 10000 128.1665 P2p \nPo2 Desg FWD 10000 128.1666 P2p \n\n'
  44. ------------------------------------------------------------------------
  45. File: /usr/local/noc/sa/script/script.py (Line: 419)
  46. Function: guarded_run
  47. 412 return result
  48. 413 except KeyError:
  49. 414 self.debug("Not in call cache: %r, %r" % (self.name,
  50. 415 self.kwargs))
  51. 416 pass
  52. 417 # Calling script body
  53. 418 self._thread_id = thread.get_ident()
  54. 419 ==> result = self.execute(**self.kwargs)
  55. 420 # Enforce interface result checking
  56. 421 for i in self.implements:
  57. 422 result = i.script_clean_result(self.profile, result)
  58. 423 # Cache result when required
  59. 424 if self.cache and self.parent is not None:
  60. 425 self.debug("Write to call cache: %s, %s, %r" % (self.name,
  61. Variables:
  62. i = <noc.sa.interfaces.igetspanningtree.IGetSpanningTree object at 0x804da6b10>
  63. self = <Script(script-213.108.208.61-Cisco.IOS.get_spanning_tree, started 34378370432)>
  64. ------------------------------------------------------------------------
  65. File: /usr/local/noc/sa/script/script.py (Line: 442)
  66. Function: run
  67. 435
  68. 436 def run(self):
  69. 437 """Script thread worker method"""
  70. 438 self.debug("Running")
  71. 439 result = None
  72. 440 try:
  73. 441 with self.cancelable():
  74. 442 ==> result = self.guarded_run()
  75. 443 except self.TimeOutError:
  76. 444 self.error("Timed out")
  77. 445 self.e_timeout = True
  78. 446 except CancelledError:
  79. 447 self.error("Cancelled")
  80. 448 self.e_cancel = True
  81. Variables:
  82. self = <Script(script-213.108.208.61-Cisco.IOS.get_spanning_tree, started 34378370432)>
  83. r = ["<type 'exceptions.AttributeError'>", "'NoneType' object has no attribute 'group'"]
  84. result = None
  85. v = AttributeError("'NoneType' object has no attribute 'group'",)
  86. tb = <traceback object at 0x80619f290>
  87. t = <type 'exceptions.AttributeError'>
  88. ------------------------------------------------------------------------
  89. END OF TRACEBACK
  90. 2013-01-28 16:21:42,325 MRT task=3783078/3922125 object=b777.line-r.ru(213.108.208.61) script=Cisco.IOS.get_spanning_tree status=failed code=14 error=<type 'exceptions.AttributeError'>
  91. 'NoneType' object has no attribute 'group'
  92. START OF TRACEBACK
  93. ------------------------------------------------------------------------
  94. File: /usr/local/noc/sa/profiles/Cisco/IOS/get_spanning_tree.py (Line: 152)
  95. Function: process_mstp
  96. 145 v = self.cli("show spanning-tree mst configuration")
  97. 146 match = self.rx_mstp_region.search(v)
  98. 147 r = {
  99. 148 "mode": "MSTP",
  100. 149 "instances": [],
  101. 150 "configuration": {
  102. 151 "MSTP": {
  103. 152 ==> "region": match.group("region"),
  104. 153 "revision": match.group("revision"),
  105. 154 }
  106. 155 }
  107. 156 }
  108. 157 iv = {} # instance -> vlans
  109. 158 for instance, vlans in self.rx_mstp_instance.findall(v):
  110. Variables:
  111. self = <Script(script-213.108.208.61-Cisco.IOS.get_spanning_tree, started 34378370432)>
  112. cli_stp = '\nMST0\n Spanning tree enabled protocol mstp\n Root ID Priority 32768\n Address 0007.b32a.d000\n This bridge is the root\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\n\n Bridge ID Priority 32768 (priority 32768 sys-id-ext 0)\n Address 0007.b32a.d000\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\n\nInterface Role Sts Cost Prio.Nbr Type\n---------------- ---- --- --------- -------- --------------------------------\nGi2/5 Desg FWD 20000 128.133 Edge P2p \nGi2/10 Desg FWD 20000 128.138 Edge P2p \nGi2/11 Desg FWD 20000 128.139 Edge P2p \nGi2/12 Desg FWD 20000 128.140 Edge P2p \nGi2/13 Desg FWD 20000 128.141 Edge P2p \nGi2/14 Desg FWD 20000 128.142 Edge P2p \nGi2/15 Desg FWD 20000 128.143 P2p \nGi2/16 Desg FWD 20000 128.144 Edge P2p \nPo1 Desg FWD 10000 128.1665 P2p \nPo2 Desg FWD 10000 128.1666 P2p \n\n'
  113. ports = {0: {'Po 2': {'state': 'forwarding', 'edge': False, 'role': 'designated', 'point_to_point': True}, 'Po 1': {'state': 'forwarding', 'edge': False, 'role': 'designated', 'point_to_point': True}, 'Gi 2/15': {'state': 'forwarding', 'edge': False, 'role': 'designated', 'point_to_point': True}, 'Gi 2/14': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/16': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/11': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/10': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/13': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/12': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}, 'Gi 2/5': {'state': 'forwarding', 'edge': True, 'role': 'designated', 'point_to_point': True}}}
  114. match = None
  115. v = 'Name []\nRevision 0 Instances configured 1\n\nInstance Vlans mapped\n-------- ---------------------------------------------------------------------\n0 1-4094\n-------------------------------------------------------------------------------\n'
  116. ------------------------------------------------------------------------
  117. File: /usr/local/noc/sa/profiles/Cisco/IOS/get_spanning_tree.py (Line: 204)
  118. Function: execute
  119. 197 def execute(self):
  120. 198 v = self.cli("show spanning-tree")
  121. 199 if "Spanning tree enabled protocol ieee" in v:
  122. 200 return self.process_pvst(v, proto="PVST+")
  123. 201 elif "Spanning tree enabled protocol rstp" in v:
  124. 202 return self.process_pvst(v, proto="rapid-PVST+")
  125. 203 elif "Spanning tree enabled protocol mstp" in v:
  126. 204 ==> return self.process_mstp(v)
  127. 205 elif "No spanning tree instance exists" in v \
  128. 206 or "No spanning tree instances exist" in v:
  129. 207 return {"mode": "None", "instances": []}
  130. Variables:
  131. self = <Script(script-213.108.208.61-Cisco.IOS.get_spanning_tree, started 34378370432)>
  132. v = '\nMST0\n Spanning tree enabled protocol mstp\n Root ID Priority 32768\n Address 0007.b32a.d000\n This bridge is the root\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\n\n Bridge ID Priority 32768 (priority 32768 sys-id-ext 0)\n Address 0007.b32a.d000\n Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec\n\nInterface Role Sts Cost Prio.Nbr Type\n---------------- ---- --- --------- -------- --------------------------------\nGi2/5 Desg FWD 20000 128.133 Edge P2p \nGi2/10 Desg FWD 20000 128.138 Edge P2p \nGi2/11 Desg FWD 20000 128.139 Edge P2p \nGi2/12 Desg FWD 20000 128.140 Edge P2p \nGi2/13 Desg FWD 20000 128.141 Edge P2p \nGi2/14 Desg FWD 20000 128.142 Edge P2p \nGi2/15 Desg FWD 20000 128.143 P2p \nGi2/16 Desg FWD 20000 128.144 Edge P2p \nPo1 Desg FWD 10000 128.1665 P2p \nPo2 Desg FWD 10000 128.1666 P2p \n\n'
  133. ------------------------------------------------------------------------
  134. File: /usr/local/noc/sa/script/script.py (Line: 419)
  135. Function: guarded_run
  136. 412 return result
  137. 413 except KeyError:
  138. 414 self.debug("Not in call cache: %r, %r" % (self.name,
  139. 415 self.kwargs))
  140. 416 pass
  141. 417 # Calling script body
  142. 418 self._thread_id = thread.get_ident()
  143. 419 ==> result = self.execute(**self.kwargs)
  144. 420 # Enforce interface result checking
  145. 421 for i in self.implements:
  146. 422 result = i.script_clean_result(self.profile, result)
  147. 423 # Cache result when required
  148. 424 if self.cache and self.parent is not None:
  149. 425 self.debug("Write to call cache: %s, %s, %r" % (self.name,
  150. Variables:
  151. i = <noc.sa.interfaces.igetspanningtree.IGetSpanningTree object at 0x804da6b10>
  152. self = <Script(script-213.108.208.61-Cisco.IOS.get_spanning_tree, started 34378370432)>
  153. ------------------------------------------------------------------------
  154. File: /usr/local/noc/sa/script/script.py (Line: 442)
  155. Function: run
  156. 435
  157. 436 def run(self):
  158. 437 """Script thread worker method"""
  159. 438 self.debug("Running")
  160. 439 result = None
  161. 440 try:
  162. 441 with self.cancelable():
  163. 442 ==> result = self.guarded_run()
  164. 443 except self.TimeOutError:
  165. 444 self.error("Timed out")
  166. 445 self.e_timeout = True
  167. 446 except CancelledError:
  168. 447 self.error("Cancelled")
  169. 448 self.e_cancel = True
  170. Variables:
  171. self = <Script(script-213.108.208.61-Cisco.IOS.get_spanning_tree, started 34378370432)>
  172. r = ["<type 'exceptions.AttributeError'>", "'NoneType' object has no attribute 'group'"]
  173. result = None
  174. v = AttributeError("'NoneType' object has no attribute 'group'",)
  175. tb = <traceback object at 0x80619f290>
  176. t = <type 'exceptions.AttributeError'>
  177. ------------------------------------------------------------------------
  178. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement