hue 3.9.0提交coordinator bug

hue 3.9.0提交coordinator bug

janice No Comment
未分类

errorLog:

response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py”, line 371, in inner
return func(*args, **kwargs)
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/apps/oozie/src/oozie/decorators.py”, line 113, in decorate
return view_func(request, *args, **kwargs)
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/apps/oozie/src/oozie/decorators.py”, line 75, in decorate
return view_func(request, *args, **kwargs)
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/apps/oozie/src/oozie/views/editor2.py”, line 674, in submit_coordinator
job_id = _submit_coordinator(request, coordinator, mapping)
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/apps/oozie/src/oozie/views/editor2.py”, line 700, in _submit_coordinator
wf_dir = Submission(request.user, wf, request.fs, request.jt, mapping, local_tz=coordinator.data[‘properties’][‘timezone’]).deploy()
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/desktop/libs/liboozie/src/liboozie/submission2.py”, line 298, in deploy
oozie_xml = self.job.to_xml(self.properties)
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/apps/oozie/src/oozie/models2.py”, line 468, in to_xml
‘workflow_mapping’: workflow_mapping
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/desktop/core/src/desktop/lib/django_mako.py”, line 114, in render_to_string_normal
result = template.render(**data_dict)
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/template.py”, line 443, in render
return runtime._render(self, self.callable_, args, data)
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py”, line 786, in _render
**_kwargs_for_callable(callable_, data))
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py”, line 818, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py”, line 844, in _exec_template
callable_(context, *args, **kwargs)
File “/tmp/tmpo3mDmS/oozie/editor2/gen/workflow.xml.mako.py”, line 110, in render_body
__M_writer( node.to_xml(mapping, node_mapping, workflow_mapping) )
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/apps/oozie/src/oozie/models2.py”, line 860, in to_xml
notebook = Notebook(document=Document2.objects.get_by_uuid(user=self.user, uuid=self.data[‘properties’][‘uuid’]))
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/desktop/core/src/desktop/models.py”, line 975, in get_by_uuid
latest_doc.can_read_or_exception(user)
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/desktop/core/src/desktop/models.py”, line 1305, in can_read_or_exception
if self.can_read(user):
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/desktop/core/src/desktop/models.py”, line 1301, in can_read
has_read_permissions = perm.user_has_access(user) if perm else False
File “/opt/cloudera/parcels/CDH-5.15.0-1.cdh5.15.0.p0.21/lib/hue/desktop/core/src/desktop/models.py”, line 1540, in user_has_access
return self.groups.filter(id__in=user.groups.all()).exists() or user in self.users.all()
AttributeError: ‘NoneType’ object has no attribute ‘groups’


lib/hue/apps/oozie/src/oozie/models2.py

第3404  以及 3409行,创建Workflow的时候没有传入user.导致验证失败.

修改源码

wf = Workflow(data=wf_doc.data, user=self.document.owner)


在添加sqoop任务的时候,单引号会出问题.用双引号.

发表评论

分类目录

关于我

 Janice 詹

QQ   455899417

janice2014@foxmail.com