r/openstack • u/coolviolet17 • Feb 08 '25
Masakari-openstack with ceph
Has anyone tried masakari with ceph?
When a vm is recovered by masakari, then the os gets corrupted when the disk is backed by ceph but works fine when lvm is used, I am guessing ceph lock on dick is causing this.
does anyone have any experience?
7
Upvotes
View all comments
1
u/coolviolet17 Feb 13 '25
Since this is more of a host failure issue rather than a Nova migration problem, I was thinking of focusing on Ceph-side optimizations and automation :
commands for Ceph cluster:
ceph config set client rbd_skip_partial_discard true ceph config set client rbd_persistent_cache_mode writeback ceph config set client rbd_cache_max_dirty 134217728 # 128MB write cache ceph config set client rbd_cache_target_dirty_ratio 0.3
These settings ensure that:
Ceph doesn’t discard partial object maps, reducing corruption risk.
The cache is optimized for better resilience during host failures.
2. Automate Object Map Rebuild in Cephadm
Since you're using Cephadm in Docker, we’ll set up a cronjob inside the Cephadm container.
cephadm shell
2. Edit the crontab:
crontab -e
3. Add this cronjob (runs every 5 minutes):
*/5 * * * * for vol in $(rbd ls volumes); do if ! rbd status volumes/$vol | grep -q "Watchers:"; then rbd object-map rebuild volumes/$vol; fi; done
This checks every 5 minutes for orphaned RBD volumes.
If a volume has no active watchers (no host attached to it), it rebuilds the object map.
It ensures only problematic volumes are fixed, preventing unnecessary writes.
4. Save and exit, then confirm the cronjob is set:
crontab -l