Skip to content

Commit

Permalink
modprobe rbd if needed (#5377)
Browse files Browse the repository at this point in the history
* modprobe rbd if needed

* unique conf name

* add to base
  • Loading branch information
laverya authored Aug 29, 2024
1 parent 1952208 commit ed61d48
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions addons/rook/1.12.8/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ function rook_pre_init() {
rook_prompt_migrate_from_longhorn

rook_lvm2

rook_modprobe_rbd
}

function rook_post_init() {
Expand Down Expand Up @@ -1146,3 +1148,10 @@ function rook_render_cluster_nodes_tmpl_yaml() {
function rook_patch_cephcluster_nodes() {
kubectl -n rook-ceph patch cephcluster/rook-ceph --type=merge --patch-file="$dst/patches/cluster-nodes.yaml"
}

function rook_modprobe_rbd() {
if ! lsmod | grep rbd; then
modprobe rbd
echo 'rbd' > /etc/modules-load.d/kurl-rook-rbd.conf
fi
}
9 changes: 9 additions & 0 deletions addons/rook/template/base/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ function rook_pre_init() {
rook_prompt_migrate_from_longhorn

rook_lvm2

rook_modprobe_rbd
}

function rook_post_init() {
Expand Down Expand Up @@ -1146,3 +1148,10 @@ function rook_render_cluster_nodes_tmpl_yaml() {
function rook_patch_cephcluster_nodes() {
kubectl -n rook-ceph patch cephcluster/rook-ceph --type=merge --patch-file="$dst/patches/cluster-nodes.yaml"
}

function rook_modprobe_rbd() {
if ! lsmod | grep rbd; then
modprobe rbd
echo 'rbd' > /etc/modules-load.d/kurl-rook-rbd.conf
fi
}

0 comments on commit ed61d48

Please sign in to comment.