help with push mode


#1

I have a very simple push example I'm trying to tun, but I get a problem with the mitogen router. Here is the stack trace:

   Cli(Demo())

File "/home/x/.pyenv/versions/opsmop/lib/python3.6/site-packages/opsmop/client/cli.py", line 49, in init
self.go()
File "/home/x/.pyenv/versions/opsmop/lib/python3.6/site-packages/opsmop/client/cli.py", line 129, in go
api.check()
File "/home/x/.pyenv/versions/opsmop/lib/python3.6/site-packages/opsmop/core/api.py", line 63, in check
contexts = executor.check()
File "/home/x/.pyenv/versions/opsmop/lib/python3.6/site-packages/opsmop/core/executor.py", line 76, in check
self.run_all_policies(mode=CHECK)
File "/home/x/.pyenv/versions/opsmop/lib/python3.6/site-packages/opsmop/core/executor.py", line 97, in run_all_policies
self.run_policy(policy=policy)
File "/home/x/.pyenv/versions/opsmop/lib/python3.6/site-packages/opsmop/core/executor.py", line 114, in run_policy
self.process_remote_role(policy, role)
File "/home/x/.pyenv/versions/opsmop/lib/python3.6/site-packages/opsmop/core/executor.py", line 195, in process_remote_role
self.connection_manager.prepare_for_role(role)
File "/home/x/.pyenv/versions/opsmop/lib/python3.6/site-packages/opsmop/push/connections.py", line 71, in prepare_for_role
self.myself = self.router.myself()
AttributeError: 'Router' object has no attribute 'myself'

Any ideas on what could be wrong?


#2

Sounds like you may have an older version of mitogen installed, that was added in very recent git versions.

Can you share the output from "pip freeze" ?


#3

colorama==0.4.1
dill==0.2.8.2
Jinja2==2.10
MarkupSafe==1.1.0
mitogen==0.2.3
opsmop==0.1
PyYAML==4.2b4
toml==0.10.0


#4

Yep, if you can uninstall mitogen and then reinstall ("make requirements" again from an updated "opsmop" checkout), you will get a version from git that contains the code in question.

There are various good things in mitogen master so I'm tracking that, updating periodically if I need something.


#5

That fixed the problem, thanks!