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
luminous: tools: ceph-disk: platform.linux_distribution() is deprecated; stop using it #27557
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit introduces a new function, _extract_from_os_release, which is used (only on Linux) to extract the ID and VERSION_ID fields from the /etc/os-release file. This is sufficient to positively determine the OS and version on these systems, and enable ceph-detect-init to correctly return systemd on them. The commit includes unit tests asserting that _extract_from_os_release really extracts the strings that we expect it to, using the contents of /etc/os-release from a number of different operating systems targeted by Ceph. This commit is not cherry-picked because ceph-detect-init has been dropped in master. Fixes: http://tracker.ceph.com/issues/18163 Signed-off-by: Nathan Cutler <ncutler@suse.com> (cherry picked from commit 12d94ca)
SUSE Linux Enterprise (SLE) comes in two variants: SLES (for servers) and SLED (for desktops). This commit adds support for the desktop variant as well as adding test cases for SLE 15. This commit is not cherry-picked because ceph-detect-init has been dropped in master. References: http://tracker.ceph.com/issues/18163 Signed-off-by: Nathan Cutler <ncutler@suse.com> (cherry picked from commit 07bff85)
12d94ca introduced a regression in that it started returning '' as the codename for most supported distros, and also (apparently) changed the distro string returned on Red Hat Enterprise Linux (to "rhel"). As a result, ceph-detect-init began throwing an UnsupportedPlatform exception on RHEL. Can not be cherry-picked because ceph-disk and ceph-detect-init are no longer present in master. Fixes: 12d94ca Fixes: http://tracker.ceph.com/issues/18163 Signed-off-by: Nathan Cutler <ncutler@suse.com> (cherry picked from commit 81b7cd9)
With the move to OVH and the addition of RHEL as a supported distro, the ceph-disk/basic suite was no longer green. This commit brings it back into a green state. Also, although ceph-disk/basic presumably exercises ceph-detect-init, it seemed prudent to add a test case that runs it explicitly. Can not be cherry-picked because ceph-disk and ceph-detect-init are no longer present in master. Reverts: 230c030 Fixes: https://tracker.ceph.com/issues/25031 Signed-off-by: Nathan Cutler <ncutler@suse.com> (cherry picked from commit 6bbeb44) Conflicts: qa/workunits/ceph-disk/ceph-disk.sh - luminous does not have 3aae5ca so we leave the shebang as it is
This has baked in mimic for quite some time now. |
tserong
approved these changes
Apr 16, 2019
tchaikov
approved these changes
Apr 16, 2019
|
jenkins test make check |
smithfarm
changed the title
luminous: platform.linux_distribution() is deprecated; stop using it
luminous: tools: ceph-disk: platform.linux_distribution() is deprecated; stop using it
Oct 2, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
http://tracker.ceph.com/issues/39277