Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/bare-metal-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ jobs:

# If the cluster is running on k8s, we need to set the environment variable
DEPLOY_CMD="./bootstrap-cluster.sh \
--max-lvol 10 --max-snap 10
--max-size 400G --number-of-devices 1
--max-subsys 10 --max-snap 10
--max-size 400G --number-of-devices 1
--sbcli-cmd sbcli-dev --spdk-debug"

if [ "${{ inputs.k8s_snode }}" == "true" ]; then
Expand Down
38 changes: 24 additions & 14 deletions .github/workflows/collect-logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ on:
# =========================
# Upload
# =========================
RUNNER:
description: "Runner to use (must have NFS mount at /mnt/nfs_share)"
required: false
default: "vm22"
type: choice
options:
- vm22
- vm-runner-43

UPLOAD_TO_MINIO:
description: "Upload collected logs to MinIO"
required: false
Expand All @@ -117,7 +126,7 @@ concurrency:
jobs:
collect-logs:
name: "Collect logs (${{ inputs.DEPLOY_MODE }}${{ inputs.DEPLOY_MODE == 'k8s-native' && format(' / {0}', inputs.cluster_environment) || '' }})"
runs-on: ${{ inputs.DEPLOY_MODE == 'k8s-native' && inputs.cluster_environment == 'aws-openshift' && 'vm-runner-43' || 'self-hosted' }}
runs-on: ${{ inputs.RUNNER || 'vm22' }}
timeout-minutes: 720

env:
Expand Down Expand Up @@ -690,7 +699,8 @@ jobs:

TIMESTAMP=$(date -u "+%Y%m%d-%H%M%S")
NFS_DEST="${NFS_BASE}/graylog_collected-${TIMESTAMP}"
mkdir -p "${NFS_DEST}"
sudo mkdir -p "${NFS_DEST}"
sudo chown "$(id -u):$(id -g)" "${NFS_DEST}"

echo "=== Copying collected logs to NFS ==="
echo " Source: ${OUTPUT_DIR}"
Expand All @@ -716,7 +726,6 @@ jobs:
gl_ip="${GRAYLOG_IP:-$MGMT_IP}"
file_count="$(find "${OUTPUT_DIR}" -type f \( -name '*.log' -o -name '*.tar.gz' \) 2>/dev/null | wc -l || echo 0)"
total_size="$(du -sh "${OUTPUT_DIR}" 2>/dev/null | awk '{print $1}' || echo 'unknown')"
total_lines="$(cat "${OUTPUT_DIR}"/*.log 2>/dev/null | wc -l || echo 0)"

{
echo "## Log Collection Summary"
Expand All @@ -737,11 +746,20 @@ jobs:
fi
echo "| **Log Files** | ${file_count} |"
echo "| **Total Size** | ${total_size} |"
echo "| **Total Lines** | ${total_lines} |"
echo ""
echo "### Files Collected"
echo "### Chunks"
echo '```'
find "${OUTPUT_DIR}" -type f \( -name '*.log' -o -name '*.tar.gz' \) -printf '%P (%s bytes)\n' 2>/dev/null | sort || echo "(none)"
for d in "${OUTPUT_DIR}"/chunk_*; do
[ -d "$d" ] || continue
chunk_name=$(basename "$d")
chunk_files=$(find "$d" -name '*.log' -size +0 2>/dev/null | wc -l)
chunk_size=$(du -sh "$d" 2>/dev/null | awk '{print $1}')
echo "${chunk_name} ${chunk_files} files ${chunk_size}"
done
# Fallback if no chunk dirs (flat layout)
if ! ls -d "${OUTPUT_DIR}"/chunk_* >/dev/null 2>&1; then
echo "${file_count} files ${total_size}"
fi
echo '```'
} >> "$GITHUB_STEP_SUMMARY"

Expand All @@ -765,14 +783,6 @@ jobs:
--source_dir "${OUTPUT_DIR}" \
--run_id "collected-logs-$(date +%Y%m%d_%H%M%S)" || true

- name: Upload as GitHub artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: collected-logs-${{ inputs.DEPLOY_MODE }}-${{ inputs.DEPLOY_MODE == 'k8s-native' && inputs.cluster_environment || inputs.MGMT_IP }}-${{ github.run_id }}
path: ${{ inputs.OUTPUT_DIR }}/**
if-no-files-found: warn

# ============================================================
# K8s-native: Cleanup kubeconfig
# ============================================================
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/k8s-e2e-ha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ jobs:
run: |
cd $GITHUB_WORKSPACE/simplyBlockDeploy
./bootstrap-cluster.sh --sbcli-cmd "$SBCLI_CMD" \
--max-lvol 10 --max-snap 10 --max-prov 500G --number-of-devices 1 \
--max-subsys 10 --max-snap 10 --number-of-devices 1 \
--distr-ndcs $NDCS \
--distr-npcs $NPCS \
--distr-bs $BS \
Expand Down
72 changes: 59 additions & 13 deletions .github/workflows/k8s-native-cross-cluster-restore.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ on:
description: 'Network interfaces (mgmt_ifc:data_nics)'
required: false
default: 'br-ex:enp2s0f0'
max_lvol:
max_subsys:
description: 'Max logical volume count per storage node'
required: false
default: '30'
Expand Down Expand Up @@ -640,7 +640,7 @@ jobs:
IFC_NAMES="${{ github.event.inputs.ifc_names || 'br-ex:enp2s0f0' }}"
MGMT_IFC="${IFC_NAMES%%:*}"
DATA_NICS="${IFC_NAMES#*:}"
MAX_LVOL="${{ github.event.inputs.max_lvol || '30' }}"
MAX_SUBSYS="${{ github.event.inputs.max_subsys || '30' }}"
SB_REPO="${{ github.event.inputs.simplyblock_repository || 'public.ecr.aws/simply-block/simplyblock' }}"
SB_TAG="${{ github.event.inputs.simplyblock_image }}"
SPDK_IMAGE="${{ github.event.inputs.spdk_image }}"
Expand All @@ -650,6 +650,30 @@ jobs:
FORCE_FORMAT_4K="${{ (github.event.inputs.cluster_environment == 'aws-openshift' || github.event.inputs.cluster_environment == 'openshift-local' || github.event.inputs.cluster_environment == 'openshift-baremetal') && 'true' || 'false' }}"
DRIVE_SIZE_RANGE="${{ github.event.inputs.cluster_environment == 'openshift-baremetal' && '1500G-2000G' || '1.7T-2T' }}"

# Convert partitions to enableJournalDevice (inverted: 0→true, 1→false)
if [ "${PARTITIONS}" = "0" ]; then
ENABLE_JOURNAL_DEVICE="true"
else
ENABLE_JOURNAL_DEVICE="false"
fi

# Calculate vcpuCount from CORE_PERCENTAGE by querying actual CPU count on a worker node
FIRST_WORKER="${C1_WORKERS%%,*}"
if [ "$OPENSHIFT_CLUSTER" = "true" ]; then
TOTAL_CPUS=$(oc debug node/"${FIRST_WORKER}" -- chroot /host nproc 2>/dev/null || echo "0")
else
TOTAL_CPUS=$(kubectl get node "${FIRST_WORKER}" -o jsonpath='{.status.capacity.cpu}' 2>/dev/null || echo "0")
fi
TOTAL_CPUS=$(echo "${TOTAL_CPUS}" | tr -d '[:space:]')
if [ "${TOTAL_CPUS}" -gt 0 ] 2>/dev/null; then
VCPU_COUNT=$(( TOTAL_CPUS * CORE_PERCENTAGE / 100 ))
[ "${VCPU_COUNT}" -lt 1 ] && VCPU_COUNT=1
else
echo "WARNING: Could not determine CPU count, defaulting vcpuCount to 4"
VCPU_COUNT=4
fi
echo "Calculated vcpuCount=${VCPU_COUNT} (${TOTAL_CPUS} CPUs * ${CORE_PERCENTAGE}%)"

# Build C1 worker nodes YAML
WORKER_YAML=""
IFS=',' read -ra C1_NODES <<< "${C1_WORKERS}"
Expand All @@ -675,9 +699,7 @@ jobs:
namespace: ${NS_C1}
spec:
fabricType: tcp
isSingleNode: false
enableNodeAffinity: true
strictNodeAntiAffinity: false
stripe:
dataChunks: ${NDCS}
parityChunks: ${NPCS}
Expand All @@ -688,6 +710,9 @@ jobs:
capacity: 96
provisionedCapacity: 98
${BACKUP_SPEC}
maxSubsystemCount: ${MAX_SUBSYS}
vcpuCount: ${VCPU_COUNT}
maxHugePagesSize: "17G"
---
apiVersion: storage.simplyblock.io/v1alpha1
kind: StoragePool
Expand All @@ -711,9 +736,7 @@ jobs:
mgmtIfname: ${MGMT_IFC}
dataIfname:
- ${DATA_NICS}
maxSubsystemCount: ${MAX_LVOL}
partitions: ${PARTITIONS}
corePercentage: ${CORE_PERCENTAGE}
enableJournalDevice: ${ENABLE_JOURNAL_DEVICE}
journalManager:
count: ${JM_COUNT}
percentPerDevice: 3
Expand All @@ -735,7 +758,7 @@ jobs:
IFC_NAMES="${{ github.event.inputs.ifc_names || 'br-ex:enp2s0f0' }}"
MGMT_IFC="${IFC_NAMES%%:*}"
DATA_NICS="${IFC_NAMES#*:}"
MAX_LVOL="${{ github.event.inputs.max_lvol || '30' }}"
MAX_SUBSYS="${{ github.event.inputs.max_subsys || '30' }}"
SB_REPO="${{ github.event.inputs.simplyblock_repository || 'public.ecr.aws/simply-block/simplyblock' }}"
SB_TAG="${{ github.event.inputs.simplyblock_image }}"
SPDK_IMAGE="${{ github.event.inputs.spdk_image }}"
Expand All @@ -745,6 +768,30 @@ jobs:
FORCE_FORMAT_4K="${{ (github.event.inputs.cluster_environment == 'aws-openshift' || github.event.inputs.cluster_environment == 'openshift-local' || github.event.inputs.cluster_environment == 'openshift-baremetal') && 'true' || 'false' }}"
DRIVE_SIZE_RANGE="${{ github.event.inputs.cluster_environment == 'openshift-baremetal' && '1500G-2000G' || '1.7T-2T' }}"

# Convert partitions to enableJournalDevice (inverted: 0→true, 1→false)
if [ "${PARTITIONS}" = "0" ]; then
ENABLE_JOURNAL_DEVICE="true"
else
ENABLE_JOURNAL_DEVICE="false"
fi

# Calculate vcpuCount from CORE_PERCENTAGE by querying actual CPU count on a worker node
FIRST_WORKER="${C2_WORKERS%%,*}"
if [ "$OPENSHIFT_CLUSTER" = "true" ]; then
TOTAL_CPUS=$(oc debug node/"${FIRST_WORKER}" -- chroot /host nproc 2>/dev/null || echo "0")
else
TOTAL_CPUS=$(kubectl get node "${FIRST_WORKER}" -o jsonpath='{.status.capacity.cpu}' 2>/dev/null || echo "0")
fi
TOTAL_CPUS=$(echo "${TOTAL_CPUS}" | tr -d '[:space:]')
if [ "${TOTAL_CPUS}" -gt 0 ] 2>/dev/null; then
VCPU_COUNT=$(( TOTAL_CPUS * CORE_PERCENTAGE / 100 ))
[ "${VCPU_COUNT}" -lt 1 ] && VCPU_COUNT=1
else
echo "WARNING: Could not determine CPU count, defaulting vcpuCount to 4"
VCPU_COUNT=4
fi
echo "Calculated vcpuCount=${VCPU_COUNT} (${TOTAL_CPUS} CPUs * ${CORE_PERCENTAGE}%)"

# Build C2 worker nodes YAML
WORKER_YAML=""
IFS=',' read -ra C2_NODES <<< "${C2_WORKERS}"
Expand All @@ -770,9 +817,7 @@ jobs:
namespace: ${NS_C2}
spec:
fabricType: tcp
isSingleNode: false
enableNodeAffinity: true
strictNodeAntiAffinity: false
stripe:
dataChunks: ${NDCS}
parityChunks: ${NPCS}
Expand All @@ -783,6 +828,9 @@ jobs:
capacity: 96
provisionedCapacity: 98
${BACKUP_SPEC}
maxSubsystemCount: ${MAX_SUBSYS}
vcpuCount: ${VCPU_COUNT}
maxHugePagesSize: "17G"
---
apiVersion: storage.simplyblock.io/v1alpha1
kind: StoragePool
Expand All @@ -806,9 +854,7 @@ jobs:
mgmtIfname: ${MGMT_IFC}
dataIfname:
- ${DATA_NICS}
maxSubsystemCount: ${MAX_LVOL}
partitions: ${PARTITIONS}
corePercentage: ${CORE_PERCENTAGE}
enableJournalDevice: ${ENABLE_JOURNAL_DEVICE}
journalManager:
count: ${JM_COUNT}
percentPerDevice: 3
Expand Down
40 changes: 32 additions & 8 deletions .github/workflows/k8s-native-e2e-add-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:
ifc_names:
type: string
default: 'br-ex:enp2s0f0'
max_lvol:
max_subsys:
type: string
default: '30'
ssh_user:
Expand Down Expand Up @@ -132,7 +132,7 @@ on:
description: 'Network interfaces (mgmt_ifc:data_nics)'
required: false
default: 'br-ex:enp2s0f0'
max_lvol:
max_subsys:
description: 'Max logical volume count per storage node'
required: false
default: '30'
Expand Down Expand Up @@ -919,7 +919,7 @@ jobs:
IFC_NAMES="${{ inputs.ifc_names || 'br-ex:enp2s0f0' }}"
MGMT_IFC="${IFC_NAMES%%:*}"
DATA_NICS="${IFC_NAMES#*:}"
MAX_LVOL="${{ inputs.max_lvol || '30' }}"
MAX_SUBSYS="${{ inputs.max_subsys || '30' }}"
SB_REPO="${{ inputs.simplyblock_repository || 'public.ecr.aws/simply-block/simplyblock' }}"
SB_TAG="${{ inputs.simplyblock_image }}"
SPDK_IMAGE="${{ inputs.spdk_image }}"
Expand All @@ -931,6 +931,31 @@ jobs:
FORCE_FORMAT_4K="${{ (inputs.cluster_environment == 'aws-openshift' || inputs.cluster_environment == 'openshift-local' || inputs.cluster_environment == 'openshift-baremetal') && 'true' || 'false' }}"
DRIVE_SIZE_RANGE="${{ inputs.cluster_environment == 'openshift-baremetal' && '1500G-2000G' || '1.7T-2T' }}"

# Convert partitions to enableJournalDevice (inverted: 0→true, 1→false)
if [ "${PARTITIONS}" = "0" ]; then
ENABLE_JOURNAL_DEVICE="true"
else
ENABLE_JOURNAL_DEVICE="false"
fi

# Calculate vcpuCount from CORE_PERCENTAGE by querying actual CPU count on a worker node
FIRST_WORKER="${{ inputs.worker_nodes }}"
FIRST_WORKER="${FIRST_WORKER%%,*}"
if [ "$OPENSHIFT_CLUSTER" = "true" ]; then
TOTAL_CPUS=$(oc debug node/"${FIRST_WORKER}" -- chroot /host nproc 2>/dev/null || echo "0")
else
TOTAL_CPUS=$(kubectl get node "${FIRST_WORKER}" -o jsonpath='{.status.capacity.cpu}' 2>/dev/null || echo "0")
fi
TOTAL_CPUS=$(echo "${TOTAL_CPUS}" | tr -d '[:space:]')
if [ "${TOTAL_CPUS}" -gt 0 ] 2>/dev/null; then
VCPU_COUNT=$(( TOTAL_CPUS * CORE_PERCENTAGE / 100 ))
[ "${VCPU_COUNT}" -lt 1 ] && VCPU_COUNT=1
else
echo "WARNING: Could not determine CPU count, defaulting vcpuCount to 4"
VCPU_COUNT=4
fi
echo "Calculated vcpuCount=${VCPU_COUNT} (${TOTAL_CPUS} CPUs * ${CORE_PERCENTAGE}%)"

RESERVED_CPU_YAML=""
if [ "${{ inputs.cluster_environment }}" = "openshift-baremetal" ]; then
RESERVED_CPU_YAML=' reservedSystemCPU: "0,1,10,11,16,17,26,27"'
Expand Down Expand Up @@ -991,9 +1016,7 @@ jobs:
namespace: ${NAMESPACE}
spec:
fabricType: tcp
isSingleNode: false
enableNodeAffinity: true
strictNodeAntiAffinity: false
stripe:
dataChunks: ${NDCS}
parityChunks: ${NPCS}
Expand All @@ -1005,6 +1028,9 @@ jobs:
provisionedCapacity: 98
${BACKUP_SPEC}
${VAULT_SETTINGS}
maxSubsystemCount: ${MAX_SUBSYS}
vcpuCount: ${VCPU_COUNT}
maxHugePagesSize: "17G"
---
apiVersion: storage.simplyblock.io/v1alpha1
kind: StoragePool
Expand All @@ -1030,10 +1056,8 @@ jobs:
mgmtIfname: ${MGMT_IFC}
dataIfname:
- ${DATA_NICS}
maxSubsystemCount: ${MAX_LVOL}
${RESERVED_CPU_YAML}
partitions: ${PARTITIONS}
corePercentage: ${CORE_PERCENTAGE}
enableJournalDevice: ${ENABLE_JOURNAL_DEVICE}
journalManager:
count: ${JM_COUNT}
percentPerDevice: 3
Expand Down
Loading
Loading