cli: Remove images of a deleted pool without their data #189
Open
koolkhel
wants to merge 3 commits from
koolkhel/vitastor:rm-image-deleted-pool into master
pull from: koolkhel/vitastor:rm-image-deleted-pool
merge into: vitalif:master
vitalif:master
vitalif:primary-stickiness
vitalif:libvfn
vitalif:canceling
vitalif:immediate-repeering
vitalif:rdma-close-tcp
vitalif:use-degraded-writes
vitalif:fix-write-delete-flow
vitalif:openssl-3.0.12
vitalif:openssl-capture-secrets
vitalif:ignore-small-rdma-end
vitalif:encrypt-batch
vitalif:faster-peering-calc
vitalif:http-hello
vitalif:xxh3-bench
vitalif:create-user-etcd-based
vitalif:aesxts_streaming_nosupport
vitalif:refactor-heap-continue-write
vitalif:ston3lu-patch-0127
vitalif:rdma-credits
vitalif:heap-meta
vitalif:sendmsg-zc-no-more-error
vitalif:fix-clear-refs
vitalif:veeam-trick
vitalif:test-etcd-schizo
vitalif:test
vitalif:test1
vitalif:test2
vitalif:cow-meta
vitalif:kv-readahead
vitalif:qemu-fix-crash-idea
vitalif:eventloop-auto-init-trigger
vitalif:hugo-docs
vitalif:node-mutex-and-postpone
vitalif:check-writeback
vitalif:msgr-iothreads-v2
vitalif:antietcd
vitalif:rel-1.4
vitalif:test-fix-ec-unknown-state-51
vitalif:kv-update
vitalif:kv-debug
vitalif:hotfix-1.2.0
vitalif:rdma-simple-nodp
vitalif:zerocopy-tcp-send
vitalif:csi-staging
vitalif:hotfix-1.1.0
vitalif:hotfix-1.0.0
vitalif:fsync-feedback
vitalif:cached-reads
vitalif:qemu-send-loop
vitalif:test-double-alloc
vitalif:hier-failure-domains
vitalif:mon-self-restart
vitalif:epoch-deletions
vitalif:rdma-flow-control
vitalif:csi-use-vitastor-cli
vitalif:rdma-v2
vitalif:etcd-hide-base64
vitalif:lrc-matrix
vitalif:rm-left-on-dead
vitalif:nfs-proxy-old
vitalif:non-odp-rdma
vitalif:test-zctr
vitalif:separate-data-connections
vitalif:sec_osd_msgr
vitalif:test-assert
vitalif:nbd-vmsplice
vitalif:allow-etcd-address-option
vitalif:rdma-zerocopy
vitalif:rel-0.5
vitalif:openonload
vitalif:sync-io-test
vitalif:trace-sync
vitalif:trace-sqes
vitalif:test-submit-and-wait
vitalif:test-sq-poll
vitalif:blocking-uring-test
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "koolkhel/vitastor:rm-image-deleted-pool"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
rm-pool --force leaves the pool's images in /config/inode, and rm could never remove them: it marked the image deleted and then failed with "Pool does not exist", or hung while the monitor was still removing the pool's PGs, because the pool stays in pool_config with exists=false until then.
Remove a layer without its data when its pool is missing from /config/pools. The pool IDs present there are tracked in
etcd_state_client_t::pools_in_config, becauseexistsis also false for a pool that is listed but fails validation (for example, a configuration written by a newer version): such a pool keeps its images, and rm refuses as before. Removing layers with children in a deleted pool is refused with a clear error, since merging needs their data (the CLI crashed on the missing pool there). rm-data treats a pool with exists=false as missing, so it does not wait for PGs of a deleted pool.Found: seen on a test cluster: after
rm-pool --forceon a pool with an image,rmof the image failed with "Pool does not exist" every time and the image stayed inlswith the deleted flag. Reproduced on master by the new test, wherermhangs while the PGs of the deleted pool are still in /pg/config.Tested: tests/test_rm_deleted_pool.sh (fails on master, passes with the fix; its invalid-configuration step also fails without the second commit)
Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.