Advertisement
Guest User

Untitled

a guest
Feb 5th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.89 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2013-02-05 15:32:48.756510)
  2. Working directory: /opt/noc
  3. <class 'noc.ip.models.vrf.DoesNotExist'>
  4. VRF matching query does not exist.
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/contrib/lib/django/db/models/query.py (Line: 366)
  8. Function: get
  9. 359 if self.query.can_filter():
  10. 360 clone = clone.order_by()
  11. 361 num = len(clone)
  12. 362 if num == 1:
  13. 363 return clone._result_cache[0]
  14. 364 if not num:
  15. 365 raise self.model.DoesNotExist("%s matching query does not exist."
  16. 366 ==> % self.model._meta.object_name)
  17. 367 raise self.model.MultipleObjectsReturned("get() returned more than one %s -- it returned %s! Lookup parameters were %s"
  18. 368 % (self.model._meta.object_name, num, kwargs))
  19. 369
  20. 370 def create(self, **kwargs):
  21. 371 """
  22. 372 Creates a new object with the given kwargs, saving it to the database
  23. Variables:
  24. clone = []
  25. num = 0
  26. self = [<VRF: AkadPravovKoll>, <VRF: burokrat>, <VRF: Comcor>, <VRF: holding>, <VRF: Home2com>, <VRF: INcoma>, <VRF: INTERNET>, <VRF: InternetV6>, <VRF: iptv>, <VRF: kipbank>, <VRF: merlion>, <VRF: MetalBez>, <VRF: MGMT>, <VRF: Office2com>, <VRF: OMS>, <VRF: rostbank>, <VRF: sits>, <VRF: sm-clinic>, <VRF: TEL>, <VRF: test-ip-allocation>, '...(remaining elements truncated)...']
  27. args = ()
  28. kwargs = {'rd': '0:0'}
  29. ------------------------------------------------------------------------
  30. File: /opt/noc/contrib/lib/django/db/models/manager.py (Line: 131)
  31. Function: get
  32. 124 def distinct(self, *args, **kwargs):
  33. 125 return self.get_query_set().distinct(*args, **kwargs)
  34. 126
  35. 127 def extra(self, *args, **kwargs):
  36. 128 return self.get_query_set().extra(*args, **kwargs)
  37. 129
  38. 130 def get(self, *args, **kwargs):
  39. 131 ==> return self.get_query_set().get(*args, **kwargs)
  40. 132
  41. 133 def get_or_create(self, **kwargs):
  42. 134 return self.get_query_set().get_or_create(**kwargs)
  43. 135
  44. 136 def create(self, **kwargs):
  45. 137 return self.get_query_set().create(**kwargs)
  46. Variables:
  47. self = <django.db.models.manager.Manager object at 0x303c550>
  48. args = ()
  49. kwargs = {'rd': '0:0'}
  50. ------------------------------------------------------------------------
  51. File: /opt/noc/ip/models/vrf.py (Line: 95)
  52. Function: get_global
  53. 88 return site.reverse("ip:vrf:change", self.id)
  54. 89
  55. 90 @classmethod
  56. 91 def get_global(cls):
  57. 92 """
  58. 93 Returns VRF 0:0
  59. 94 """
  60. 95 ==> return VRF.objects.get(rd="0:0")
  61. 96
  62. 97 @classmethod
  63. 98 def generate_rd(cls, name):
  64. 99 """
  65. 100 Generate unique rd for given name
  66. 101 """
  67. Variables:
  68. cls = <class 'noc.ip.models.vrf.VRF'>
  69. ------------------------------------------------------------------------
  70. File: /opt/noc/ip/apps/routeimport/views.py (Line: 31)
  71. Function: reduce_route
  72. 24 Reduce task for route import
  73. 25 :param task:
  74. 26 :return:
  75. 27 """
  76. 28 from noc.ip.models import VRF, Prefix
  77. 29 from noc.lib.ip import IP
  78. 30
  79. 31 ==> vrf = VRF.get_global()
  80. 32 r = {} # prefix -> (description, objects)
  81. 33
  82. 34 for mt in task.maptask_set.filter(status="C"):
  83. 35 for instance in mt.script_result:
  84. 36 if instance["type"] == "ip" and instance[
  85. 37 "forwarding_instance"] == "default":
  86. Variables:
  87. IP = <class 'noc.lib.ip.IP'>
  88. Prefix = <class 'noc.ip.models.prefix.Prefix'>
  89. task = <ReduceTask: 21885>
  90. VRF = <class 'noc.ip.models.vrf.VRF'>
  91. ------------------------------------------------------------------------
  92. File: /opt/noc/sa/models/reducetask.py (Line: 259)
  93. Function: reduce
  94. 252 m.save()
  95. 253 return r_task
  96. 254
  97. 255 ##
  98. 256 ## Perform reduce script and execute result
  99. 257 ##
  100. 258 def reduce(self):
  101. 259 ==> return PyRule.compile_text(self.script)(self, **self.script_params)
  102. 260
  103. 261 ##
  104. 262 ## Get task result
  105. 263 ##
  106. 264 def get_result(self, block=True):
  107. 265 while True:
  108. Variables:
  109. self = <ReduceTask: 21885>
  110. ------------------------------------------------------------------------
  111. File: /opt/noc/sa/models/reducetask.py (Line: 267)
  112. Function: get_result
  113. 260
  114. 261 ##
  115. 262 ## Get task result
  116. 263 ##
  117. 264 def get_result(self, block=True):
  118. 265 while True:
  119. 266 if self.complete:
  120. 267 ==> result = self.reduce()
  121. 268 self.delete()
  122. 269 return result
  123. 270 else:
  124. 271 if block:
  125. 272 time.sleep(3)
  126. 273 else:
  127. Variables:
  128. self = <ReduceTask: 21885>
  129. block = False
  130. ------------------------------------------------------------------------
  131. File: /opt/noc/lib/app/saapplication.py (Line: 144)
  132. Function: view_task
  133. 137 def width(w):
  134. 138 if not w or not total_tasks:
  135. 139 return 0
  136. 140 return MAX_WIDTH * w / total_tasks
  137. 141
  138. 142 task = get_object_or_404(ReduceTask, id=int(task_id))
  139. 143 try:
  140. 144 ==> result = task.get_result(block=False)
  141. 145 except ReduceTask.NotReady:
  142. 146 # Task not ready, refresh
  143. 147 # Get counts into status -> count dict
  144. 148 s = task.maptask_set.values("status").annotate(Count("status"))
  145. 149 counts = dict([(r["status"], r["status__count"]) for r in s])
  146. 150 total_tasks = sum(counts.values())
  147. Variables:
  148. task = <ReduceTask: 21885>
  149. task_id = u'21885'
  150. self = <noc.ip.apps.routeimport.views.RouteImportAppplication object at 0x3ccd950>
  151. request = <WSGIRequest
  152. path:/ip/routeimport/task/21885/,
  153. GET:<QueryDict: {}>,
  154. POST:<QueryDict: {}>,
  155. COOKIES:{'csrftoken': 'aUGLOhc6xDfUl7geX7gRePD2Nmwm80D0',
  156. 'sessionid': 'ada51347a126da6a622111e505321d1f',
  157. 'was_on_site': 'was'},
  158. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  159. 'HTTP_ACCEPT_CHARSET': 'UTF-8,*;q=0.5',
  160. 'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
  161. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  162. 'HTTP_CACHE_CONTROL': 'max-age=0',
  163. 'HTTP_CONNECTION': 'close',
  164. 'HTTP_COOKIE': 'was_on_site=was; csrftoken=aUGLOhc6xDfUl7geX7gRePD2Nmwm80D0; sessionid=ada51347a126da6a622111e505321d1f',
  165. 'HTTP_HOST': '127.0.0.1:8000',
  166. 'HTTP_REFERER': 'http://nocproject.2com.net/ip/routeimport/task/21885/',
  167. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',
  168. 'PATH_INFO': u'/ip/routeimport/task/21885/',
  169. 'QUERY_STRING': '',
  170. 'REMOTE_ADDR': '127.0.0.1',
  171. 'REQUEST_METHOD': 'GET',
  172. 'SCRIPT_NAME': u'',
  173. 'SERVER_NAME': '127.0.0.1',
  174. 'SERVER_PORT': '8000',
  175. 'SERVER_PROTOCOL': 'HTTP/1.0',
  176. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x16bc8a0>,
  177. 'wsgi.input': <io.BytesIO object at 0x455c6b0>,
  178. 'wsgi.multiprocess': True,
  179. 'wsgi.multithread': False,
  180. 'wsgi.run_once': False,
  181. 'wsgi.url_scheme': 'http',
  182. 'wsgi.version': (1, 0)}>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement