mirror of
https://github.com/labring/sealos.git
synced 2026-09-01 15:38:06 +08:00
hotfix: port not default 22 (#1026)
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user