From 8499061627913792f96748e6aaf9cac6f9e9f025 Mon Sep 17 00:00:00 2001 From: haozi007 Date: Mon, 8 Nov 2021 06:50:38 +0000 Subject: [PATCH 08/12] fix post join hook do not run bug Signed-off-by: haozi007 --- pkg/clusterdeployment/clusterdeploy.go | 2 +- pkg/utils/dependency/install.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/clusterdeployment/clusterdeploy.go b/pkg/clusterdeployment/clusterdeploy.go index 27167c4..d8941ee 100644 --- a/pkg/clusterdeployment/clusterdeploy.go +++ b/pkg/clusterdeployment/clusterdeploy.go @@ -191,7 +191,7 @@ func doCreateCluster(handler api.ClusterDeploymentAPI, cc *api.ClusterConfig, cs approveServingCsr(cc, append(joinedNodes, controlPlaneNode)) // Step9: run postcreate cluster hooks - if err = handler.PostCreateClusterHooks(joinedNodes); err != nil { + if err = handler.PostCreateClusterHooks(cc.Nodes); err != nil { return nil, err } diff --git a/pkg/utils/dependency/install.go b/pkg/utils/dependency/install.go index e2c0621..8687602 100644 --- a/pkg/utils/dependency/install.go +++ b/pkg/utils/dependency/install.go @@ -354,6 +354,7 @@ func ExecuteShell(roleInfra *api.RoleInfra, packagePath string, hcf *api.HostCon if len(shell) == 0 { return nil } + logrus.Debugf("run %s shell %v on %v\n", string(schedule), shell, hcf.Address) dp := &dependencyShell{ srcPath: path.Join(packagePath, constants.DefaultFilePath), -- 2.25.1