Advertisement
Guest User

Untitled

a guest
Aug 10th, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.25 KB | None | 0 0
  1. Command '['/usr/local/bin/hg', 'add', u'example.com/100.168.192.in-addr.arpa']' returned non-zero exit status 255
  2. START OF TRACEBACK
  3. ------------------------------------------------------------------------
  4. File: /usr/local/lib/python2.7/subprocess.py (Line: 511)
  5. Function: check_call
  6. 504 check_call(["ls", "-l"])
  7. 505 """
  8. 506 retcode = call(*popenargs, **kwargs)
  9. 507 if retcode:
  10. 508 cmd = kwargs.get("args")
  11. 509 if cmd is None:
  12. 510 cmd = popenargs[0]
  13. 511 ==> raise CalledProcessError(retcode, cmd)
  14. 512 return 0
  15. 513
  16. 514
  17. 515 def check_output(*popenargs, **kwargs):
  18. 516 r"""Run command with arguments and return its output as a byte string.
  19. 517
  20. Variables:
  21. cmd = ['/usr/local/bin/hg', 'add', u'example.com/100.168.192.in-addr.arpa']
  22. retcode = 255
  23. popenargs = (['/usr/local/bin/hg', 'add', u'example.com/100.168.192.in-addr.arpa'],)
  24. kwargs = {'cwd': '/var/repo/dns'}
  25. ------------------------------------------------------------------------
  26. File: /opt/noc/cm/vcs/__init__.py (Line: 81)
  27. Function: cmd
  28. 74 self.cmd(["commit",self.option_commit_message,message,path])
  29. 75 #
  30. 76 # Execute VCS command.
  31. 77 # cmd is a list of arguments
  32. 78 def cmd(self,cmd,check=True):
  33. 79 if check:
  34. 80 self.check_repository()
  35. 81 ==> subprocess.check_call([config.get("cm","vcs_path")]+cmd,cwd=self.repo)
  36. 82 # Returns an output of cmd
  37. 83 def cmd_out(self,cmd,check=True):
  38. 84 if check:
  39. 85 self.check_repository()
  40. 86 p=subprocess.Popen([config.get("cm","vcs_path")]+cmd,stdout=subprocess.PIPE,cwd=self.repo)
  41. 87 d=p.stdout.read()
  42. Variables:
  43. self = <noc.cm.vcs.hg.VCS object at 0x808bbf850>
  44. cmd = ['add', u'example.com/100.168.192.in-addr.arpa']
  45. check = True
  46. ------------------------------------------------------------------------
  47. File: /opt/noc/cm/vcs/__init__.py (Line: 60)
  48. Function: add
  49. 53 self.repo=repo
  50. 54 # Check wrether repository exists and create when necessary
  51. 55 def check_repository(self):
  52. 56 if not os.path.exists(self.repo):
  53. 57 os.makedirs(self.repo)
  54. 58 # Add file to repository
  55. 59 def add(self,path):
  56. 60 ==> self.cmd(["add",path])
  57. 61 # Remove file from repository
  58. 62 def rm(self,path):
  59. 63 self.cmd(["remove",path])
  60. 64 self.commit(path,"rm")
  61. 65 # Move file to a new location
  62. 66 # Dumb emulation
  63. Variables:
  64. path = u'example.com/100.168.192.in-addr.arpa'
  65. self = <noc.cm.vcs.hg.VCS object at 0x808bbf850>
  66. ------------------------------------------------------------------------
  67. File: /opt/noc/cm/models.py (Line: 136)
  68. Function: write
  69. 129 if not in_dir(path, self.repo):
  70. 130 raise Exception("Attempting to write outside of repo")
  71. 131 is_new = not os.path.exists(path)
  72. 132 now = datetime.datetime.now()
  73. 133 if rewrite_when_differ(self.path, data):
  74. 134 vcs = self.vcs
  75. 135 if is_new:
  76. 136 ==> vcs.add(self.repo_path)
  77. 137 vcs.commit(self.repo_path)
  78. 138 self.last_modified = now
  79. 139 self.on_object_changed()
  80. 140 self.last_pull = now
  81. 141 self.save()
  82. 142
  83. Variables:
  84. self = <DNS: dns/example.com/100.168.192.in-addr.arpa>
  85. is_new = True
  86. vcs = <noc.cm.vcs.hg.VCS object at 0x808bbf850>
  87. path = u'/var/repo/dns/example.com/100.168.192.in-addr.arpa'
  88. now = datetime.datetime(2012, 8, 10, 10, 4, 31, 771917)
  89. data = u';;\n;; "..."
  90. ------------------------------------------------------------------------
  91. File: /opt/noc/cm/models.py (Line: 550)
  92. Function: global_pull
  93. 543 for z in changed:
  94. 544 logging.debug("DNS.global_pull: Zone %s changed" % z.name)
  95. 545 z.serial = z.next_serial
  96. 546 z.save()
  97. 547 for ns in z.profile.masters.all():
  98. 548 path = os.path.join(ns.name, z.name)
  99. 549 o = DNS.objects.get(repo_path=path)
  100. 550 ==> o.write(z.zonedata(ns))
  101. 551 for ns in DNSServer.objects.all():
  102. 552 logging.debug(
  103. 553 "DNSHandler.global_pull: Includes for %s rebuilt" % ns.name)
  104. 554 g = ns.generator_class()
  105. 555 path = os.path.join(ns.name, "autozones.conf")
  106. 556 try:
  107. Variables:
  108. z = <DNSZone: 100.168.192.in-addr.arpa>
  109. DNSServer = <class 'noc.dns.models.DNSServer'>
  110. DNSZone = <class 'noc.dns.models.DNSZone'>
  111. changed = {<DNSZone: ... None}
  112. o = <DNS: dns/example.com/100.168.192.in-addr.arpa>
  113. objects = {}
  114. path = u'example.com/100.168.192.in-addr.arpa'
  115. ns = <DNSServer: example.com>
  116. cls = <class 'noc.cm.models.DNS'>
  117. ------------------------------------------------------------------------
  118. File: /opt/noc/cm/periodics/dns_pull.py (Line: 16)
  119. Function: execute
  120. 9
  121. 10 class Task(noc.lib.periodic.Task):
  122. 11 name="cm.dns_pull"
  123. 12 description=""
  124. 13 wait_for=["cm.dns_push"]
  125. 14 def execute(self):
  126. 15 from noc.cm.models import DNS
  127. 16 ==> DNS.global_pull()
  128. 17 return True
  129. 18
  130. Variables:
  131. self = <noc.cm.periodics.dns_pull.Task object at 0x806eea410>
  132. DNS = <class 'noc.cm.models.DNS'>
  133. ------------------------------------------------------------------------
  134. File: /opt/noc/main/scheduler.py (Line: 72)
  135. Function: task_wrapper
  136. 65 t = datetime.datetime.now()
  137. 66 cwd = os.getcwd()
  138. 67 try:
  139. 68 if task.periodic_name.startswith("pyrule:"):
  140. 69 status = PyRule.call(task.periodic_name[7:],
  141. 70 timeout=task.timeout)
  142. 71 else:
  143. 72 ==> status = task.periodic(task.timeout).execute()
  144. 73 except:
  145. 74 error_report()
  146. 75 status = False
  147. 76 logging.info(u"Periodic task=%s status=%s" % (unicode(task),
  148. 77 "completed" if status else "failed"))
  149. 78 # Current path may be implicitly changed by periodic. Restore old value
  150. Variables:
  151. self = <noc.main.scheduler.Scheduler object at 0x8011b9510>
  152. task = <Schedule: cm.dns_pull:Any>
  153. cwd = '/opt/noc'
  154. t = datetime.datetime(2012, 8, 10, 10, 4, 16, 608012)
  155. ------------------------------------------------------------------------
  156. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement