0.19 升级 0.20 问题记录

  • Choerodon平台版本:0.19.0

  • 运行环境:自主搭建

  • 问题描述:

helm upgrade agile-service c7n/agile-service     -f <(helm get values agile-service)     --version 0.20.1

数据迁移 夯住了。。。。 日志如下

[root@juyi-01 ~]# kubectl logs -f -n c7n-system agile-service-init-db-fbqtf

.   ____          _            __ _ _
/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/  ___)| |_)| | | | | || (_| |  ) ) ) )
'  |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::        (v2.0.6.RELEASE)

2020-01-13 00:06:40.405  INFO 6 --- [           main] io.choerodon.liquibase.LiquibaseTools    : Starting LiquibaseTools v0.11.0.RELEASE on agile-service-init-db-fbqtf with PID 6 (/var/choerodon/choerodon-tool-liquibase.jar started by root in /)
2020-01-13 00:06:40.413  INFO 6 --- [           main] io.choerodon.liquibase.LiquibaseTools    : No active profile set, falling back to default profiles: default
2020-01-13 00:06:40.801  INFO 6 --- [           main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@9a24fbd3: startup date [Mon Jan 13 00:06:40 CST 2020]; root of context hierarchy
2020-01-13 00:06:42.409  INFO 6 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
2020-01-13 00:06:43.124  INFO 6 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
2020-01-13 00:06:44.145  INFO 6 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2020-01-13 00:06:44.146  INFO 6 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'dataSource' has been autodetected for JMX exposure
2020-01-13 00:06:44.151  INFO 6 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2020-01-13 00:06:44.173  INFO 6 --- [           main] io.choerodon.liquibase.LiquibaseTools    : Started LiquibaseTools in 7.022 seconds (JVM running for 8.055)
2020-01-13 00:06:44.176  INFO 6 --- [           main] i.choerodon.liquibase.LiquibaseExecutor  : Init data source, name : default
2020-01-13 00:06:44.176  INFO 6 --- [           main] i.choerodon.liquibase.LiquibaseExecutor  : Data source name : default dir is empty, extra jar /agile-service.jar
2020-01-13 00:06:47.828  INFO 6 --- [           main] i.choerodon.liquibase.LiquibaseExecutor  : Jar extra /agile-service.jar done
2020-01-13 00:06:47.828  INFO 6 --- [           main] i.choerodon.liquibase.LiquibaseExecutor  : Load data source, name : default, dir : temp/
2020-01-13 00:06:48.290  INFO 6 --- [           main] liquibase                                : Clearing database change log checksums

谨慎起见 到这步卡住 就没往下升级了 ,麻烦 第一时间帮忙看下。。。

升级test-manager 报错:
因为 复制升级的命令有问题 升级 日志保存 sql 语法报错

我这里直接回滚到老版本 后面 再升级 还是不行

升级完成 LDAP 账号密码 被重置 test , 改成 对的 账号密码 后 点击保存 报 实体字段重复

test-manager-service报的错是什么?

2020-01-13 11:29:21.159 DEBUG 7 --- [ScheduleTask(0)] i.c.t.m.a.s.impl.DevopsServiceImpl       : AutoTesting ScheduleTask(0) release redis lock.true
2020-01-13 11:29:28.824  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to choose server to route
2020-01-13 11:29:28.824  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : One of all servers: HOST => 10.88.58.222, IP => 18080, Scheme => null
2020-01-13 11:29:28.824  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to get CustomUserDetails
2020-01-13 11:29:28.824  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : CustomUserDetails is Empty
2020-01-13 11:29:28.824  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : No rule's servers: Host => 10.88.58.222, IP => 18080, Scheme => null
2020-01-13 11:29:28.824  INFO 7 --- [ool-11-thread-1] io.choerodon.feign.CustomMetadataRule    : Route to one of no rule's servers
2020-01-13 11:29:29.464  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to choose server to route
2020-01-13 11:29:29.464  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : One of all servers: HOST => 10.88.58.222, IP => 18080, Scheme => null
2020-01-13 11:29:29.464  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : Start to get CustomUserDetails
2020-01-13 11:29:29.464  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : CustomUserDetails is Empty
2020-01-13 11:29:29.464  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : No rule's servers: Host => 10.88.58.222, IP => 18080, Scheme => null
2020-01-13 11:29:29.464  INFO 7 --- [pool-7-thread-1] io.choerodon.feign.CustomMetadataRule    : Route to one of no rule's servers
2020-01-13 11:29:36.891  INFO 7 --- [trap-executor-0] c.n.d.s.r.aws.ConfigClusterResolver      : Resolving eureka endpoints via configuration
2020-01-13 11:29:40.967  WARN 7 --- [scoveryClient-0] c.netflix.discovery.TimedSupervisorTask  : task supervisor timed out

java.util.concurrent.TimeoutException: null
	at java.util.concurrent.FutureTask.get(FutureTask.java:205) [na:1.8.0_202]
	at com.netflix.discovery.TimedSupervisorTask.run(TimedSupervisorTask.java:66) ~[eureka-client-1.9.12.jar!/:1.9.12]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_202]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_202]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_202]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_202]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_202]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_202]
	at java.lang.Thread.run(Thread.java:813) [na:1.8.0_202]

2020-01-13 11:29:41.164 DEBUG 7 --- [ScheduleTask(0)] i.c.t.m.a.s.impl.DevopsServiceImpl       : AutoTesting ScheduleTask(0) get redis lock.true
2020-01-13 11:29:41.167 DEBUG 7 --- [ScheduleTask(0)] i.c.t.m.i.m.T.queryDelayInstance         : ==>  Preparing: select * from test_app_instance where pod_status=0 and creation_date < ?
2020-01-13 11:29:41.168 DEBUG 7 --- [ScheduleTask(0)] i.c.t.m.i.m.T.queryDelayInstance         : ==> Parameters: 2020-01-13 11:14:41.164(Timestamp)
2020-01-13 11:29:41.171 DEBUG 7 --- [ScheduleTask(0)] i.c.t.m.i.m.T.queryDelayInstance         : <==

这个没影响吧,有看到迁移数据的日志吗

迁移数据 报语法错误 ,我就回滚到 0.19了,后面在升级0.20 貌似没有相应的 日志了

这是因为这个是一次性定时任务,asgard_service数据库里面已经有数据了,所以不会再跑了,现在有两种方法,一是回滚asgard_service数据库,二是删除asgard_service数据库里一些表的数据,但是建议是回滚asgard数据库

之前的语法错误指的是?

set mask 什么的 就是 升级命令 复制出来坑的

建议重新来一遍吧…还有agile_service那个问题解决了吗

麻烦优先 看下 LDAP 这个事情

agile_service 解决了

怎么 重新来 ?

这个具体指的是什么错? 我需要定位一下错误的地方

test-manager 这服务现在 是 升级失败的

问题是 第一次 升级 的时候 jdbc 参数搞错了,造成 数据迁移失败了 包 set mast xx 语法错误
我就直接回滚0.19 ,后面有 重新 升级到 0.20,就直接不做数据迁移了

那你要到asgard_service服务删除几条数据,并且重新恢复test-manager-service的数据库。。
asgard_service数据库中:
删除asgard_quartz_method的一条数据如下:


删除asgard_quartz_task的一条数据如下:

删除asgard_quartz_task_instance的一条数据如下:

然后test-manager-service从0.19升级到0.20

但是这样去搞数据库肯定不建议,所以能够重新恢复所有的东西是最好的