Skip to content

Commit 05b9fac

Browse files
authored
Fix crun installation issue by clearing the dnf cache (#573)
# Summary - fixed dnf and yum warnings by disabling dnf `subscription-manager` plugin - clean dnf cache actually solves the issue - also updated the requests and limits for `e2e_replica_set` test because it was flaky ## Proof of Work Passing staging `ibm_power` tests -> https://spruce.mongodb.com/version/690cbc9b1d6ff600074edce6 ## Checklist - [ ] Have you linked a jira ticket and/or is the ticket in the title? - [ ] Have you checked whether your jira ticket required DOCSP changes? - [x] Have you added changelog file? - use `skip-changelog` label if not needed - refer to [Changelog files and Release Notes](https://github.com/mongodb/mongodb-kubernetes/blob/master/CONTRIBUTING.md#changelog-files-and-release-notes) section in CONTRIBUTING.md for more details
1 parent b3bbbf5 commit 05b9fac

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

docker/mongodb-kubernetes-tests/tests/replicaset/replica_set.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ def replica_set(namespace: str, custom_mdb_version: str, cluster_domain: str) ->
5959
"resources": {
6060
"limits": {
6161
"cpu": "1",
62-
"memory": "1Gi",
62+
"memory": "2Gi",
6363
},
64-
"requests": {"cpu": "0.2", "memory": "300M"},
64+
"requests": {"cpu": "0.5", "memory": "1Gi"},
6565
},
6666
}
6767
]
@@ -78,9 +78,9 @@ def replica_set(namespace: str, custom_mdb_version: str, cluster_domain: str) ->
7878
"resources": {
7979
"limits": {
8080
"cpu": "1",
81-
"memory": "1Gi",
81+
"memory": "2Gi",
8282
},
83-
"requests": {"cpu": "0.2", "memory": "300M"},
83+
"requests": {"cpu": "0.5", "memory": "1Gi"},
8484
},
8585
}
8686
]
@@ -188,9 +188,9 @@ def test_pods_resources(self):
188188
pod = self.corev1.read_namespaced_pod(podname, self.namespace)
189189
c0 = pod.spec.containers[0]
190190
assert c0.resources.limits["cpu"] == "1"
191-
assert c0.resources.limits["memory"] == "1Gi"
192-
assert c0.resources.requests["cpu"] == "200m"
193-
assert c0.resources.requests["memory"] == "300M"
191+
assert c0.resources.limits["memory"] == "2Gi"
192+
assert c0.resources.requests["cpu"] == "500m"
193+
assert c0.resources.requests["memory"] == "1Gi"
194194

195195
def test_pods_container_envvars(self):
196196
for pod_name in self._get_pods("my-replica-set-{}", 3):

scripts/dev/setup_ibm_container_runtime.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@
22

33
set -Eeou pipefail
44

5+
echo "Cleaning DNF cache..."
6+
sudo dnf clean all && sudo rm -r /var/cache/dnf
7+
58
echo "Installing/upgrading crun..."
6-
sudo dnf upgrade -y crun || sudo dnf install -y crun || sudo yum upgrade -y crun || sudo yum install -y crun
9+
sudo dnf upgrade -y crun --disableplugin=subscription-manager || \
10+
sudo dnf install -y crun --disableplugin=subscription-manager || \
11+
sudo yum upgrade -y crun --disableplugin=subscription-manager || \
12+
sudo yum install -y crun --disableplugin=subscription-manager
713

814
if ! crun --version &>/dev/null; then
915
echo "❌ crun installation failed"

0 commit comments

Comments
 (0)