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
2 changes: 1 addition & 1 deletion simplyblock_core/env_var
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SIMPLY_BLOCK_COMMAND_NAME=sbcli-dev
SIMPLY_BLOCK_VERSION=19.2.30

SIMPLY_BLOCK_DOCKER_IMAGE=public.ecr.aws/simply-block/simplyblock:R25.10-Hotfix
SIMPLY_BLOCK_DOCKER_IMAGE=public.ecr.aws/simply-block/simplyblock:R25.10-Hotfix-os-fix
SIMPLY_BLOCK_SPDK_ULTRA_IMAGE=public.ecr.aws/simply-block/ultra:R25.10-Hotfix-latest
2 changes: 1 addition & 1 deletion simplyblock_core/scripts/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ grafana:
image:
simplyblock:
repository: "public.ecr.aws/simply-block/simplyblock"
tag: "R25.10-Hotfix"
tag: "R25.10-Hotfix-os-fix"
pullPolicy: "Always"

ports:
Expand Down
58 changes: 18 additions & 40 deletions simplyblock_web/templates/oc_storage_core_isolation.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -33,89 +33,67 @@ spec:
args:
- |
set -e

MARKER="/var/simplyblock/.cpu_isolation_applied"

echo "--- Installing jq ---"
apk add --no-cache jq

echo "--- Checking if node was already configured ---"

MARKER="/var/simplyblock/.cpu_topology_applied"
if [[ -f "$MARKER" ]]; then
echo "[INFO] Node already configured. Skipping sleep and exiting..."
exit 0
fi

echo "--- Reading isolated cores from config ---"
CONFIG_FILE="/var/simplyblock/sn_config_file"

if [[ ! -f "$CONFIG_FILE" ]]; then
echo "[ERROR] Config file $CONFIG_FILE not found."
exit 1
fi

ISOLATED_CORES=$(jq -r '.isolated_cores | join(",")' "$CONFIG_FILE")
if [[ -z "$ISOLATED_CORES" ]]; then
echo "[ERROR] Could not extract isolated cores from $CONFIG_FILE"
exit 1
fi

echo "[INFO] Isolated cores to apply: $ISOLATED_CORES"

SHORT_ID=$(echo "{{ HOSTNAME }}" | rev | cut -d'-' -f1 | rev)
# Create the Machine config pool
cat <<EOF | kubectl apply -f -
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
metadata:
name: worker-isolated-{{ HOSTNAME }}
name: storage-$SHORT_ID
labels:
custom-kubelet: cpumanager-enabled-$SHORT_ID
spec:
machineConfigSelector:
matchExpressions:
- key: machineconfiguration.openshift.io/role
operator: In
values:
- worker
- worker-isolated-{{ HOSTNAME }}
- storage-$SHORT_ID
nodeSelector:
matchLabels:
kubernetes.io/hostname: {{ HOSTNAME }}
EOF

# Create the MachineConfig for CPU isolation and IOMMU settings
# Create the Machine config
cat <<EOF | kubectl apply -f -
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
name: worker-isolated-{{ HOSTNAME }}
name: 00-storage-$SHORT_ID
labels:
machineconfiguration.openshift.io/role: worker-isolated-{{ HOSTNAME }}
machineconfiguration.openshift.io/role: storage-$SHORT_ID
spec:
kernelArguments:
- "nohz_full=${ISOLATED_CORES}"
- "rcu_nocbs=${ISOLATED_CORES}"
- "isolcpus=${ISOLATED_CORES}"
- "intel_iommu=on"
- "iommu=pt"
config:
ignition:
version: 3.2.0
EOF

# Create the KubeletConfig to enable static CPU manager
cat <<EOF | kubectl apply -f -
apiVersion: machineconfiguration.openshift.io/v1
kind: KubeletConfig
metadata:
name: set-static-cpu-manager-{{ HOSTNAME }}
name: kubelet-storage-$SHORT_ID
spec:
machineConfigPoolSelector:
matchLabels:
machineconfiguration.openshift.io/role: worker-isolated-{{ HOSTNAME }}
custom-kubelet: cpumanager-enabled-$SHORT_ID
kubeletConfig:
cpuManagerPolicy: static
cpuManagerReconcilePeriod: 5s
topologyManagerPolicy: single-numa-node
reservedSystemCPUs: "0,1"
EOF

echo "[INFO] Init setup and CPU isolation complete."

echo "[INFO] Marking node as configured."
touch "$MARKER"

echo "[INFO] Node is rebooting. Sleeping for 5 minutes to stop pipeline gracefully..."
echo "[INFO] Node is updating the kubeletconfig"
sleep 300
16 changes: 16 additions & 0 deletions simplyblock_web/templates/storage_deploy_spdk.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ spec:
volumeMounts:
- name: foundationdb
mountPath: /etc/foundationdb
resources:
requests:
cpu: "100m"
memory: "64Mi"
limits:
cpu: "100m"
memory: "64Mi"

containers:
- name: spdk-container
Expand Down Expand Up @@ -125,8 +132,10 @@ spec:
limits:
hugepages-2Mi: {{ MEM_GEGA }}Gi
cpu: {{ CORES }}
memory: "8Gi"
requests:
hugepages-2Mi: {{ MEM_GEGA }}Gi
memory: "8Gi"

- name: spdk-proxy-container
image: {{ SIMPLYBLOCK_DOCKER_IMAGE }}
Expand All @@ -148,6 +157,13 @@ spec:
value: "True"
- name: TIMEOUT
value: "300"
resources:
limits:
cpu: 1
memory: "128Mi"
requests:
cpu: 1
memory: "128Mi"
{% if MODE == "docker" %}
- name: fluentd
image: public.ecr.aws/simply-block/fluentd-kubernetes-daemonset:v1.17.1-debian-graylog-1.2
Expand Down
Loading