--fail-if-incomplete causes 'TypeError: string indices must be integers'
v.0.7.5 params: '--fail-if-incomplete', '--client', 'local_async', '*', 'test.ping'
outputs:
"{vm1: True}"
"{vm2: True}"
"{vm3: True}"
"{Failed: []}"
And immediately fails with:
Uncaught error (Exception): string indices must be integers
Failes in
__call__
return PepperRetcode().validate(self.cli.options, json.loads(result)['return'])
basically, you have to skip 'Failed': [] in validation
Actually, I belief, that the entire code for poll_for_returns for local_async is broken or I have an extreme bad luck.
I spent the whole day fighting timeouts against 2017.7.x and 2018.3.x
Here in cli.py:
https://github.com/saltstack/pepper/blob/8d6f5bfd71f2412e3ca6904c25044e090b42ba2b/pepper/cli.py#L579
it compares these data:
[u'outputter', u'data'] vs actual names of minions [u'vm1', u'vm2', u'vm3']
which eventually ends up with a timeout failure, error code 1
@zzzuzik are you going to PR your fixes? Issue indeed exists.
Yes, can you please submit a PR, and possibly a test for this?
Thanks, Daniel
Am also facing the same issue
]# pepper --client local_async '*' test.ping -o json --fail-if-incomplete
string indices must be integers
Uncaught Pepper error (increase verbosity for the full traceback).
# pepper --version
0.7.5
Is there a fix available? If so can I have the fixed code to test the same please.
@kk21986 can you check if develop fixes these issues, and if it does, i will get a release out today.
@gtmanfred If you don't mind can you provide me the link to download the develop release?
there is no release, just pip install the develop branch from git.
It worked. Thanks!
Cool, i will try and get a release out today.