mirceaulinic/ISalt

Unable to run for minion when minion running on same device as master

luke-orden opened this issue ยท 3 comments

I am running a proxy minion on the same server as I am running the master.

My proxy config file:

master: localhost
pki_dir: /etc/salt/pki/proxy
cachedir: /var/cache/salt/proxy
multiprocessing: False
state_top: salt://top.sls

I see:

$ isalt 
Traceback (most recent call last):
  File "/usr/local/bin/isalt", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/isalt/scripts.py", line 210, in main
    __pillar__ = __salt__['pillar.items']()
  File "/usr/lib/python2.7/dist-packages/salt/modules/pillar.py", line 261, in items
    pillarenv=pillarenv)
  File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 57, in get_pillar
    pillar_override=pillar_override, pillarenv=pillarenv)
  File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 139, in __init__
    self.channel = salt.transport.Channel.factory(opts)
  File "/usr/lib/python2.7/dist-packages/salt/transport/__init__.py", line 53, in factory
    return ReqChannel.factory(opts, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/client.py", line 25, in factory
    sync = SyncWrapper(AsyncReqChannel.factory, (opts,), kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/utils/async.py", line 60, in __init__
    self.async = method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/client.py", line 108, in factory
    return salt.transport.zeromq.AsyncZeroMQReqChannel(opts, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/zeromq.py", line 90, in __new__
    obj.__singleton_init__(opts, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/zeromq.py", line 149, in __singleton_init__
    self.auth = salt.crypt.AsyncAuth(self.opts, io_loop=self._io_loop)
  File "/usr/lib/python2.7/dist-packages/salt/crypt.py", line 375, in __new__
    key = cls.__key(opts)
  File "/usr/lib/python2.7/dist-packages/salt/crypt.py", line 393, in __key
    opts['master_uri'],  # master ID
KeyError: 'master_uri'

It works fine with --master.

I tried to solve this via #2, can you give it a try to check it if works? Thoughts or suggestions, very welcome! ๐Ÿ˜‰

I have commented on the PR. With the suggested fix it seems to work as expected.
Thanks.

Closed via #2.