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
Making script backward compatible with python2 #8623
Making script backward compatible with python2 #8623
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the commit title and add a commit message. Otherwise LGTM
Variable name `exec`, was raising an error with python2. Renamed it to `execErr`. Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
bf40801
to
888d4ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the external cluster test script is failing:
+ timeout 10 sh -c 'until kubectl -n rook-ceph exec rook-ceph-tools-78cdfd976c-g84kv -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool; do echo '\''waiting for script to succeed'\'' && sleep 1; done'
</html>Execution Failed: unable to connect to endpoint: 172.17.0.8:9283
Traceback (most recent call last):
File "/etc/ceph/create-external-cluster-resources.py", line 907, in <module>
raise err
File "/etc/ceph/create-external-cluster-resources.py", line 904, in <module>
rjObj.main()
File "/etc/ceph/create-external-cluster-resources.py", line 885, in main
generated_output = self.gen_json_out()
File "/etc/ceph/create-external-cluster-resources.py", line 691, in gen_json_out
self._gen_output_map()
File "/etc/ceph/create-external-cluster-resources.py", line 672, in _gen_output_map
self.out_map['MONITORING_ENDPOINT_PORT'] = self.get_active_and_standby_mgrs()
File "/etc/ceph/create-external-cluster-resources.py", line 422, in get_active_and_standby_mgrs
self.endpoint_dial(monitoring_endpoint)
File "/etc/ceph/create-external-cluster-resources.py", line 267, in endpoint_dial
"unable to connect to endpoint: {}".format(endpoint_str))
/retest |
Can we do a retest? I highly doubt this failure has anything to do with current change... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rerunning the CI did not repro the error, and the error was also seen in a separate run from this PR, so it is unrelated.
Making script backward compatible with python2 (backport #8623)
Making script backward compatible with python2 (backport #8623)
Signed-off-by: Arun Kumar Mohan amohan@redhat.com
Description of your changes:
As
exec
is an internal builtin function for python2 there were some errors thrown while running the script with python2.Changed the variable name to
execErr
.Which issue is resolved by this Pull Request:
Resolves #
Checklist:
make codegen
) has been run to update object specifications, if necessary.