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

Making script backward compatible with python2 #8623

Merged

Conversation

aruniiird
Copy link
Contributor

@aruniiird aruniiird commented Aug 31, 2021

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:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Skip Tests for Docs: Add the flag for skipping the build if this is only a documentation change. See here for the flag.
  • Skip Unrelated Tests: Add a flag to run tests for a specific storage provider. See test options.
  • Reviewed the developer guide on Submitting a Pull Request
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.
  • Pending release notes updated with breaking and/or notable changes, if necessary.
  • Upgrade from previous release is tested and upgrade user guide is updated, if necessary.
  • Code generation (make codegen) has been run to update object specifications, if necessary.

Copy link
Member

@leseb leseb left a 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>
@aruniiird aruniiird force-pushed the make-script-backward-compatible-with-python2 branch from bf40801 to 888d4ea Compare August 31, 2021 14:20
Copy link
Member

@travisn travisn left a 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))

@aruniiird
Copy link
Contributor Author

/retest

@aruniiird
Copy link
Contributor Author

Can we do a retest? I highly doubt this failure has anything to do with current change...

Copy link
Member

@travisn travisn left a 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.

@travisn travisn merged commit fc699c2 into rook:master Aug 31, 2021
travisn added a commit that referenced this pull request Aug 31, 2021
Making script backward compatible with python2 (backport #8623)
travisn added a commit that referenced this pull request Aug 31, 2021
Making script backward compatible with python2 (backport #8623)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants