Skip to content

Commit

Permalink
Merge pull request #71 from intel/ppalucki-demo-configs
Browse files Browse the repository at this point in the history
Handle more deadlocks and races + allow empty config values.
  • Loading branch information
ppalucki authored Oct 18, 2022
2 parents 8f5cfb5 + 6addbb6 commit d7bb03d
Show file tree
Hide file tree
Showing 11 changed files with 196 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ data:
echo ' To fix just restart this pod or manually remove /var/lib/cri-resmgr on host.'
fi
# Wait for agent to be ready and give 15 seconds for initilization.
while ! [ -S /var-run-cri-resmgr/cri-resmgr-agent.sock ]; do
echo 'Waiting for agent socket...';
sleep 1;
done
echo Enable and restart cri-resource-manager systemd unit.
chroot /var/host bash -c "systemctl enable cri-resource-manager"
chroot /var/host bash -c "systemctl restart cri-resource-manager"
Expand Down Expand Up @@ -183,6 +189,29 @@ data:
# Wait five seconds before first check to allow kubelet/cri-resmgr to switch from activating to active state.
sleep 5
while true; do
# only where there is not force.cfg
if [[ ! -f /etc/cri-resmgr/force.cfg ]]; then
# Support switching policy if one requested from agent is different than active.
active_policy=$(chroot /var/host bash -c 'cat /var/lib/cri-resmgr/cache | jq .PolicyName -r')
cfg_data=$(chroot /var/host bash -c 'cat /var/lib/cri-resmgr/cache | jq .Cfg.Data -r')
if [[ "$cfg_data" == "null" ]]; then
requested_policy="null"
else
requested_policy=$(chroot /var/host bash -c 'cat /var/lib/cri-resmgr/cache | jq .Cfg.Data.policy -r | grep Active | cut -f 2 -d " "')
fi
if [[ "$requested_policyX" != "X" && "$active_policyX" != "X" && "$requested_policy" != "$active_policy" ]]; then
echo "*** [$(date --rfc-3339=seconds)] Policy update: requested policy from agent ($requested_policy) is different from active=$active_policy - reconfigure/reset daemon policy..."
chroot /var/host systemctl stop cri-resource-manager
sleep 5
chroot /var/host /opt/intel/bin/cri-resmgr --reset-policy
chroot /var/host systemctl start cri-resource-manager
sleep 5
continue
fi
else
active_policy="forced"
fi
# Run checks and uninstall if there is any issues with kubelet or cri-rm or containerd
criIsActive=$(chroot /var/host bash -c "systemctl is-active cri-resource-manager")
kubeletIsActive=$(chroot /var/host bash -c "systemctl is-active kubelet")
Expand Down Expand Up @@ -238,19 +267,16 @@ data:
echo
echo "=========================== III. Sleep forever... =============================="
echo "Note: sleep to give "human" a chance to fix config/state (then please restart this pod)..."
sleep inf &
child=$?
wait $child
trap quit SIGTERM SIGINT
sleep inf
else
echo "*** [$(date --rfc-3339=seconds)] Checks OK (cri-resource-manager=${criIsActive} kubelet=${kubeletIsActive} containerd=${containerdIsActive})"
echo "*** [$(date --rfc-3339=seconds)] Checks OK (cri-resource-manager=${criIsActive} kubelet=${kubeletIsActive} containerd=${containerdIsActive} ActivePolicy=$active_policy)"
fi
# Put sleep in background and wait to allow bash to capture and handle signals
# based on https://unix.stackexchange.com/questions/146756/forward-sigterm-to-child-in-bash
sleep 60 &
sleep 30 &
child=$!
echo "Wait for sleeping child: ${child}"
# echo "Wait for sleeping child: ${child}"
wait $child
done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ spec:
volumeMounts:
- name: host-volume
mountPath: /var/host
- name: host-volume-var-run-cri-resmgr
mountPath: /var-run-cri-resmgr
path: /var/run/cri-resmgr/
- name: cri-resmgr-installation-script
mountPath: /scripts
{{- if (.Values.configs | default dict).static }}
Expand Down Expand Up @@ -89,6 +92,9 @@ spec:
- name: host-volume
hostPath:
path: /
- name: host-volume-var-run-cri-resmgr
hostPath:
path: /var/run/cri-resmgr/
- name: cri-resmgr-installation-script
configMap:
name: cri-resmgr-installation-script
Expand Down
92 changes: 34 additions & 58 deletions examples/ctrldeploy-ctrlreg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
name: cri-resmgr-extension
type: helm
providerConfig:
chart: H4sIAAAAAAAAA+1cW3PbuhHOs37FDt0zc07Hokjq1lFfqjhOoml8GdknaZ4yEAlJPKYIFgAlq8n5710AJEVZjiTbsZKm3JlEFAEuFnv5dgFQnh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/5fK/+v1+soeQGMISeUUs6j/GN+6+yxoP8L1SPmQRfSenUGBUcLOccv2I5YG3W2Jx9N3A/dfqd9Nie/biqhYxdNIxdQ6Xhi+4yxNtAR1vRnS24fsZRZzdlliKTfqbY3poIauIyu9BJVE+H+UtU2o1J8R+pE+uFHbDH2U6KNHCbF9gDW237TR+li+MfbLDxTEglOf8eCRQxXsto5k3koKirOr41l/tdaZW9Y6myJDfXndLLve+dpAz5bpbgIs3UwdpQkuW7rbTIutnxleUJ9TmYkyX/dCrcEnwcprPIFw9jOgC84m2/Hkit6gDOy1DrFPnbpIR+odO41x9z7e+Zw1ne+dKv2UtDn/n5t98RNfAN+S/2Pi76zW/91O263y/71Qlf9X+f9L5f/lSngX3Frt4OAALpWF1YRNjcfUyrQAy9e4dX1IaXOE/6lQOtGWVyGmPiLK4xLO5mGABxHzSWSai9e3yAilBtdutZQRcdDBWHvaDYn1G+VFzQlCeQiJjjU5RyOQUN36LJYYZCPKl/cr8m7c3J22M4SsmWKruSeQPTPaNbJNmZDdluO4W6ujkkzwGlVuUYEzKZVke9ENWQijwNOzy+MuqrGQtFAF2hs9Hf9YHC20SgPMoSKWKMEbiq22Y4pLGz1dvTmPbkZvCfqFWknI+03ZKOIwe3I30KtQlxTtCcNEz79W9sGVQGcjGqh0KmvOCpw6YBxqUfSSNxmfXpMcUxPLDHZu9B4ws/pjVVBWGsbcRSFHahZe2W5/IFgjiwVYU/ULAXl1CmxLOwBL5dKJlJvfV89Vt98VEBhJu/p4p7p6PfsdAvMTAgZLyhY7yKqrjzP/OvfdhMJJxPL5pcnZZg+0GTWNUT5ML69zFaKPGv/MvgH0fBnOUWYr72rppiB/F3PrdVnPn/FNy4oqqqiiiir6cei/+4/hkwBQAAA=

values:
### For development purposes - set it to 0 (if you want to register extension but use local process with "make start").
Expand All @@ -32,64 +32,40 @@ providerConfig:
# based on: https://github.com/intel/cri-resource-manager/blob/master/sample-configs/balloons-policy.cfg
configs:
### Those options are passed directly to cri-resmgr binary.
EXTRA_OPTIONS: |
EXTRA_OPTIONS="--metrics-interval 30s"
### This is *static* initial configuraiton file that will be passed do systemd unit
fallback: |
policy:
Active: balloons
AvailableResources:
CPU: cpuset:1-128
ReservedResources:
CPU: 1
balloons:
PinCPU: true
PinMemory: true
BalloonTypes:
- Name: "smallBalloon"
MinCPUs: 2
MaxCPUs: 2
MinBalloons: 1
instrumentation:
HTTPEndpoint: :8891
PrometheusExport: true
logger:
Debug: resource-manager,cache,policy,config-server,cpuallocator
Klog:
# Enables nice logs with logger names that can be used in Debug
skip_headers: true
dump:
Debug: true
#Config: off:.*,full:((Create)|(Remove)|(Run)|(Update)|(Start)|(Stop)).*
# EXTRA_OPTIONS: |
# EXTRA_OPTIONS="--metrics-interval 10s"
### This is *dynamic* config that will be applied by cri-resmgr-agent
default: |
policy:
Active: balloons
AvailableResources:
CPU: cpuset:1-128
ReservedResources:
CPU: 1
balloons:
BalloonTypes:
- Name: "smallHPBalloon"
MinCPUs: 2
MaxCPUs: 2
MinBalloons: 1
- Name: "mediumLPBalloon"
MinCPUs: 4
MaxCPUs: 4
MinBalloons: 1
instrumentation:
HTTPEndpoint: :8891
PrometheusExport: true
logger:
Debug: resource-manager,cache,policy,config-server,cpuallocator
Klog:
# Enables nice logs with logger names that can be used in Debug
skip_headers: true
dump:
Debug: true
#Config: off:.*,full:((Create)|(Remove)|(Run)|(Update)|(Start)|(Stop)).*
# default: |
# policy:
# Active: balloons
# AvailableResources:
# CPU: cpuset:1-128
# ReservedResources:
# CPU: 1
# balloons:
# BalloonTypes:
# - Name: "HP-balloon"
# MinCPUs: 2
# MaxCPUs: 2
# MinBalloons: 1
# Namespaces:
# - nginx
# - Name: "LP-balloon"
# MinCPUs: 4
# MaxCPUs: 4
# MinBalloons: 1
# Namespaces:
# - stress
# instrumentation:
# HTTPEndpoint: :8891
# PrometheusExport: true
# logger:
# Debug: resource-manager,cache,policy,config-server,cpuallocator
# Klog:
# # Enables nice logs with logger names that can be used in Debug
# skip_headers: true
# dump:
# Debug: true

---
apiVersion: core.gardener.cloud/v1beta1
Expand Down
28 changes: 28 additions & 0 deletions examples/demo/nginx-sts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: nginx
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: ngnix
namespace: nginx
spec:
selector:
matchLabels:
app: nginx-sts
serviceName: nginx-sts
template:
metadata:
labels:
app: nginx-sts
spec:
terminationGracePeriodSeconds: 1
containers:
- name: nginx
image: nginx
resources:
requests:
cpu: "2"
29 changes: 29 additions & 0 deletions examples/demo/stress-sts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: stress
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: stress
namespace: stress
spec:
selector:
matchLabels:
app: stress-sts
serviceName: stress-sts
template:
metadata:
labels:
app: stress-sts
spec:
terminationGracePeriodSeconds: 1
containers:
- name: stress-ng
image: alexeiled/stress-ng
args: [--cpu, "2"]
resources:
requests:
cpu: "2"
3 changes: 1 addition & 2 deletions examples/shoot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ spec:
## To enable mark it as disable=false or use globallyEnabled: true
extensions:
- type: cri-resmgr-extension
disabled: true

disabled: false
networking:
type: calico
providerConfig:
Expand Down
37 changes: 22 additions & 15 deletions examples/shoot2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,40 @@ spec:
configs:
### Those options are passed directly to cri-resmgr binary.
EXTRA_OPTIONS: |
EXTRA_OPTIONS="--metrics-interval 15s"
### This is *static* initial configuration file that will be passed do systemd unit
fallback: |
policy:
Active: balloons
AvailableResources:
CPU: cpuset:1-10000
ReservedResources:
CPU: 1
logger:
Debug: resource-manager,cache,policy,resource-control,config-server
Klog:
skip_headers: true
EXTRA_OPTIONS="--metrics-interval 5s"
### This is *dynamic* config that will be applied by cri-resmgr-agent
default: |
policy:
Active: balloons
AvailableResources:
CPU: cpuset:1-15
ReservedResources:
CPU: cpuset:15
CPU: cpuset:1
balloons:
BalloonTypes:
- Name: "mediumBalloonForShoot2"
- Name: "some-special-balloon-for-shoot2"
MinCPUs: 3
MaxCPUs: 3
MinBalloons: 2
logger:
Debug: resource-manager,cache,policy,config-server
Klog:
skip_headers: true
instrumentation:
HTTPEndpoint: :8891
PrometheusExport: true
### This is *static* initial configuration file that will be passed do systemd unit
fallback: |
policy:
Active: balloons
AvailableResources:
CPU: cpuset:1-15
ReservedResources:
CPU: 1
logger:
Debug: resource-manager,cache,policy,config-server
Klog:
skip_headers: true
instrumentation:
HTTPEndpoint: :8891
PrometheusExport: true
Expand Down
6 changes: 5 additions & 1 deletion hacks/export-kubeconfig-for-shoot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
echo "Usage: SHOOT=local2 . ./hacks/export-kubeconfig-for-local-shoot.sh"
CONTEXT=${CONTEXT:-kind-gardener-local}
NAMESPACE=${NAMESPACE:-garden-local}
SHOOT=${SHOOT:-local}
echo CONTEXT=$CONTEXT
echo NAMESPACE=$NAMESPACE
echo SHOOT=$SHOOT
echo "KUBECONFIG=~/.kube/config kubectl --context ${CONTEXT} -n ${NAMESPACE} get secret/${SHOOT}.kubeconfig -o jsonpath={.data.kubeconfig} | base64 -d > /tmp/kubeconfig-shoot-${SHOOT}.yaml"
echo "export KUBECONFIG=/tmp/kubeconfig-shoot-${SHOOT}.yaml"
KUBECONFIG=~/.kube/config kubectl --context ${CONTEXT} -n ${NAMESPACE} get secret/${SHOOT}.kubeconfig -o jsonpath={.data.kubeconfig} | base64 -d > /tmp/kubeconfig-shoot-${SHOOT}.yaml
export KUBECONFIG=/tmp/kubeconfig-shoot-${SHOOT}.yaml
echo KUBECONFIG set to ${SHOOT} shoot by /tmp/kubeconfig-shoot-${SHOOT}.yaml
Loading

0 comments on commit d7bb03d

Please sign in to comment.