mirror of
https://github.com/ceph/ceph
synced 2025-04-01 23:02:17 +00:00
*: remove legacy ceph_volume_client.py library
This library is obsolete with the mgr volumes plugin since Nautilus. The last remaining user of this library was Manila which will be using the volumes plugin with Pacific and onwards. Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
parent
ed34006083
commit
a3db265ad5
.github
PendingReleaseNotesceph.spec.indebian
qa
src/pybind
1
.github/labeler.yml
vendored
1
.github/labeler.yml
vendored
@ -164,7 +164,6 @@ cephfs:
|
||||
- src/mds/**
|
||||
- src/mon/MDSMonitor.*
|
||||
- src/mon/FSCommands.*
|
||||
- src/pybind/ceph_volume_client.py
|
||||
- src/pybind/cephfs/**
|
||||
- src/pybind/mgr/mds_autoscaler/**
|
||||
- src/pybind/mgr/status/**
|
||||
|
@ -50,6 +50,12 @@
|
||||
|
||||
* MGR: progress module can now be turned on/off, using the commands:
|
||||
``ceph progress on`` and ``ceph progress off``.
|
||||
|
||||
* The ceph_volume_client.py library used for manipulating legacy "volumes" in
|
||||
CephFS is removed. All remaining users should use the "fs volume" interface
|
||||
exposed by the ceph-mgr:
|
||||
https://docs.ceph.com/en/latest/cephfs/fs-volumes/
|
||||
|
||||
* An AWS-compliant API: "GetTopicAttributes" was added to replace the existing "GetTopic" API. The new API
|
||||
should be used to fetch information about topics used for bucket notifications.
|
||||
|
||||
|
@ -2156,8 +2156,6 @@ fi
|
||||
%files -n python%{python3_pkgversion}-cephfs
|
||||
%{python3_sitearch}/cephfs.cpython*.so
|
||||
%{python3_sitearch}/cephfs-*.egg-info
|
||||
%{python3_sitelib}/ceph_volume_client.py
|
||||
%{python3_sitelib}/__pycache__/ceph_volume_client.cpython*.py*
|
||||
|
||||
%files -n python%{python3_pkgversion}-ceph-argparse
|
||||
%{python3_sitelib}/ceph_argparse.py
|
||||
|
1
debian/python3-cephfs.install
vendored
1
debian/python3-cephfs.install
vendored
@ -1,3 +1,2 @@
|
||||
usr/lib/python3*/dist-packages/ceph_volume_client.py
|
||||
usr/lib/python3*/dist-packages/cephfs-*.egg-info
|
||||
usr/lib/python3*/dist-packages/cephfs.cpython*.so
|
||||
|
@ -1 +0,0 @@
|
||||
../.qa/
|
@ -1 +0,0 @@
|
||||
../.qa/
|
@ -1 +0,0 @@
|
||||
../../../../../cephfs/objectstore-ec/bluestore-bitmap.yaml
|
@ -1 +0,0 @@
|
||||
../.qa/
|
@ -1,7 +0,0 @@
|
||||
roles:
|
||||
- [mon.a, mon.b, mon.c, mgr.x, mgr.y, mds.a, mds.b, mds.c, osd.0, osd.1, osd.2, osd.3]
|
||||
- [client.0, client.1]
|
||||
openstack:
|
||||
- volumes: # attached to each instance
|
||||
count: 4
|
||||
size: 10 # GB
|
@ -1 +0,0 @@
|
||||
.qa/cephfs/conf/
|
@ -1 +0,0 @@
|
||||
../.qa/
|
@ -1 +0,0 @@
|
||||
.qa/cephfs/overrides/frag_enable.yaml
|
@ -1,5 +0,0 @@
|
||||
overrides:
|
||||
ceph:
|
||||
conf:
|
||||
global:
|
||||
mon pg warn min per osd: 0
|
@ -1 +0,0 @@
|
||||
.qa/cephfs/overrides/whitelist_health.yaml
|
@ -1 +0,0 @@
|
||||
.qa/cephfs/overrides/whitelist_wrongly_marked_down.yaml
|
@ -1 +0,0 @@
|
||||
../.qa/
|
@ -1,39 +0,0 @@
|
||||
meta:
|
||||
- desc: |
|
||||
install ceph/nautilus latest
|
||||
tasks:
|
||||
- install:
|
||||
branch: nautilus #tag: v13.2.8
|
||||
exclude_packages:
|
||||
- librados3
|
||||
- ceph-mgr-dashboard
|
||||
- ceph-mgr-diskprediction-local
|
||||
- ceph-mgr-rook
|
||||
- ceph-mgr-cephadm
|
||||
- cephadm
|
||||
extra_packages: ['librados2']
|
||||
- print: "**** done installing nautilus"
|
||||
- ceph:
|
||||
log-ignorelist:
|
||||
- overall HEALTH_
|
||||
- \(FS_
|
||||
- \(MDS_
|
||||
- \(OSD_
|
||||
- \(MON_DOWN\)
|
||||
- \(CACHE_POOL_
|
||||
- \(POOL_
|
||||
- \(MGR_DOWN\)
|
||||
- \(PG_
|
||||
- \(SMALLER_PGP_NUM\)
|
||||
- Monitor daemon marked osd
|
||||
- Behind on trimming
|
||||
- Manager daemon
|
||||
conf:
|
||||
global:
|
||||
mon warn on pool no app: false
|
||||
ms bind msgr2: false
|
||||
- exec:
|
||||
osd.0:
|
||||
- ceph osd require-osd-release nautilus
|
||||
- ceph osd set-require-min-compat-client nautilus
|
||||
- print: "**** done ceph"
|
@ -1,33 +0,0 @@
|
||||
tasks:
|
||||
- workunit:
|
||||
clients:
|
||||
client.0:
|
||||
- fs/upgrade/volume_client
|
||||
env:
|
||||
ACTION: create
|
||||
- print: "**** fs/volume_client create"
|
||||
- ceph-fuse:
|
||||
client.0:
|
||||
mount_path: /volumes/_nogroup/vol_isolated
|
||||
mountpoint: mnt.0
|
||||
auth_id: vol_data_isolated
|
||||
client.1:
|
||||
mount_path: /volumes/_nogroup/vol_default
|
||||
mountpoint: mnt.1
|
||||
auth_id: vol_default
|
||||
- print: "**** ceph-fuse vol_isolated"
|
||||
- workunit:
|
||||
clients:
|
||||
client.0:
|
||||
- fs/upgrade/volume_client
|
||||
env:
|
||||
ACTION: populate
|
||||
cleanup: false
|
||||
- workunit:
|
||||
clients:
|
||||
client.1:
|
||||
- fs/upgrade/volume_client
|
||||
env:
|
||||
ACTION: populate
|
||||
cleanup: false
|
||||
- print: "**** fs/volume_client populate"
|
@ -1,47 +0,0 @@
|
||||
overrides:
|
||||
ceph:
|
||||
log-ignorelist:
|
||||
- scrub mismatch
|
||||
- ScrubResult
|
||||
- wrongly marked
|
||||
- \(POOL_APP_NOT_ENABLED\)
|
||||
- \(SLOW_OPS\)
|
||||
- overall HEALTH_
|
||||
- \(MON_MSGR2_NOT_ENABLED\)
|
||||
- slow request
|
||||
conf:
|
||||
global:
|
||||
bluestore warn on legacy statfs: false
|
||||
bluestore warn on no per pool omap: false
|
||||
mon:
|
||||
mon warn on osd down out interval zero: false
|
||||
|
||||
tasks:
|
||||
- mds_pre_upgrade:
|
||||
- print: "**** done mds pre-upgrade sequence"
|
||||
- install.upgrade:
|
||||
mon.a:
|
||||
- print: "**** done install.upgrade both hosts"
|
||||
- ceph.restart:
|
||||
daemons: [mon.*, mgr.*]
|
||||
mon-health-to-clog: false
|
||||
wait-for-healthy: false
|
||||
- ceph.healthy:
|
||||
- ceph.restart:
|
||||
daemons: [osd.*]
|
||||
wait-for-healthy: false
|
||||
wait-for-osds-up: true
|
||||
- ceph.stop: [mds.*]
|
||||
- ceph.restart:
|
||||
daemons: [mds.*]
|
||||
wait-for-healthy: false
|
||||
wait-for-osds-up: true
|
||||
- exec:
|
||||
mon.a:
|
||||
- ceph versions
|
||||
- ceph osd dump -f json-pretty
|
||||
- ceph osd require-osd-release octopus
|
||||
- for f in `ceph osd pool ls` ; do ceph osd pool set $f pg_autoscale_mode off ; done
|
||||
#- ceph osd set-require-min-compat-client nautilus
|
||||
- ceph.healthy:
|
||||
- print: "**** done ceph.restart"
|
@ -1,25 +0,0 @@
|
||||
overrides:
|
||||
ceph:
|
||||
log-ignorelist:
|
||||
- missing required features
|
||||
tasks:
|
||||
- exec:
|
||||
mon.a:
|
||||
- ceph fs dump --format=json-pretty
|
||||
- ceph fs volume ls
|
||||
- ceph fs subvolume ls cephfs
|
||||
- workunit:
|
||||
clients:
|
||||
client.0:
|
||||
- fs/upgrade/volume_client
|
||||
env:
|
||||
ACTION: verify
|
||||
cleanup: false
|
||||
- workunit:
|
||||
clients:
|
||||
client.1:
|
||||
- fs/upgrade/volume_client
|
||||
env:
|
||||
ACTION: verify
|
||||
cleanup: false
|
||||
- print: "**** fs/volume_client verify"
|
@ -1 +0,0 @@
|
||||
.qa/distros/all/ubuntu_18.04.yaml
|
@ -1,9 +0,0 @@
|
||||
overrides:
|
||||
ceph:
|
||||
log-ignorelist:
|
||||
- MON_DOWN
|
||||
tasks:
|
||||
- cephfs_test_runner:
|
||||
fail_on_skip: false
|
||||
modules:
|
||||
- tasks.cephfs.test_volume_client
|
File diff suppressed because it is too large
Load Diff
@ -1,110 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
PYTHON="python3"
|
||||
|
||||
function run_payload {
|
||||
local payload="$1"
|
||||
sudo "$PYTHON" <<EOF
|
||||
from __future__ import print_function
|
||||
from ceph_volume_client import CephFSVolumeClient, VolumePath
|
||||
from sys import version_info as sys_version_info
|
||||
from rados import OSError as rados_OSError
|
||||
import logging
|
||||
log = logging.getLogger("ceph_volume_client")
|
||||
log.addHandler(logging.StreamHandler())
|
||||
log.setLevel(logging.DEBUG)
|
||||
vc = CephFSVolumeClient("manila", "/etc/ceph/ceph.conf", "ceph")
|
||||
vc.connect()
|
||||
${payload}
|
||||
vc.disconnect()
|
||||
EOF
|
||||
}
|
||||
|
||||
function import_key {
|
||||
local client="$1"
|
||||
if [ -n "$2" ]; then
|
||||
local keyring="$2"
|
||||
else
|
||||
local keyring="/etc/ceph/ceph.client.${client}.keyring"
|
||||
fi
|
||||
local T=$(mktemp)
|
||||
tee "$T" >&2
|
||||
sudo touch -- "$keyring"
|
||||
sudo ceph-authtool "$keyring" --import-keyring "$T"
|
||||
rm -f -- "$T"
|
||||
}
|
||||
|
||||
function conf_keys {
|
||||
local client="$1"
|
||||
ls /etc/ceph >&2
|
||||
ceph auth get-or-create "client.manila" mds 'allow *' osd 'allow rw' mon 'allow *' | import_key "$client" /etc/ceph/ceph.keyring
|
||||
}
|
||||
|
||||
function create_data_isolated {
|
||||
local PAYLOAD='
|
||||
vp = VolumePath(None, "vol_isolated")
|
||||
vc.create_volume(vp, (1<<33), data_isolated=True)
|
||||
auth_result = vc.authorize(vp, "vol_data_isolated", tenant_id="test")
|
||||
print("[client.vol_data_isolated]\n\tkey = ", auth_result["auth_key"])
|
||||
'
|
||||
|
||||
run_payload "$PAYLOAD" | import_key "vol_data_isolated"
|
||||
}
|
||||
|
||||
function create_default {
|
||||
local PAYLOAD='
|
||||
vp = VolumePath(None, "vol_default")
|
||||
vc.create_volume(vp, (1<<33))
|
||||
auth_result = vc.authorize(vp, "vol_default", tenant_id="test")
|
||||
print("[client.vol_default]\n\tkey = ", auth_result["auth_key"])
|
||||
'
|
||||
run_payload "$PAYLOAD" | import_key "vol_default"
|
||||
}
|
||||
|
||||
function create {
|
||||
create_data_isolated
|
||||
create_default
|
||||
}
|
||||
|
||||
function populate {
|
||||
pwd
|
||||
df -h .
|
||||
ls -l
|
||||
cp -a /usr/bin .
|
||||
}
|
||||
|
||||
function verify_data_isolated {
|
||||
ceph fs subvolume getpath cephfs vol_isolated
|
||||
stat bin
|
||||
ls bin | tail
|
||||
}
|
||||
|
||||
function verify_default {
|
||||
ceph fs subvolume getpath cephfs vol_default
|
||||
stat bin
|
||||
ls bin | tail
|
||||
}
|
||||
|
||||
function verify {
|
||||
diff <(ceph fs subvolume ls cephfs | jq -cS 'sort_by(.name)' | tee /dev/stderr) <(printf '[{"name":"vol_isolated"},{"name":"vol_default"}]' | jq -cS 'sort_by(.name)')
|
||||
verify_data_isolated
|
||||
verify_default
|
||||
}
|
||||
|
||||
function main {
|
||||
if [ "$1" = create ]; then
|
||||
conf_keys
|
||||
create
|
||||
elif [ "$1" = populate ]; then
|
||||
populate
|
||||
elif [ "$1" = verify ]; then
|
||||
# verify (sub)volumes still exist and are configured correctly
|
||||
verify
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
main "$ACTION"
|
@ -39,7 +39,6 @@ execute_process(
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ceph_argparse.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ceph_daemon.py
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/ceph_volume_client.py
|
||||
DESTINATION ${PYTHON3_INSTDIR})
|
||||
|
||||
if(WITH_MGR)
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user