[
https://issues.apache.org/jira/browse/AURORA-654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14105016#comment-14105016
]
Josh Adams commented on AURORA-654:
-----------------------------------
Figured it out after a lot of digging through pantsbuild src and a healthy dose
of {{strace -f}} and {{./pants goal binary -ldebug ...}}. In order to get
{{./pants goal ...}} working we had patched in our own {{pants.ini}}. Seems
that we were setting {{thrift-gen.python.gen}} to {{py:newstyle}} when it
should have been set to {{py:new_style}} (ughhhh). I also discovered why the
underscores were appearing in the wheel and not in the src. In
https://github.com/pantsbuild/pants I found two entry points for doing Thrift
codegen:
{noformat}
src/python/pants/backend/python/thrift_builder.py: po =
subprocess.Popen(args, cwd=self.chroot.path())
src/python/pants/backend/codegen/tasks/apache_thrift_gen.py:
sessions.append(self.ThriftSession(outdir, cmd, subprocess.Popen(cmd))
{noformat}
Just a note that anyone doing py Thrift codegen may get bitten by something
like I did since there are two completely independent codepaths (one of which
uses the {{pants.ini}} setting as the argument to {{--gen}} and the other
doesn't!). The entry point in {{thrift_builder.py}} also goes one step further
and runs a cleanup function {{_modify_thrift}} to remedy any namespace
collisions (builtins and such) between the native Thrift and what will become
Python code so the two gens *can* produce different results, but won't
necessarily.
Sorry for the extra brain teaser and thanks for looking at it with me.
Cheers,
Josh
> "Could not deserialize AssignedTask" from thermos_executor.pex
> --------------------------------------------------------------
>
> Key: AURORA-654
> URL: https://issues.apache.org/jira/browse/AURORA-654
> Project: Aurora
> Issue Type: Bug
> Components: Executor
> Environment: CentOS 6.4 on x86_64 hardware
> Reporter: Josh Adams
>
> We're seeing the following error when attempting to run a new task after
> upgrading to incubator-aurora@8d98542 and mesos@dc0b7bf (0.19.1-rc1):
> {code}
> WARNING: Logging before InitGoogleLogging() is written to STDERR
> I0813 00:57:40.229567 10732 exec.cpp:131] Version: 0.19.1
> I0813 00:57:40.231796 10761 exec.cpp:205] Executor registered on slave
> 20140812-235601-84869386-5050-469-0
> FATAL] Could not deserialize AssignedTask
> FATAL] Traceback (most recent call last):
> File "apache/aurora/executor/aurora_executor.py", line 234, in validate_task
> assigned_task = assigned_task_from_mesos_task(task)
> File "apache/aurora/executor/common/task_info.py", line 32, in
> assigned_task_from_mesos_task
> assigned_task = thrift_deserialize(AssignedTask(), task.data)
> File
> "/root/.pex/install/thrift-0.9.1-cp27-none-linux_x86_64.whl.5554a00a49bd3c9d0ed12679fbf9a9810c343ed1/thrift-0.9.1-cp27-none-linux_x86_64.whl/thrift/TSerialization.py",
> line 37, in deserialize
> base.read(protocol)
> File "gen/apache/aurora/api/ttypes.py", line 2841, in read
> self.task.read(iprot)
> File "gen/apache/aurora/api/ttypes.py", line 1678, in read
> self.constraints.add(_elem26)
> TypeError: unhashable instance
> {code}
> We are upgrading to get the Announcer implementation working. Here's a simple
> task config that has no {{constraints}} and still produces the error (we
> haven't been able to generate a {{.aurora}} config that doesn't result in
> this exception.
> {code}
> drag_proc_0 = Process(
> name = 'drag_proc_0',
> cmdline = """
> while sleep 1; do date; done
> """
> )
> drag_task = Task(
> processes = [drag_proc_0],
> resources = Resources(cpu = 0.5, ram = 1*GB, disk = 1*GB)
> )
> jobs = [
> Service(
> task = drag_task,
> cluster = 'staging',
> role = 'produser',
> environment = 'staging',
> name = 'drag',
> instances = 1,
> update_config = UpdateConfig(batch_size = 1, watch_secs = 345,
> rollback_on_failure = False, max_per_shard_failures = 3),
> )
> ]
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)