-
Notifications
You must be signed in to change notification settings - Fork 634
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
Specifying client count causes error & program exit #75
Comments
Same problem here with latest docker (pykmsorg/py-kms:latest) version running on Unraid |
As a temporary fix for Docker users, you can specify the entrypoint manually (removing the -c flag). I added the following to my docker-compose.yaml: |
Under Unraid OS you can't really manipulate Docker environment the way @libots proposed. What you can do is edit/change environment variables and that's just about it. Right now I got it working in small Debian VM by directly cloning from github and running the python script without the -c flag. I really hope they fix the Dockerfile. |
I added the following to my k8s pykms config to override the ENTRYPOINT.
|
So the issue seems to come down to this sanity check on the input params where it iterates over a concatenated array of input argument values for clientcount, timeoutidle, etc; doing a quick check for null values or data of a wrong type. Lines 397 to 399 in 9d9a363
Sadly, the statement will always evaluate to True and panic out since the datatype of clientcount is a string as specified below instead of an int as expected in the check. Lines 196 to 197 in 9d9a363
Has a conversion from string to int for input arguments been lost recently? These segments of code are multiple months old and I can't think of why they'd work until just recently. |
Hmm, we recently moved to only support Python3 - maybe the old Python2 instance does not had that problem, but since we changed the python version all people are updating their clients and therefore may have found a undiscovered bug. Maybe the used libs changed. But the possibility for that is not very high. |
Old version of py-kms used type=int
really that should be the only change that needs to be done to fix this. I made the edit but someone needs to approve it. We need this fixed asap for docker users. |
Seems to still be an issue with docker - See #80 |
@Dreikasehoch @spitfire Fixed (both in repo and in docker). Please close this issue now. |
The fix looks good, thanks! |
Expected Behavior
When starting pykms_Server.py with the client count flag (either -c or --client-count), the provided client count value should be honored by the application and everything should run as usual.
Actual Behavior
No matter what value is given for client-count, the application writes an error message to console then exits.
e.g. for the case where
-c 30
is given, the application will printargument `-c/--client-count`: invalid with: '30'. Exiting...
This is a tricky problem for Docker users since there's no option to skip the -c flag with the current Dockerfile.
Steps to Reproduce the Problem
/usr/bin/python3 pykms_Server.py :: 1688 -c 30
Specifications
The text was updated successfully, but these errors were encountered: