You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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 aRepresenterError
error.The root cause seems to be that not always failed calls of Fabric's
sudo
return a result with the attributefailed
, which is what VR uses to decide how to handle the result (seeError
class in remote.py).Full stack trace below.
The text was updated successfully, but these errors were encountered: