mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-04 12:47:36 +08:00
[FIX] fix bug: no service and ingress
This commit is contained in:
parent
4f524e34d8
commit
4207174399
@ -36,7 +36,6 @@ import (
|
|||||||
|
|
||||||
//TenantServicePlugin conv service all plugin
|
//TenantServicePlugin conv service all plugin
|
||||||
func TenantServicePlugin(as *typesv1.AppService, dbmanager db.Manager) error {
|
func TenantServicePlugin(as *typesv1.AppService, dbmanager db.Manager) error {
|
||||||
logrus.Debugf("exec TenantServicePlugin...")
|
|
||||||
initContainers, pluginContainers, err := createPluginsContainer(as, dbmanager)
|
initContainers, pluginContainers, err := createPluginsContainer(as, dbmanager)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -36,7 +36,6 @@ import (
|
|||||||
|
|
||||||
//ServiceSource conv ServiceSource
|
//ServiceSource conv ServiceSource
|
||||||
func ServiceSource(as *v1.AppService, dbmanager db.Manager) error {
|
func ServiceSource(as *v1.AppService, dbmanager db.Manager) error {
|
||||||
logrus.Debugf("exec ServiceSource...")
|
|
||||||
sscs, err := dbmanager.ServiceSourceDao().GetServiceSource(as.ServiceID)
|
sscs, err := dbmanager.ServiceSourceDao().GetServiceSource(as.ServiceID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == gorm.ErrRecordNotFound {
|
if err == gorm.ErrRecordNotFound {
|
||||||
@ -81,7 +80,6 @@ func int32Ptr(i int) *int32 {
|
|||||||
|
|
||||||
//TenantServiceBase conv tenant service base info
|
//TenantServiceBase conv tenant service base info
|
||||||
func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error {
|
func TenantServiceBase(as *v1.AppService, dbmanager db.Manager) error {
|
||||||
logrus.Debugf("exec TenantServiceBase...")
|
|
||||||
tenantService, err := dbmanager.TenantServiceDao().GetServiceByID(as.ServiceID)
|
tenantService, err := dbmanager.TenantServiceDao().GetServiceByID(as.ServiceID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err == gorm.ErrRecordNotFound {
|
if err == gorm.ErrRecordNotFound {
|
||||||
|
@ -43,7 +43,6 @@ import (
|
|||||||
|
|
||||||
//TenantServiceVersion service deploy version conv. define pod spec
|
//TenantServiceVersion service deploy version conv. define pod spec
|
||||||
func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error {
|
func TenantServiceVersion(as *v1.AppService, dbmanager db.Manager) error {
|
||||||
logrus.Debugf("exec TenantServiceVersion...")
|
|
||||||
version, err := dbmanager.VersionInfoDao().GetVersionByDeployVersion(as.DeployVersion, as.ServiceID)
|
version, err := dbmanager.VersionInfoDao().GetVersionByDeployVersion(as.DeployVersion, as.ServiceID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("get service deploy version failure %s", err.Error())
|
return fmt.Errorf("get service deploy version failure %s", err.Error())
|
||||||
|
@ -22,6 +22,7 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/Sirupsen/logrus"
|
"github.com/Sirupsen/logrus"
|
||||||
"github.com/goodrain/rainbond/cmd/worker/option"
|
"github.com/goodrain/rainbond/cmd/worker/option"
|
||||||
@ -326,10 +327,10 @@ func (m *Manager) applyRuleExec(task *model.Task) error {
|
|||||||
logrus.Errorf("Can't convert %s to *model.ApplyRuleTaskBody", reflect.TypeOf(task.Body))
|
logrus.Errorf("Can't convert %s to *model.ApplyRuleTaskBody", reflect.TypeOf(task.Body))
|
||||||
return fmt.Errorf("Can't convert %s to *model.ApplyRuleTaskBody", reflect.TypeOf(task.Body))
|
return fmt.Errorf("Can't convert %s to *model.ApplyRuleTaskBody", reflect.TypeOf(task.Body))
|
||||||
}
|
}
|
||||||
logrus.Debugf("ApplyRuleTask action: %s", body.Action)
|
|
||||||
logger := event.GetManager().GetLogger(body.EventID)
|
logger := event.GetManager().GetLogger(body.EventID)
|
||||||
oldAppService := m.store.GetAppService(body.ServiceID)
|
oldAppService := m.store.GetAppService(body.ServiceID)
|
||||||
if oldAppService == nil || oldAppService.IsClosed() {
|
if (oldAppService == nil || oldAppService.IsClosed()) && strings.Contains(body.Action, "port") {
|
||||||
|
logrus.Debugf("service is closed,no need handle")
|
||||||
logger.Info("service is closed,no need handle", controller.GetLastLoggerOption())
|
logger.Info("service is closed,no need handle", controller.GetLastLoggerOption())
|
||||||
event.GetManager().ReleaseLogger(logger)
|
event.GetManager().ReleaseLogger(logger)
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user