]> git.apps.os.sepia.ceph.com Git - teuthology.git/commit
install: drop purge_data and related code 1300/head
authorNathan Cutler <ncutler@suse.com>
Wed, 10 Jul 2019 09:20:33 +0000 (11:20 +0200)
committerNathan Cutler <ncutler@suse.com>
Wed, 28 Aug 2019 07:18:02 +0000 (09:18 +0200)
commit0657234232c5642c801399138e5beee26e29ea20
treef5c4ee3c82cbcaa1526214d267ac1981fc8976fa
parent0c4f5c7a9a884658fae8fc0be63e32830464d00c
install: drop purge_data and related code

purge_data was used to remove any Ceph daemon metadata remaining after the
teardown phase of the install task runs. In particular, the ceph task was
known to leave OSD metadata behind in the OSD directories under /var/lib/ceph.

While the install task causes the ceph-osd package to be installed and creates
directories under /var/lib/ceph, it is the ceph task that actually
populates these directories. Thus, their "unpopulation" should be
implemented in the ceph task, and not here in the install task.

(If the directories were empty after the ceph task teardown phase, they would be
removed when the install task removes the ceph-osd package from the system. But
the package management tool refuses to remove them when they contain files not
owned by a package.)

Not running purge_data during the teardown phase of the install task makes it
easier to implement alternative deployment tasks (i.e. tests that deploy Ceph
clusters, but do not call ceph.py).

In the final analysis, however, this code is no longer needed now that all test
nodes (virtual and bare metal) are reimaged between runs.

This commit does not move purge_data into the ceph task because the author felt
that the ceph task should take more care to clean up after itself. For example,
nowadays there are ceph CLI commands for removing OSDs.

Aside: this commit also drops two lines of dead code that flake8 was
complaining about.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
teuthology/task/install/__init__.py
teuthology/task/install/rpm.py