hotfix: port not default 22 (#1026)

This commit is contained in:
cuisongliu
2022-05-16 22:25:06 +08:00
committed by GitHub
parent 9dffb8126f
commit 39dfa4091e
2 changed files with 20 additions and 3 deletions
+16 -3
View File
@@ -64,7 +64,7 @@ func (c *ScaleProcessor) GetPipeLine() ([]func(cluster *v2.Cluster) error, error
var todoList []func(cluster *v2.Cluster) error
if c.IsScaleUp {
todoList = append(todoList,
c.Check,
c.JoinCheck,
c.PreProcess,
c.RunConfig,
c.MountRootfs,
@@ -76,6 +76,7 @@ func (c *ScaleProcessor) GetPipeLine() ([]func(cluster *v2.Cluster) error, error
}
todoList = append(todoList,
c.DeleteCheck,
c.PreProcess,
c.Delete,
//c.ApplyCleanPlugin,
@@ -115,9 +116,9 @@ func (c ScaleProcessor) UnMountRootfs(cluster *v2.Cluster) error {
return fs.UnMountRootfs(cluster, hosts)
}
func (c *ScaleProcessor) Check(cluster *v2.Cluster) error {
func (c *ScaleProcessor) JoinCheck(cluster *v2.Cluster) error {
var ips []string
ips = append(ips, cluster.GetMaster0IP())
ips = append(ips, cluster.GetMaster0IPAndPort())
ips = append(ips, c.MastersToJoin...)
ips = append(ips, c.NodesToJoin...)
err := checker.RunCheckList([]checker.Interface{checker.NewIPsHostChecker(ips)}, cluster, checker.PhasePre)
@@ -127,6 +128,18 @@ func (c *ScaleProcessor) Check(cluster *v2.Cluster) error {
return nil
}
func (c *ScaleProcessor) DeleteCheck(cluster *v2.Cluster) error {
var ips []string
ips = append(ips, cluster.GetMaster0IPAndPort())
ips = append(ips, c.MastersToDelete...)
ips = append(ips, c.NodesToDelete...)
err := checker.RunCheckList([]checker.Interface{checker.NewIPsHostChecker(ips)}, cluster, checker.PhasePre)
if err != nil {
return err
}
return nil
}
func (c *ScaleProcessor) PreProcess(cluster *v2.Cluster) error {
err := c.ClusterFile.Process()
if err != nil {
+4
View File
@@ -70,6 +70,10 @@ func (f *defaultRootfs) mountRootfs(cluster *v2.Cluster, ipList []string, initFl
for _, cInfo := range f.images {
src := cInfo
eg.Go(func() error {
if initFlag && src.Type == v2.AppImage {
logger.Debug("ApplicationImage %s render env init process continue", src.ImageName)
return nil
}
err := renderENV(src.MountPoint, ipList, envProcessor)
if err != nil {
return errors.Wrap(err, "render env to rootfs failed")