Hello community, here is the log from the commit of package ceph-deploy for openSUSE:Factory checked in at 2017-12-14 11:03:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ceph-deploy (Old) and /work/SRC/openSUSE:Factory/.ceph-deploy.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ceph-deploy" Thu Dec 14 11:03:54 2017 rev:5 rq:556845 version:1.5.39+git.1513226758.616af86 Changes: -------- --- /work/SRC/openSUSE:Factory/ceph-deploy/ceph-deploy.changes 2017-07-12 19:35:37.923517796 +0200 +++ /work/SRC/openSUSE:Factory/.ceph-deploy.new/ceph-deploy.changes 2017-12-14 11:03:58.840795255 +0100 @@ -1,0 +2,17 @@ +Thu Dec 14 04:49:43 UTC 2017 - [email protected] + +- Updated to 1.5.39 (based on 1.5.39-stable upstream branch) + + cli: remove --cluster from the options, but leave 'ceph' as default + + tests: remove tests that validated cluster name + + osd: add --filestore + + tests: test against py35 + + cli: remove unused import + + osd: add missing --filestore flag for prepare + + osd: add filestore flag in the prepare parser + + Support deploy on Debian 9 stretch + + handle package conflicts when upgrading/reinstalling + + python-distribute was merged back into python-setuptools, so there + should be no reason to require both. + + Use /etc/os-release if platform.linux_distribution() empty (bsc#1019088) + +------------------------------------------------------------------- Old: ---- ceph-deploy-1.5.38+git.1499740004.c6666bf.tar.xz New: ---- ceph-deploy-1.5.39+git.1513226758.616af86.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ceph-deploy.spec ++++++ --- /var/tmp/diff_new_pack.NopZon/_old 2017-12-14 11:03:59.896744280 +0100 +++ /var/tmp/diff_new_pack.NopZon/_new 2017-12-14 11:03:59.900744087 +0100 @@ -35,7 +35,7 @@ %endif Name: ceph-deploy -Version: 1.5.38+git.1499740004.c6666bf +Version: 1.5.39+git.1513226758.616af86 Release: 0 Summary: Admin and deploy tool for Ceph License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.NopZon/_old 2017-12-14 11:03:59.932742543 +0100 +++ /var/tmp/diff_new_pack.NopZon/_new 2017-12-14 11:03:59.932742543 +0100 @@ -1,8 +1,8 @@ <services> <service name="tar_scm" mode="disabled"> - <param name="versionformat">1.5.38+git.%ct.%h</param> + <param name="versionformat">1.5.39+git.%ct.%h</param> <param name="url">https://github.com/SUSE/ceph-deploy.git</param> - <param name="revision">distro/suse/v1.5.38</param> + <param name="revision">distro/suse/v1.5.39-stable</param> <param name="filename">ceph-deploy</param> <param name="scm">git</param> </service> ++++++ ceph-deploy-1.5.38+git.1499740004.c6666bf.tar.xz -> ceph-deploy-1.5.39+git.1513226758.616af86.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph-deploy.spec new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph-deploy.spec --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph-deploy.spec 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph-deploy.spec 2017-12-14 05:45:58.000000000 +0100 @@ -11,7 +11,7 @@ # common ################################################################################# Name: ceph-deploy -Version: 1.5.38 +Version: 1.5.39 Release: 0 Summary: Admin and deploy tool for Ceph License: MIT @@ -20,7 +20,6 @@ Source0: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: python-devel -BuildRequires: python-distribute BuildRequires: python-setuptools BuildRequires: python-virtualenv BuildRequires: python-mock @@ -32,7 +31,6 @@ %endif BuildRequires: git Requires: python-argparse -Requires: python-distribute #Requires: lsb-release #Requires: ceph %if 0%{?suse_version} && 0%{?suse_version} <= 1110 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/__init__.py new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/__init__.py --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/__init__.py 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/__init__.py 2017-12-14 05:45:58.000000000 +0100 @@ -1,3 +1,3 @@ -__version__ = '1.5.38' +__version__ = '1.5.39' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/cli.py new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/cli.py --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/cli.py 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/cli.py 2017-12-14 05:45:58.000000000 +0100 @@ -6,7 +6,7 @@ import sys import ceph_deploy -from ceph_deploy import exc, validate +from ceph_deploy import exc from ceph_deploy.util import log from ceph_deploy.util.decorators import catches @@ -69,12 +69,6 @@ help='overwrite an existing conf file on remote host (if present)', ) parser.add_argument( - '--cluster', - metavar='NAME', - help='name of the cluster', - type=validate.alphanumeric, - ) - parser.add_argument( '--ceph-conf', dest='ceph_conf', help='use (or reuse) a given ceph.conf file', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/hosts/__init__.py new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/hosts/__init__.py --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/hosts/__init__.py 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/hosts/__init__.py 2017-12-14 05:45:58.000000000 +0100 @@ -114,7 +114,7 @@ return 'scientific' elif distro.startswith('oracle'): return 'oracle' - elif distro.startswith(('suse', 'opensuse')): + elif distro.startswith(('suse', 'opensuse', 'sles')): return 'suse' elif distro.startswith('centos'): return 'centos' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/hosts/centos/install.py new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/hosts/centos/install.py --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/hosts/centos/install.py 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/hosts/centos/install.py 2017-12-14 05:45:58.000000000 +0100 @@ -78,12 +78,22 @@ elif version_kind == 'testing': url = 'https://download.ceph.com/rpm-testing/{repo}/'.format(repo=repo_part) + # remove any old ceph-release package from prevoius release remoto.process.run( distro.conn, [ - 'rpm', - '-Uvh', - '--replacepkgs', + 'yum', + 'remove', + '-y', + 'ceph-release' + ], + ) + remoto.process.run( + distro.conn, + [ + 'yum', + 'install', + '-y', '{url}noarch/ceph-release-1-0.{dist}.noarch.rpm'.format(url=url, dist=dist), ], ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/hosts/remotes.py new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/hosts/remotes.py --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/hosts/remotes.py 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/hosts/remotes.py 2017-12-14 05:45:58.000000000 +0100 @@ -8,14 +8,19 @@ import shutil import tempfile import platform +import re def platform_information(_linux_distribution=None): """ detect platform information from remote host """ linux_distribution = _linux_distribution or platform.linux_distribution distro, release, codename = linux_distribution() + if not distro: + distro, release, codename = parse_os_release() if not codename and 'debian' in distro.lower(): # this could be an empty string in Debian debian_codenames = { + '10': 'buster', + '9': 'stretch', '8': 'jessie', '7': 'wheezy', '6': 'squeeze', @@ -43,6 +48,34 @@ ) +def parse_os_release(release_path='/etc/os-release'): + """ Extract (distro, release, codename) from /etc/os-release if present """ + release_info = {} + if os.path.isfile(release_path): + for line in open(release_path, 'r').readlines(): + line = line.strip() + if line.startswith('#'): + continue + parts = line.split('=') + if len(parts) != 2: + continue + release_info[parts[0].strip()] = parts[1].strip("\"'\n\t ") + # In theory, we want ID/NAME, VERSION_ID and VERSION_CODENAME (with a + # possible fallback to VERSION on the latter), based on information at: + # https://www.freedesktop.org/software/systemd/man/os-release.html + # However, after reviewing several distros /etc/os-release, getting + # the codename is a bit of a mess. It's usually in parentheses in + # VERSION, with some exceptions. + distro = release_info.get('ID', '') + release = release_info.get('VERSION_ID', '') + codename = release_info.get('UBUNTU_CODENAME', release_info.get('VERSION', '')) + match = re.match(r'^[^(]+ \(([^)]+)\)', codename) + if match: + codename = match.group(1).lower() + if not codename and release_info.get('NAME', '') == 'openSUSE Tumbleweed': + codename = 'tumbleweed' + return (distro, release, codename) + def machine_type(): """ detect machine type """ return platform.machine() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/osd.py new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/osd.py --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/osd.py 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/osd.py 2017-12-14 05:45:58.000000000 +0100 @@ -324,6 +324,8 @@ storetype = None if args.bluestore: storetype = 'bluestore' + if args.filestore: + storetype = 'filestore' prepare_disk( distro.conn, @@ -706,6 +708,11 @@ help='directory where dm-crypt keys are stored', ) osd_create.add_argument( + '--filestore', + action='store_true', default=None, + help='filestore objectstore', + ) + osd_create.add_argument( '--bluestore', action='store_true', default=None, help='bluestore objectstore', @@ -727,12 +734,16 @@ type=colon_separated, help='host and disk to prepare', ) - osd_prepare = osd_parser.add_parser( 'prepare', help='Prepare a disk for use as Ceph OSD by formatting/partitioning disk' ) osd_prepare.add_argument( + '--filestore', + action='store_true', default=None, + help='filestore objectstore', + ) + osd_prepare.add_argument( '--zap-disk', action='store_true', help='destroy existing partition table and content for DISK', @@ -863,6 +874,11 @@ help='bluestore objectstore', ) disk_prepare.add_argument( + '--filestore', + action='store_true', default=None, + help='filestore objectstore', + ) + disk_prepare.add_argument( '--block-db', default=None, help='bluestore block.db path' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/tests/parser/test_main.py new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/tests/parser/test_main.py --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/tests/parser/test_main.py 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/tests/parser/test_main.py 2017-12-14 05:45:58.000000000 +0100 @@ -65,17 +65,6 @@ args = self.parser.parse_args('forgetkeys'.split()) assert args.cluster == 'ceph' - def test_custom_cluster_name(self): - args = self.parser.parse_args('--cluster myhugecluster forgetkeys'.split()) - assert args.cluster == 'myhugecluster' - - def test_custom_cluster_name_bad(self, capsys): - with pytest.raises(SystemExit): - self.parser.parse_args('--cluster=/evil-this-should-not-be-created'.split()) - out, err = capsys.readouterr() - assert ('--cluster: argument must start with a letter and contain only ' - 'letters and numbers') in err - def test_default_ceph_conf_is_none(self): args = self.parser.parse_args('forgetkeys'.split()) assert args.ceph_conf is None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/tests/test_remotes.py new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/tests/test_remotes.py --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/ceph_deploy/tests/test_remotes.py 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/ceph_deploy/tests/test_remotes.py 2017-12-14 05:45:58.000000000 +0100 @@ -1,6 +1,6 @@ from mock import patch from ceph_deploy.hosts import remotes -from ceph_deploy.hosts.remotes import platform_information +from ceph_deploy.hosts.remotes import platform_information, parse_os_release class FakeExists(object): @@ -83,3 +83,154 @@ assert distro == 'Ubuntu' assert release == '12.04' assert codename == 'precise' + +class TestParseOsRelease(object): + """ test various forms of /etc/os-release """ + + def setup(self): + pass + + def test_handles_centos_7(self, tmpdir): + path = str(tmpdir.join('os_release')) + with open(path, 'w') as os_release: + os_release.write(""" +NAME="CentOS Linux" +VERSION="7 (Core)" +ID="centos" +ID_LIKE="rhel fedora" +VERSION_ID="7" +PRETTY_NAME="CentOS Linux 7 (Core)" +ANSI_COLOR="0;31" +CPE_NAME="cpe:/o:centos:centos:7" +HOME_URL="https://www.centos.org/" +BUG_REPORT_URL="https://bugs.centos.org/" + +CENTOS_MANTISBT_PROJECT="CentOS-7" +CENTOS_MANTISBT_PROJECT_VERSION="7" +REDHAT_SUPPORT_PRODUCT="centos" +REDHAT_SUPPORT_PRODUCT_VERSION="7" +""") + distro, release, codename = parse_os_release(path) + assert distro == 'centos' + assert release == '7' + assert codename == 'core' + + + def test_handles_debian_stretch(self, tmpdir): + path = str(tmpdir.join('os_release')) + with open(path, 'w') as os_release: + os_release.write(""" +PRETTY_NAME="Debian GNU/Linux 9 (stretch)" +NAME="Debian GNU/Linux" +VERSION_ID="9" +VERSION="9 (stretch)" +ID=debian +HOME_URL="https://www.debian.org/" +SUPPORT_URL="https://www.debian.org/support" +BUG_REPORT_URL="https://bugs.debian.org/" +""") + distro, release, codename = parse_os_release(path) + assert distro == 'debian' + assert release == '9' + assert codename == 'stretch' + + def test_handles_fedora_26(self, tmpdir): + path = str(tmpdir.join('os_release')) + with open(path, 'w') as os_release: + os_release.write(""" +NAME=Fedora +VERSION="26 (Twenty Six)" +ID=fedora +VERSION_ID=26 +PRETTY_NAME="Fedora 26 (Twenty Six)" +ANSI_COLOR="0;34" +CPE_NAME="cpe:/o:fedoraproject:fedora:26" +HOME_URL="https://fedoraproject.org/" +BUG_REPORT_URL="https://bugzilla.redhat.com/" +REDHAT_BUGZILLA_PRODUCT="Fedora" +REDHAT_BUGZILLA_PRODUCT_VERSION=26 +REDHAT_SUPPORT_PRODUCT="Fedora" +REDHAT_SUPPORT_PRODUCT_VERSION=26 +PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy +""") + distro, release, codename = parse_os_release(path) + assert distro == 'fedora' + assert release == '26' + assert codename == 'twenty six' + + def test_handles_opensuse_leap_42_2(self, tmpdir): + path = str(tmpdir.join('os_release')) + with open(path, 'w') as os_release: + os_release.write(""" +NAME="openSUSE Leap" +VERSION="42.2" +ID=opensuse +ID_LIKE="suse" +VERSION_ID="42.2" +PRETTY_NAME="openSUSE Leap 42.2" +ANSI_COLOR="0;32" +CPE_NAME="cpe:/o:opensuse:leap:42.2" +BUG_REPORT_URL="https://bugs.opensuse.org" +HOME_URL="https://www.opensuse.org/" +""") + distro, release, codename = parse_os_release(path) + assert distro == 'opensuse' + assert release == '42.2' + assert codename == '42.2' + + def test_handles_opensuse_tumbleweed(self, tmpdir): + path = str(tmpdir.join('os_release')) + with open(path, 'w') as os_release: + os_release.write(""" +NAME="openSUSE Tumbleweed" +# VERSION="20170502" +ID=opensuse +ID_LIKE="suse" +VERSION_ID="20170502" +PRETTY_NAME="openSUSE Tumbleweed" +ANSI_COLOR="0;32" +CPE_NAME="cpe:/o:opensuse:tumbleweed:20170502" +BUG_REPORT_URL="https://bugs.opensuse.org" +HOME_URL="https://www.opensuse.org/" +""") + distro, release, codename = parse_os_release(path) + assert distro == 'opensuse' + assert release == '20170502' + assert codename == 'tumbleweed' + + def test_handles_sles_12_sp3(self, tmpdir): + path = str(tmpdir.join('os_release')) + with open(path, 'w') as os_release: + os_release.write(""" +NAME="SLES" +VERSION="12-SP3" +VERSION_ID="12.3" +PRETTY_NAME="SUSE Linux Enterprise Server 12 SP3" +ID="sles" +ANSI_COLOR="0;32" +CPE_NAME="cpe:/o:suse:sles:12:sp3" +""") + distro, release, codename = parse_os_release(path) + assert distro == 'sles' + assert release == '12.3' + assert codename == '12-SP3' + + def test_handles_ubuntu_xenial(self, tmpdir): + path = str(tmpdir.join('os_release')) + with open(path, 'w') as os_release: + os_release.write(""" +NAME="Ubuntu" +VERSION="16.04 LTS (Xenial Xerus)" +ID=ubuntu +ID_LIKE=debian +PRETTY_NAME="Ubuntu 16.04 LTS" +VERSION_ID="16.04" +HOME_URL="http://www.ubuntu.com/" +SUPPORT_URL="http://help.ubuntu.com/" +BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" +UBUNTU_CODENAME=xenial +""") + distro, release, codename = parse_os_release(path) + assert distro == 'ubuntu' + assert release == '16.04' + assert codename == 'xenial' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/debian/changelog new/ceph-deploy-1.5.39+git.1513226758.616af86/debian/changelog --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/debian/changelog 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/debian/changelog 2017-12-14 05:45:58.000000000 +0100 @@ -1,3 +1,9 @@ +ceph-deploy (1.5.39) stable; urgency=medium + + * New upstream release + + -- Ceph Release Team <[email protected]> Fri, 01 Sep 2017 11:45:54 +0000 + ceph-deploy (1.5.38) stable; urgency=medium * New upstream release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/docs/source/changelog.rst new/ceph-deploy-1.5.39+git.1513226758.616af86/docs/source/changelog.rst --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/docs/source/changelog.rst 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/docs/source/changelog.rst 2017-12-14 05:45:58.000000000 +0100 @@ -4,6 +4,17 @@ 1.5 --- +1.5.39 +^^^^^^ +1-Sep-2017 + +* Remove ``--cluster`` options, default to ``ceph`` always +* Add ``--filestore`` since ``ceph-disk`` defaults to bluestore +* Start testing against Python 3.5 +* Support Debian 9 and 10 intalls +* Better handling on package conflicts when upgrading/re-installing + + 1.5.38 ^^^^^^ 19-May-2017 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ceph-deploy-1.5.38+git.1499740004.c6666bf/tox.ini new/ceph-deploy-1.5.39+git.1513226758.616af86/tox.ini --- old/ceph-deploy-1.5.38+git.1499740004.c6666bf/tox.ini 2017-07-11 04:30:58.000000000 +0200 +++ new/ceph-deploy-1.5.39+git.1513226758.616af86/tox.ini 2017-12-14 05:45:58.000000000 +0100 @@ -1,5 +1,5 @@ [tox] -envlist = py26, py27, py34, flake8 +envlist = py26, py27, py35, flake8 [testenv] deps=
