zebrunner / community-edition

Zebrunner is a Test Automation Management Tool
https://zebrunner.github.io/community-edition
Apache License 2.0
220 stars 53 forks source link

upgrade: add appropriate warn that previous sonar will be terminated completely #429

Closed vdelendik closed 1 year ago

vdelendik commented 3 years ago

CE v2.2 has sonarqube:7.9.4-community based sonar (originally on ubuntu linux). in v2.3 we jumped to sonarqube:9.9.0-community which is on alpine.

In scope of this ticket we have to test if upgrade scenario is possible at all.

  1. setup v2.2 from master
  2. do repository registration -> double check that sonar static code analysis present
  3. setup onPR and onPush events and execute them successfully
  4. switch to the develop branch and pull recursively git pull --recurse-submodules
  5. run ./zebrunner.sh upgrade and restart everything -> review sonarqube container logs. I suspect to see exceptions and as result inaccessible sonar -> if sonar is available take a look to pre-upgrade analysis if it is available for user
  6. register the same repo again -> double check if new analysis appear
  7. test onPR and onPush events
vdelendik commented 3 years ago

closing as it is QA activities only

ghost commented 3 years ago

Sonar is not started after upgrade: 2021.03.10 11:45:07 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed java.lang.IllegalStateException: Unable to start database at org.sonar.server.platform.db.EmbeddedDatabase.startServer(EmbeddedDatabase.java:87) at org.sonar.server.platform.db.EmbeddedDatabase.start(EmbeddedDatabase.java:62) at org.sonar.server.platform.db.EmbeddedDatabaseFactory.start(EmbeddedDatabaseFactory.java:49) at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40) at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) at org.picocontainer.behaviors.Stored.start(Stored.java:110) at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136) at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90) at org.sonar.server.platform.platformlevel.PlatformLevel1.start(PlatformLevel1.java:166) at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213) at org.sonar.server.platform.PlatformImpl.startLevel1Container(PlatformImpl.java:172) at org.sonar.server.platform.PlatformImpl.init(PlatformImpl.java:86) at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4689) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5155) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-199] at org.h2.message.DbException.getJdbcSQLException(DbException.java:459)

vdelendik commented 2 years ago

returned back to 2.1 as existing sonar has vulnerable log4j2x on board (imbedded elasticsearch)

vdelendik commented 1 year ago

@okamara, let's test again

ghost commented 1 year ago

Re-verified. In step 5 run ./zebrunner.sh upgrade and restart everything -> review sonarqube container logs. I suspect to see exceptions and as result inaccessible sonar

Снимок экрана 2023-04-20 в 18 19 41
vdelendik commented 1 year ago

due to the huge changes in between sonarqube versions we can't support normal upgrade. So, let's provide during the upgrade warning about destroyng previous sonar instance and data completely. And during upgrade stop sonarqube and destroy all 3 related docker volumes

vdelendik commented 1 year ago

we will inform it as part of migration guide. nothing to do in bash programming for that. as of now automated removal all sonar volumes during upgrade. Make sure to add info about cookies removal otherwise sonar password reset doesn't work!

vdelendik commented 1 year ago

it is part of the release docs already (in draft state): https://github.com/zebrunner/community-edition/releases/tag/untagged-555e9941203286abf894

Note: During upgrade we can't support migration of SonarQube module! It means all data will be destroyed and you must configure from scratch over 9.8.0 community edition of sonar!
ghost commented 1 year ago

verified. fixed.