Closed Franco-Sparrow closed 2 months ago
Updating datastore info. I mixed the ourput of another cluster which was not using ceph.
DATASTORE 1 INFORMATION
ID : 1
NAME : images-hdd
USER : oneadmin
GROUP : oneadmin
CLUSTERS : 0,100
TYPE : IMAGE
DS_MAD : ceph
TM_MAD : ceph
BASE PATH : /var/lib/one//datastores/1
DISK_TYPE : RBD
STATE : READY
DATASTORE CAPACITY
TOTAL: : 3T
FREE: : 3T
USED: : 76.9G
LIMIT: : 2.6T
PERMISSIONS
OWNER : um-
GROUP : u--
OTHER : ---
DATASTORE TEMPLATE
ALLOW_ORPHANS="mixed"
BRIDGE_LIST="CLuster-LA-DEV-node1 CLuster-LA-DEV-node2 CLuster-LA-DEV-node3"
CEPH_HOST="CLuster-LA-DEV-node1 CLuster-LA-DEV-node2 CLuster-LA-DEV-node3"
CEPH_SECRET="18be8d6b-ae42-4c88-8d3c-878bb84292c8"
CEPH_USER="libvirt"
CLONE_TARGET="SELF"
CLONE_TARGET_SHARED="SELF"
CLONE_TARGET_SSH="SYSTEM"
COMPATIBLE_SYS_DS="0"
DATASTORE_CAPACITY_CHECK="yes"
DISK_TYPE="RBD"
DISK_TYPE_SHARED="RBD"
DISK_TYPE_SSH="FILE"
DRIVER="raw"
DS_MAD="ceph"
LIMIT_MB="2733969.9625"
LN_TARGET="NONE"
LN_TARGET_SHARED="NONE"
LN_TARGET_SSH="SYSTEM"
NAME="images-hdd"
POOL_NAME="hcx_pool1"
TM_MAD="ceph"
TM_MAD_SYSTEM="ssh,shared"
TYPE="IMAGE_DS"
IMAGES
0
3
4
5
10
12
13
Thanks in advance and waiting for your response :)
The problem was reduced to the creation of the image in the datastore. The frontend get full its memory cache and the free memory left with nothing. This affect mysql, who start to throw Slow query in the oned.log
for evey info is injected to the DB until the error shows Failed to replicate log record at index: XXXX on follower
and the leader is changed. The membory/buffer start to decrease.
The frontend is an LXC container inside the compute-node. This is an HCI deployment for each frontend (3 nodes and 3 frontends, one per node). The RAM is limited to 8 GiB and the cache is shared with the node. We cant give all node's RAM to the orch just because the opennebula needs a lot of cache memory, as the image size is big, when imported to the image datastore.
LXC 5.x dropped support to swap for containers
The issue is also present in 6.8.1
. May I have a follow up on this please?
If I cant import big images to the datastore, how would be possible to download personalized windows appliances, from private marketplace, with more that 15GB
of disk size? The procedure for the image creation flood the frontend network and put the orchestrator in error state, invoking a new votation for new leader, and leaving the new image in forever LOCKED
state.
The problem was the I/O on the compute-node OS disk, where is also the frontend LXC container.
Hi @rsmontero
My team and I would suggest the following to improve the cp
of the ceph
datastore driver, when storage backend is more agressive, in terms of write IOPS, than the read IOPS of your OS disk (ceph vs HDD 10K Soft-Raid):
RECOMMENDATION:
# [...]
multiline_exec_and_log "set -e -o pipefail; $DUMP | $SSH $DST_HOST ionice -c2 -n7 $DD of=$TMP_DST bs=${DD_BLOCK_SIZE:-64k}" \
"Error dumping $SRC to $DST_HOST:$TMP_DST"
# [...]
if [ "\$FORMAT" != "raw" ] && [ "\$FORMAT" != "luks" ]; then
ionice -c2 -n7 $QEMU_IMG convert -O raw $TMP_DST $TMP_DST.raw
#mv $TMP_DST.raw $TMP_DST
ionice -c2 -n7 $RBD import $FORMAT_OPT $TMP_DST.raw $RBD_SOURCE
$RM -f $TMP_DST.raw
else
ionice -c2 -n7 $RBD import $FORMAT_OPT $TMP_DST $RBD_SOURCE
fi
# remove original
$RM -f $TMP_DST
# [...]
OLD CODE:
# [...]
multiline_exec_and_log "set -e -o pipefail; $DUMP | $SSH $DST_HOST $DD of=$TMP_DST bs=${DD_BLOCK_SIZE:-64k}" \
"Error dumping $SRC to $DST_HOST:$TMP_DST"
# [...]
if [ "\$FORMAT" != "raw" ] && [ "\$FORMAT" != "luks" ]; then
$QEMU_IMG convert -O raw $TMP_DST $TMP_DST.raw
mv $TMP_DST.raw $TMP_DST
fi
$RBD import $FORMAT_OPT $TMP_DST $RBD_SOURCE
# remove original
$RM -f $TMP_DST
# [...]
Thanks for the update @Franco-Sparrow
We plan to review TM drivers in 6.10.0 and 7.0.0 added a note here #5907 to include the proposed change
Description Heavy images are not successfully imported to the images datastore, because the leader changed. Storage Backend is Ceph. All orchestrators are synced and the issue is always triggered when trying to import big images to the datastore. The image to be imported stay forever in locked state and will never succed, because of the change of the leader.
To Reproduce Download from marketplace a big image, or import a big one to image datastore. It will throw the following errors, and it will change the leader, without successfully import the image to the datastore:
Follower becoming leader:
Leader becoming follower:
Image datastore info:
Expected behavior The "heavy" image imported to the datastore.
Details
Additional context Add any other context about the problem here.
Progress Status