Skip to content

Commit

Permalink
Fixing bugs
Browse files Browse the repository at this point in the history
Signed-off-by: Lazar Cvetković <[email protected]>
  • Loading branch information
cvetkovic committed Feb 20, 2024
1 parent 6ba2a67 commit 6183b2c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/stargz_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
kubectl patch configmap -n knative-serving config-autoscaler -p "{\"data\": {\"allow-zero-initial-scale\": \"true\"}}"
- name: Setup stock-only node
run: ./scripts/setup_tool setup_node stock-only use-stargz
run: ./scripts/setup_tool setup_node REGULAR stock-only use-stargz

- name: Check containerd service is running
run: sudo screen -list | grep "containerd"
Expand Down
27 changes: 0 additions & 27 deletions scripts/cluster/create_multinode_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ func CreateMultinodeCluster(stockContainerd string, rawHaReplicaCount string) er
return err
}

/*if err := CreateMasterKubeletService(); err != nil {
return err
}*/

if err := DeployKubernetes(haReplicaCount); err != nil {
return err
}
Expand Down Expand Up @@ -77,29 +73,6 @@ func CreateMultinodeCluster(stockContainerd string, rawHaReplicaCount string) er
return nil
}

// Create kubelet service on master node
func CreateMasterKubeletService() error {
utils.WaitPrintf("Creating kubelet service")
// Create service directory if not exist
_, err := utils.ExecShellCmd("sudo mkdir -p /etc/sysconfig")
if !utils.CheckErrorWithMsg(err, "Failed to create kubelet service!\n") {
return err
}
bashCmd := `sudo sh -c 'cat <<EOF > /etc/sysconfig/kubelet
KUBELET_EXTRA_ARGS="--container-runtime=remote --v=%d --runtime-request-timeout=15m --container-runtime-endpoint=unix:///run/containerd/containerd.sock"
EOF'`
_, err = utils.ExecShellCmd(bashCmd, configs.System.LogVerbosity)
if !utils.CheckErrorWithMsg(err, "Failed to create kubelet service!\n") {
return err
}
_, err = utils.ExecShellCmd("sudo systemctl daemon-reload")
if !utils.CheckErrorWithTagAndMsg(err, "Failed to create kubelet service!\n") {
return err
}

return nil
}

// Deploy Kubernetes
func DeployKubernetes(haReplicaCount int) error {
utils.WaitPrintf("Deploying Kubernetes(version %s)", configs.Kube.K8sVersion)
Expand Down
1 change: 1 addition & 0 deletions scripts/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ func main() {
// Original scripts from `scripts/cloudlab` directory
case "setup_node":
if setupFlags.NArg() < 3 {
// ha_mode - REGULAR (do not install load balancers), MASTER, BACKUP (with load balancers)
utils.FatalPrintf("Missing parameters: %s <ha_mode> <sandbox> [use-stargz]\n", subCmd)
utils.CleanEnvironment()
os.Exit(1)
Expand Down
2 changes: 1 addition & 1 deletion scripts/utils/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func PrepareEnvironment() error {
func CleanEnvironment() error {
// Define task List
cleanTaskList := []func() error{
//CleanUpTmpDir,
CleanUpTmpDir,
}
// Execute task
for _, task := range cleanTaskList {
Expand Down

0 comments on commit 6183b2c

Please sign in to comment.