Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while converting errors in uptests #206

Open
ghost opened this issue Sep 9, 2016 · 0 comments
Open

Error while converting errors in uptests #206

ghost opened this issue Sep 9, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 9, 2016

Originally reported by: Anonymous


The uptest task vr.server.tasks.uptest_host can fail in such a way that it returns, as a result, an Exception object.
VR then tries to convert the Exception object to YAML (using yaml.safe_dump) which fails with a RepresenterError error.
The root cause seems to be that not always failed calls of Fabric's sudo return a result with the attribute failed, which is what VR uses to decide how to handle the result (see Error class in remote.py).

Full stack trace below.

#!shell

Traceback (most recent call last):
  File "/app/.heroku/venv/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/app/.heroku/venv/lib/python2.7/site-packages/newrelic-2.68.0.50/newrelic/hooks/application_celery.py", line 84, in wrapper
    return wrapped(*args, **kwargs)
  File "/app/.heroku/venv/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
    return self.run(*args, **kwargs)
  File "/app/.heroku/venv/lib/python2.7/site-packages/vr/server/tasks.py", line 740, in uptest_host
    results=yaml.safe_dump(resultlist)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/__init__.py", line 218, in safe_dump
    return dump_all([data], stream, Dumper=SafeDumper, **kwds)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/__init__.py", line 190, in dump_all
    dumper.represent(data)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/representer.py", line 28, in represent
    node = self.represent_data(data)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/representer.py", line 57, in represent_data
    node = self.yaml_representers[data_types[0]](self, data)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/representer.py", line 215, in represent_list
    return self.represent_sequence(u'tag:yaml.org,2002:seq', data)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/representer.py", line 101, in represent_sequence
    node_item = self.represent_data(item)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/representer.py", line 57, in represent_data
    node = self.yaml_representers[data_types[0]](self, data)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/representer.py", line 223, in represent_dict
    return self.represent_mapping(u'tag:yaml.org,2002:map', data)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/representer.py", line 123, in represent_mapping
    node_value = self.represent_data(item_value)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/representer.py", line 67, in represent_data
    node = self.yaml_representers[None](self, data)
  File "/app/.heroku/venv/lib/python2.7/site-packages/yaml/representer.py", line 247, in represent_undefined
    raise RepresenterError("cannot represent an object: %s" % data)
RepresenterError: cannot represent an object: sudo: unable to send audit message: Operation not permitted

@ghost ghost added major bug labels Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants