Skip to content

Commit

Permalink
OCPBUGS-33091: Only place the VM storage pools on small second disks (#…
Browse files Browse the repository at this point in the history
…51453)

* Test access to API during devscripts-gather

devscripts gather has access to the API without going
through the proxy.

* Only place the VM storage pools on small second disks

If the disk on a virt hosts are less then 200G then it
can't store both the VM storage pools and the image
registry.
  • Loading branch information
derekhiggins committed Apr 29, 2024
1 parent 7d54d12 commit 57f248f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ echo "### Gathering logs..."
timeout -s 9 15m ssh "${SSHOPTS[@]}" "root@${IP}" bash - <<EOF |& sed -e 's/.*auths.*/*** PULL_SECRET ***/g'
cd dev-scripts
echo "Testing API access"
oc get clusterversion || true
echo "Get install-gather, if there is one..."
cp /root/dev-scripts/ocp/*/log-bundle*.tar.gz /tmp/artifacts/log-bundle-\$HOSTNAME.tar.gz || true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,17 @@ then
# There may have only been one disk
if [ -n "\$DATA_DISK" ] ; then
mkfs.xfs -f "\${DATA_DISK}"
mkdir /opt/dev-scripts
mount "\${DATA_DISK}" /opt/dev-scripts
DATA_DISK_SIZE=\$(lsblk -o size --noheadings --bytes -d \${DATA_DISK})
# If there is a data disk but its less the 200G, its not big enough for both
# the storage pools and the registry, just place the pool on it.
if [ "\$DATA_DISK_SIZE" -lt "$(( 1024 ** 3 * 200 ))" ] ; then
mkdir -p /opt/dev-scripts/pool
mount "\${DATA_DISK}" /opt/dev-scripts/pool
else
mkdir /opt/dev-scripts
mount "\${DATA_DISK}" /opt/dev-scripts
fi
fi
elif [ ! -z "${NVME_DEVICE}" ] && [ -e "${NVME_DEVICE}" ] && [[ "\$(mount | grep ${NVME_DEVICE})" == "" ]];
then
Expand Down

0 comments on commit 57f248f

Please sign in to comment.