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

ceph-detect-init: fix py3 test #7025

Merged
1 commit merged into from Dec 23, 2015
Merged

Conversation

tchaikov
Copy link
Contributor

  • in python3, None can not be compared with a str. and
    we should always set codename with a non empty str, so update
    TestCephDetectInit.test_debian so it always set a code name.
    and assert(codename and distroname) in choose_init().
  • and debian switched its default init system to systemd in
    jessie, see
    https://lists.debian.org/debian-ctte/2014/02/msg00405.html
  • and add a test for unsupported debian distro

Signed-off-by: Kefu Chai kchai@redhat.com

@tchaikov tchaikov assigned ghost Dec 23, 2015
@ghost
Copy link

ghost commented Dec 23, 2015

@tchaikov the purpose of ceph-detect-init is to return the init system supported by Ceph for a given distribution. Even though jessie switched to systemd, I'm not sure we have tests that run and verify it works. I think we should keep it to sysvinit until we do. Otherwise people running jessie will suddenly have a mixture of systemd / sysvinit, if running an infernalis OSD and a jewel OSD.

Unless there is something I'm not seeing, I think best to stick to sysvinit for jessie and plan a switch to systemd for the next debian version.

This choice can be overritten by the sysadmin who deliberately want to switch to systemd.

* in python3, None can not be compared with a str. and
  we should always set codename with a non empty str, so update
  TestCephDetectInit.test_debian so it always set a code name.
  and assert(codename and distroname) in choose_init().

Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov
Copy link
Contributor Author

@dachary jessie related changes reverted.

ghost pushed a commit that referenced this pull request Dec 23, 2015
ceph-detect-init: fix py3 test

Reviewed-by: Loic Dachary <ldachary@redhat.com>
@ghost ghost merged commit bea2e10 into ceph:master Dec 23, 2015
@tchaikov tchaikov deleted the wip-ceph-detect-init-py3 branch December 23, 2015 11:17
HeyoQiang pushed a commit to HeyoQiang/ceph that referenced this pull request Dec 29, 2015
ceph-detect-init: fix py3 test

Reviewed-by: Loic Dachary <ldachary@redhat.com>
@ghost ghost added the core label Feb 15, 2016
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant