diff --git a/salt/metaproxy/deltaproxy.py b/salt/metaproxy/deltaproxy.py index cb2b8e2c9a09..b2c3c053e9d5 100644 --- a/salt/metaproxy/deltaproxy.py +++ b/salt/metaproxy/deltaproxy.py @@ -463,6 +463,12 @@ async def subproxy_post_master_init(minion_id, uid, opts, main_proxy, main_utils ) _proxy_minion = ProxyMinion(proxyopts) + # Sub-proxies never run connect_master, so self.tok + # is never set by the usual master-connection path. + # Initialize to None to prevent AttributeError in + # paths that reference self.tok. The tok is + # regenerated by the channel layer on send anyway. + _proxy_minion.tok = None _proxy_minion.proc_dir = salt.minion.get_proc_dir(proxyopts["cachedir"], uid=uid) # And load the modules