When you run varnish commands you can pass in secret like so:
manager.run('ban.url', '^%s' % url, secret=VARNISH_SECRET)
But if you call close it generates a 107 error. That's because it's calling close without a secret and there is no way to pass it in.
def close(self):
self.run('close', threaded=True)
self.servers = ()
Work around is to run
manager.run('close', secret=VARNISH_SECRET)