Skip to content

Commit

Permalink
Add interfaces: rbd kernel module and support
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Sabaini <[email protected]>
  • Loading branch information
sabaini committed Aug 28, 2024
1 parent 2d07d2f commit 765aa72
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
12 changes: 12 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ description: |-
confinement: strict

plugs:
load-rbd:
interface: kernel-module-load
modules:
- name: rbd
load: on-boot

slots:
ceph-conf:
interface: content
Expand Down Expand Up @@ -47,6 +54,7 @@ apps:
- mount-observe
- network
- network-bind
- microceph-support
slots:
- microceph
mds:
Expand Down Expand Up @@ -84,6 +92,7 @@ apps:
- hardware-observe
- network
- network-bind
- microceph-support

rgw:
command: commands/rgw.start
Expand Down Expand Up @@ -115,6 +124,9 @@ apps:
command: commands/rbd
plugs:
- network
- network-bind
- microceph-support
- dm-crypt
rados:
command: commands/rados
plugs:
Expand Down
9 changes: 8 additions & 1 deletion tests/scripts/actionutils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ function install_microceph() {
sudo snap connect microceph:hardware-observe
sudo snap connect microceph:mount-observe
# defer dm-crypt enablement for later.
sudo snap connect microceph:load-rbd
sudo snap connect microceph:microceph-support
sudo snap connect microceph:network-bind

sudo microceph cluster bootstrap
sudo microceph.ceph version
Expand All @@ -43,14 +46,18 @@ function create_loop_devices() {
# create well-known names
sudo mknod -m 0660 "/dev/sdi${l}" b 7 "${minor}"
done
# Set up a lvm vol on /dev/sdic
pvcreate /dev/sdic
vgcreate vgtst /dev/sdic
lvcreate -l100%FREE --name lvtst vgtst
}

function add_encrypted_osds() {
# Enable dm-crypt connection and restart microceph daemon
sudo snap connect microceph:dm-crypt
sudo snap restart microceph.daemon
create_loop_devices
sudo microceph disk add /dev/sdia /dev/sdib /dev/sdic --wipe --encrypt
sudo microceph disk add /dev/sdia /dev/sdib /dev/vgtst/lvtst --wipe --encrypt

# Wait for OSDs to become up
sleep 30
Expand Down

0 comments on commit 765aa72

Please sign in to comment.