rancher 部署v5.2 rbd-app-ui-migrations 安装失败

Rainbond版本:v5.2
操作系统:centos
内核版本:
环境:虚拟机等
节点配置:
安装类型:
如何复现:
尝试解决:
查看日志显示数据库迁移失败。

Start initializing database
Migrations for 'www':
  www/migrations/0001_initial.py
    - Create model AppServiceGroup
    - Create model BackServiceInstallTemp
    - Create model ComposeServiceRelation
    - Create model ConsoleConfig
    - Create model GatewayCustomConfiguration
    - Create model GroupCreateTemp
    - Create model ImageServiceRelation
    - Create model Labels
    - Create model NodeLabels
    - Create model PermRelService
    - Create model PermRelTenant
    - Create model PhoneCode
    - Create model PluginBuildVersion
    - Create model PluginConfigGroup
    - Create model PluginConfigItems
    - Create model PublishedGroupServiceRelation
    - Create model RegionApp
    - Create model ServiceAttachInfo
    - Create model ServiceConsume
    - Create model ServiceCreateStep
    - Create model ServiceDomain
    - Create model ServiceDomainCertificate
    - Create model ServiceEvent
    - Create model ServiceExtendMethod
    - Create model ServiceFeeBill
    - Create model ServiceGroup
    - Create model ServiceGroupRelation
    - Create model ServiceInfo
    - Create model ServiceLabels
    - Create model ServicePaymentNotify
    - Create model ServicePluginConfigVar
    - Create model ServiceProbe
    - Create model ServiceRule
    - Create model ServiceRuleHistory
    - Create model ServiceTcpDomain
    - Create model ServiceWebhooks
    - Create model SuperAdminUser
    - Create model TenantConsume
    - Create model TenantConsumeDetail
    - Create model TenantEnterprise
    - Create model TenantEnterpriseToken
    - Create model TenantFeeBill
    - Create model TenantPaymentNotify
    - Create model TenantPlugin
    - Create model TenantPluginShareInfo
    - Create model TenantRecharge
    - Create model TenantRegionInfo
    - Create model TenantRegionPayModel
    - Create model TenantRegionResource
    - Create model Tenants
    - Create model TenantServiceAuth
    - Create model TenantServiceConfigurationFile
    - Create model TenantServiceEnv
    - Create model TenantServiceEnvVar
    - Create model TenantServiceExtendMethod
    - Create model TenantServiceGroup
    - Create model TenantServiceInfo
    - Create model TenantServiceInfoDelete
    - Create model TenantServiceL7Info
    - Create model TenantServiceLog
    - Create model TenantServiceMountRelation
    - Create model TenantServicePluginAttr
    - Create model TenantServicePluginRelation
    - Create model TenantServiceRelation
    - Create model TenantServicesPort
    - Create model TenantServiceStatics
    - Create model TenantServiceVolume
    - Create model ThirdPartyServiceEndpoints
    - Create model Users
    - Create model WeChatConfig
    - Create model WeChatState
    - Create model WeChatUnBind
    - Create model WeChatUser
    - Alter unique_together for tenantservicestatics (1 constraint(s))
    - Alter unique_together for tenantservicesport (1 constraint(s))
    - Alter unique_together for tenantservicerelation (1 constraint(s))
    - Alter unique_together for tenantservicemountrelation (1 constraint(s))
    - Alter unique_together for tenantserviceinfo (1 constraint(s))
    - Alter unique_together for tenantregionresource (1 constraint(s))
    - Alter unique_together for tenantregioninfo (1 constraint(s))
    - Alter unique_together for tenantenterprisetoken (1 constraint(s))
    - Alter unique_together for serviceinfo (1 constraint(s))
    - Alter unique_together for regionapp (1 constraint(s))
    - Alter unique_together for appservicegroup (1 constraint(s))
Migrations for 'console':
  console/migrations/0001_initial.py
    - Create model Announcement
    - Create model AppExportRecord
    - Create model AppImportRecord
    - Create model Applicants
    - Create model ApplicationConfigGroup
    - Create model AppMarket
    - Create model AppUpgradeRecord
    - Create model AutoscalerRuleMetrics
    - Create model AutoscalerRules
    - Create model CloundBangImages
    - Create model ComposeGroup
    - Create model ComposeServiceRelation
    - Create model ConfigGroupItem
    - Create model ConfigGroupService
    - Create model ConsoleSysConfig
    - Create model DeployRelation
    - Create model EnterpriseUserPerm
    - Create model Errlog
    - Create model GroupAppBackupImportRecord
    - Create model GroupAppBackupRecord
    - Create model GroupAppMigrateRecord
    - Create model OAuthServices
    - Create model PermGroup
    - Create model PermsInfo
    - Create model PluginShareRecordEvent
    - Create model RainbondCenterApp
    - Create model RainbondCenterAppInherit
    - Create model RainbondCenterAppTag
    - Create model RainbondCenterAppTagsRelation
    - Create model RainbondCenterAppVersion
    - Create model RainbondCenterPlugin
    - Create model RegionConfig
    - Create model RoleInfo
    - Create model RolePerms
    - Create model ServiceBuildSource```

相关截图:
![rainbond-build|690x316](upload://gBJ4pUvfyRWVyUpXHFK5Oj09w43.png) ![rancher-build|690x344](upload://p5so3hOUgLFF7JdsV7sV14y0JSL.png) 
是否重新执行安装:是

抄送: @dazuimao1990

您好,请问您是默认安装的数据库呢还是外接的自己的数据库,从您提供的日志来看,看不出异常

是默认安装的数据库
异常信息还有如下
Operations to perform:
Apply all migrations: auth, authtoken, console, contenttypes, sessions, www
Running migrations:
Applying www.0001_initial…failed to migrate

您好,请尝试把 rbd-app-ui-migrations 这个job删除掉,会重新初始化。如有异常请贴出异常信息

kubectl logs rbd-app-ui-migrations-78g7k --all-containers=true -n rbd-system

Migrations for ‘console’:
console/migrations/0001_initial.py
- Create model Announcement
- Create model AppExportRecord
- Create model AppImportRecord
- Create model Applicants
- Create model ApplicationConfigGroup
- Create model AppMarket
- Create model AppUpgradeRecord
- Create model AutoscalerRuleMetrics
- Create model AutoscalerRules
- Create model CloundBangImages
- Create model ComposeGroup
- Create model ComposeServiceRelation
- Create model ConfigGroupItem
- Create model ConfigGroupService
- Create model ConsoleSysConfig
- Create model DeployRelation
- Create model EnterpriseUserPerm
- Create model Errlog
- Create model GroupAppBackupImportRecord
- Create model GroupAppBackupRecord
- Create model GroupAppMigrateRecord
- Create model OAuthServices
- Create model PermGroup
- Create model PermsInfo
- Create model PluginShareRecordEvent
- Create model RainbondCenterApp
- Create model RainbondCenterAppInherit
- Create model RainbondCenterAppTag
- Create model RainbondCenterAppTagsRelation
- Create model RainbondCenterAppVersion
- Create model RainbondCenterPlugin
- Create model RegionConfig
- Create model RoleInfo
- Create model RolePerms
- Create model ServiceBuildSource
- Create model ServiceMonitor
- Create model ServiceRecycleBin
- Create model ServiceRelationRecycleBin
- Create model ServiceRelPerms
- Create model ServiceShareRecord
- Create model ServiceShareRecordEvent
- Create model ServiceSourceInfo
- Create model ServiceUpgradeRecord
- Create model TeamGitlabInfo
- Create model TenantServiceBackup
- Create model TenantUserPermission
- Create model TenantUserRole
- Create model TenantUserRolePermission
- Create model UserAccessKey
- Create model UserFavorite
- Create model UserMessage
- Create model UserOAuthServices
- Create model UserRole
- Alter unique_together for useraccesskey (1 constraint(s))
- Alter unique_together for tenantuserrole (1 constraint(s))
- Alter unique_together for tenantuserpermission (1 constraint(s))
- Alter unique_together for servicerelationrecyclebin (1 constraint(s))
- Alter unique_together for servicerecyclebin (1 constraint(s))
- Alter unique_together for servicemonitor (1 constraint(s))
- Alter unique_together for rainbondcenterapp (1 constraint(s))
- Alter unique_together for configgroupservice (1 constraint(s))
- Alter unique_together for configgroupitem (1 constraint(s))
- Alter unique_together for autoscalerrulemetrics (1 constraint(s))
- Alter unique_together for appmarket (1 constraint(s))
- Alter unique_together for applicationconfiggroup (1 constraint(s))
Operations to perform:
Apply all migrations: auth, authtoken, console, contenttypes, sessions, www
Running migrations:
Applying www.0001_initial…failed to migrate

报错还是不太明显,看不出来什么。
您尝试进入数据库删掉 console

kubectl exec -it rbd-db-0 bash -n rbd-system 
#筛选密码
env | grep pass
mysql -u root -p
drop console

然后再把 job删掉,重新初始化

kubectl logs rbd-app-ui-migrations-2kbs5 --all-containers=true -n rbd-system
ERROR 1049 (42000) at line 1: Unknown database ‘console’
Database not ready

mysql> show databases;
±-------------------+
| Database |
±-------------------+
| information_schema |
| mysql |
| performance_schema |
| region |
| sys |
±-------------------+
5 rows in set (0.01 sec)

console库无法初始化。

手动create console,然后重启job

还是会报同样的错
kubectl logs rbd-app-ui-migrations-78g7k --all-containers=true -n rbd-system

Migrations for ‘console’:
console/migrations/0001_initial.py
- Create model Announcement
- Create model AppExportRecord
- Create model AppImportRecord
- Create model Applicants
- Create model ApplicationConfigGroup
- Create model AppMarket
- Create model AppUpgradeRecord
- Create model AutoscalerRuleMetrics
- Create model AutoscalerRules
- Create model CloundBangImages
- Create model ComposeGroup
- Create model ComposeServiceRelation
- Create model ConfigGroupItem
- Create model ConfigGroupService
- Create model ConsoleSysConfig
- Create model DeployRelation
- Create model EnterpriseUserPerm
- Create model Errlog
- Create model GroupAppBackupImportRecord
- Create model GroupAppBackupRecord
- Create model GroupAppMigrateRecord
- Create model OAuthServices
- Create model PermGroup
- Create model PermsInfo
- Create model PluginShareRecordEvent
- Create model RainbondCenterApp
- Create model RainbondCenterAppInherit
- Create model RainbondCenterAppTag
- Create model RainbondCenterAppTagsRelation
- Create model RainbondCenterAppVersion
- Create model RainbondCenterPlugin
- Create model RegionConfig
- Create model RoleInfo
- Create model RolePerms
- Create model ServiceBuildSource
- Create model ServiceMonitor
- Create model ServiceRecycleBin
- Create model ServiceRelationRecycleBin
- Create model ServiceRelPerms
- Create model ServiceShareRecord
- Create model ServiceShareRecordEvent
- Create model ServiceSourceInfo
- Create model ServiceUpgradeRecord
- Create model TeamGitlabInfo
- Create model TenantServiceBackup
- Create model TenantUserPermission
- Create model TenantUserRole
- Create model TenantUserRolePermission
- Create model UserAccessKey
- Create model UserFavorite
- Create model UserMessage
- Create model UserOAuthServices
- Create model UserRole
- Alter unique_together for useraccesskey (1 constraint(s))
- Alter unique_together for tenantuserrole (1 constraint(s))
- Alter unique_together for tenantuserpermission (1 constraint(s))
- Alter unique_together for servicerelationrecyclebin (1 constraint(s))
- Alter unique_together for servicerecyclebin (1 constraint(s))
- Alter unique_together for servicemonitor (1 constraint(s))
- Alter unique_together for rainbondcenterapp (1 constraint(s))
- Alter unique_together for configgroupservice (1 constraint(s))
- Alter unique_together for configgroupitem (1 constraint(s))
- Alter unique_together for autoscalerrulemetrics (1 constraint(s))
- Alter unique_together for appmarket (1 constraint(s))
- Alter unique_together for applicationconfiggroup (1 constraint(s))
Operations to perform:
Apply all migrations: auth, authtoken, console, contenttypes, sessions, www
Running migrations:
Applying www.0001_initial…failed to migrate

这个报错的确什么也看不出来,请问什么操作系统,您是怎么装的rainbond,通过快速安装,还是自己的k8s集群

centos-release-7-8.2003.0.el7.centos.x86_64

通过rancher创建k8s集群

通过 Rainbond Operator 应用商店安装

根据您提供的信息,不能判断具体问题,麻烦您加官方技术群 @Q