Advertisement
Guest User

Untitled

a guest
May 7th, 2015
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.71 KB | None | 0 0
  1. HTTP/1.1 500 INTERNAL SERVER ERROR
  2. Server: nginx/1.6.2
  3. Date: Thu, 07 May 2015 06:19:16 GMT
  4. Content-Type: text/plain; charset=utf-8
  5. Content-Length: 9470
  6. Connection: keep-alive
  7. Content-Language: en
  8. Expires: 0
  9. Vary: Accept-Language, Cookie
  10. Pragma: no-cache
  11. Cache-Control: no-cache
  12.  
  13. UNHANDLED EXCEPTION (2015-05-07 09:19:16.541411)
  14. BRANCH: develop TIP: c397b9b780df
  15. PROCESS: ./scripts/noc-web.py
  16. ERROR FINGERPRINT: 47753de5-47fb-58b1-8f01-733c56f907a4
  17. WORKING DIRECTORY: /opt/noc
  18. EXCEPTION: <class 'mongoengine.errors.OperationError'> Could not save document (Cannot update 'data.rackmount.side' and 'data.rackmount' at the same time)
  19. START OF TRACEBACK
  20. ------------------------------------------------------------------------
  21. File: lib/python2.7/site-packages/mongoengine/document.py (Line: 367)
  22. Function: save
  23. 360 except pymongo.errors.OperationFailure, err:
  24. 361 message = 'Could not save document (%s)'
  25. 362 if re.match('^E1100[01] duplicate key', unicode(err)):
  26. 363 # E11000 - duplicate key error index
  27. 364 # E11001 - duplicate key on update
  28. 365 message = u'Tried to save duplicate unique keys (%s)'
  29. 366 raise NotUniqueError(message % unicode(err))
  30. 367 ==> raise OperationError(message % unicode(err))
  31. 368 id_field = self._meta['id_field']
  32. 369 if created or id_field not in self._meta.get('shard_key', []):
  33. 370 self[id_field] = self._fields[id_field].to_python(object_id)
  34. 371
  35. 372 signals.post_save.send(self.__class__, document=self, created=created)
  36. 373 self._clear_changed_fields()
  37. Variables:
  38. removals = {}
  39. force_insert = False
  40. write_concern = {'w': 1}
  41. message = 'Could not save document (%s)'
  42. update_query =
  43. {'$set': {'data.rackmount': {'position': 9, 'side': 'f'},
  44. 'data.rackmount.position': 9,
  45. 'data.rackmount.side': 'f'}}
  46. self = <Object: qwe-CR01>
  47. _refs = None
  48. object_id = ObjectId('550acbb8d71f0b5a530fd695')
  49. kwargs = {}
  50. save_condition = None
  51. clean = True
  52. is_new_object = <function is_new_object at 0x6ff3140>
  53. select_dict = {'_id': ObjectId('550acbb8d71f0b5a530fd695')}
  54. collection =
  55. Collection(Database(MongoClient('localhost', 27017), u'noc'), u'noc.objects')
  56. updates =
  57. {'data.rackmount': {'position': 9, 'side': 'f'},
  58. 'data.rackmount.position': 9,
  59. 'data.rackmount.side': 'f'}
  60. validate = True
  61. err =
  62. OperationFailure(u"Cannot update 'data.rackmount.side' and 'data.rackmount' at the same time",)
  63. created = False
  64. doc =
  65. SON([('_id', ObjectId('550acbb8d71f0b5a530fd695')), ('name', u'SP00MSC4-CR01'), ('model', ObjectId('55067820d71f0b4fd7227859')), ('data', {u'management': {u'managed_object': 12}, u'asset': {u'serial': u'111', u'revision': u'V04'}, 'rackmount': {'position': 9, 'side': 'f'}}), ('container', ObjectId('554b037ad71f0b10cf9a2391'))])
  66. shard_key = ()
  67. cascade = None
  68. cascade_kwargs = None
  69. upsert = True
  70. ------------------------------------------------------------------------
  71. File: inv/apps/inv/plugins/rack.py (Line: 79)
  72. Function: api_set_rack_load
  73. 72 o = self.app.get_object_or_404(Object, id=id)
  74. 73 co = self.app.get_object_or_404(Object, id=cid)
  75. 74 if co.container != o.id:
  76. 75 return self.app.response_not_found()
  77. 76 if position_front:
  78. 77 co.set_data("rackmount", "position", position_front)
  79. 78 co.set_data("rackmount", "side", "f")
  80. 79 ==> co.save()
  81. 80 co.log(
  82. 81 "Set rack position to front #%d" % position_front,
  83. 82 user=request.user.username, system="WEB",
  84. 83 op="CHANGE"
  85. 84 )
  86. 85 elif position_rear:
  87. Variables:
  88. position_rear = 0
  89. co = <Object: SP00MSC4-CR01>
  90. cid = '550acbb8d71f0b5a530fd695'
  91. shift = 0
  92. self = <noc.inv.apps.inv.plugins.rack.RackPlugin object at 0x58f0690>
  93. request =
  94. <WSGIRequest
  95. path:/inv/inv/554b037ad71f0b10cf9a2391/plugin/rack/rackload/,
  96. GET:<QueryDict: {}>,
  97. POST:<QueryDict: {u'{"cid":"550acbb8d71f0b5a530fd695","position_front":9,"position_rear":0,"shift":0}': [u'']}>,
  98. COOKIES:{'csrftoken': 'YGvzneuTfIGFmS7UfPEilltKwJHpi1Wn',
  99. 'sessionid': 'c025854d94dcb2e5a9e2102fc4b0e208'},
  100. META:{'CONTENT_LENGTH': '81',
  101. 'CONTENT_TYPE': 'application/json; charset=UTF-8',
  102. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  103. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  104. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',
  105. 'HTTP_CACHE_CONTROL': 'no-cache',
  106. 'HTTP_CONNECTION': 'close',
  107. 'HTTP_COOKIE': 'sessionid=c025854d94dcb2e5a9e2102fc4b0e208; csrftoken=YGvzneuTfIGFmS7UfPEilltKwJHpi1Wn',
  108. 'HTTP_HOST': '10.87.177.58',
  109. 'HTTP_PRAGMA': 'no-cache',
  110. 'HTTP_REFERER': 'http://10.87.177.58/main/desktop/',
  111. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0',
  112. 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
  113. 'HTTP_X_SCHEME': 'http',
  114. 'PATH_INFO': u'/inv/inv/554b037ad71f0b10cf9a2391/plugin/rack/rackload/',
  115. 'QUERY_STRING': '',
  116. 'REMOTE_ADDR': '127.0.0.1',
  117. 'REQUEST_METHOD': 'POST',
  118. 'SCRIPT_NAME': u'',
  119. 'SERVER_NAME': '10.87.177.58',
  120. 'SERVER_PORT': '80',
  121. 'SERVER_PROTOCOL': 'HTTP/1.0',
  122. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2dda1e0>,
  123. 'wsgi.input': <_io.BytesIO object at 0x6fcc0b0>,
  124. 'wsgi.multiprocess': True,
  125. 'wsgi.multithread': False,
  126. 'wsgi.run_once': False,
  127. 'wsgi.url_scheme': 'http',
  128. 'wsgi.version': (1, 0)}>
  129. o = <Object: TEST>
  130. id = u'554b037ad71f0b10cf9a2391'
  131. position_front = 9
  132. ------------------------------------------------------------------------
  133. File: lib/app/site.py (Line: 248)
  134. Function: inner
  135. 241 a = dict((k, v[0] if len(v) == 1 else v)
  136. 242 for k, v in request.GET.lists())
  137. 243 app_logger.debug("API %s %s %s",
  138. 244 request.method, request.path, a)
  139. 245 # Call handler
  140. 246 v.__dict__["hits_metric"] += 1
  141. 247 with v.__dict__["time_metric"].timer():
  142. 248 ==> r = v(request, *args, **kwargs)
  143. 249 # Dump SQL statements
  144. 250 if self.log_sql_statements:
  145. 251 from django.db import connections
  146. 252 tsc = 0
  147. 253 sc = defaultdict(int)
  148. 254 for conn in connections.all():
  149. Variables:
  150. errors = None
  151. view_map = {'POST': <functools.partial object at 0x58f2470>}
  152. Form = <class 'django.forms.forms.Form'>
  153. g =
  154. {'cid': '550acbb8d71f0b5a530fd695',
  155. 'position_front': 9,
  156. 'position_rear': 0,
  157. 'shift': 0}
  158. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  159. kwargs =
  160. {'cid': '550acbb8d71f0b5a530fd695',
  161. 'id': u'554b037ad71f0b10cf9a2391',
  162. 'position_front': 9,
  163. 'position_rear': 0,
  164. 'shift': 0}
  165. self = <noc.lib.app.site.Site object at 0x32cbf50>
  166. to_log_api_call = False
  167. args = ()
  168. request =
  169. <WSGIRequest
  170. path:/inv/inv/554b037ad71f0b10cf9a2391/plugin/rack/rackload/,
  171. GET:<QueryDict: {}>,
  172. POST:<QueryDict: {u'{"cid":"550acbb8d71f0b5a530fd695","position_front":9,"position_rear":0,"shift":0}': [u'']}>,
  173. COOKIES:{'csrftoken': 'YGvzneuTfIGFmS7UfPEilltKwJHpi1Wn',
  174. 'sessionid': 'c025854d94dcb2e5a9e2102fc4b0e208'},
  175. META:{'CONTENT_LENGTH': '81',
  176. 'CONTENT_TYPE': 'application/json; charset=UTF-8',
  177. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  178. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  179. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',
  180. 'HTTP_CACHE_CONTROL': 'no-cache',
  181. 'HTTP_CONNECTION': 'close',
  182. 'HTTP_COOKIE': 'sessionid=c025854d94dcb2e5a9e2102fc4b0e208; csrftoken=YGvzneuTfIGFmS7UfPEilltKwJHpi1Wn',
  183. 'HTTP_HOST': '10.87.177.58',
  184. 'HTTP_PRAGMA': 'no-cache',
  185. 'HTTP_REFERER': 'http://10.87.177.58/main/desktop/',
  186. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0',
  187. 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest',
  188. 'HTTP_X_SCHEME': 'http',
  189. 'PATH_INFO': u'/inv/inv/554b037ad71f0b10cf9a2391/plugin/rack/rackload/',
  190. 'QUERY_STRING': '',
  191. 'REMOTE_ADDR': '127.0.0.1',
  192. 'REQUEST_METHOD': 'POST',
  193. 'SCRIPT_NAME': u'',
  194. 'SERVER_NAME': '10.87.177.58',
  195. 'SERVER_PORT': '80',
  196. 'SERVER_PROTOCOL': 'HTTP/1.0',
  197. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x2dda1e0>,
  198. 'wsgi.input': <_io.BytesIO object at 0x6fcc0b0>,
  199. 'wsgi.multiprocess': True,
  200. 'wsgi.multithread': False,
  201. 'wsgi.run_once': False,
  202. 'wsgi.url_scheme': 'http',
  203. 'wsgi.version': (1, 0)}>
  204. app_logger = <logging.Logger object at 0x58f06d0>
  205. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  206. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  207. v = <functools.partial object at 0x58f2470>
  208. nq = <function nq at 0x6ff3050>
  209. app = <noc.inv.apps.inv.views.InvApplication object at 0x586e9d0>
  210. ct = 'application/json; charset=UTF-8'
  211. ------------------------------------------------------------------------
  212. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement