Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--fail-if-incomplete causes 'TypeError: string indices must be integers' #180

Open
zzzuzik opened this issue Dec 20, 2018 · 10 comments
Open
Labels
Milestone

Comments

@zzzuzik
Copy link

zzzuzik commented Dec 20, 2018

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'])

@zzzuzik
Copy link
Author

zzzuzik commented Dec 20, 2018

basically, you have to skip 'Failed': [] in validation

@zzzuzik
Copy link
Author

zzzuzik commented Dec 21, 2018

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:

if set(ret_nodes) == set(nodes):

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

@andrii-rymar
Copy link

@zzzuzik are you going to PR your fixes? Issue indeed exists.

@gtmanfred
Copy link
Contributor

Yes, can you please submit a PR, and possibly a test for this?

Thanks,
Daniel

@gtmanfred gtmanfred added the bug label Feb 8, 2019
@gtmanfred gtmanfred added this to the Approved milestone Feb 8, 2019
@kk21986
Copy link

kk21986 commented Jul 3, 2019

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.

@gtmanfred
Copy link
Contributor

@kk21986 can you check if develop fixes these issues, and if it does, i will get a release out today.

@kk21986
Copy link

kk21986 commented Jul 3, 2019

@gtmanfred If you don't mind can you provide me the link to download the develop release?

@gtmanfred
Copy link
Contributor

there is no release, just pip install the develop branch from git.

@kk21986
Copy link

kk21986 commented Jul 3, 2019

It worked. Thanks!

@gtmanfred
Copy link
Contributor

Cool, i will try and get a release out today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants