Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
vdelendik opened this issue Mar 9, 2021 · 9 comments

Comments

@vdelendik
Copy link
Contributor

vdelendik commented Mar 9, 2021

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 vdelendik added this to the 1.6 milestone Mar 9, 2021
@vdelendik
Copy link
Contributor Author

closing as it is QA activities only

@ghost
Copy link

ghost commented Mar 10, 2021

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)

@ghost ghost reopened this Mar 10, 2021
@vdelendik vdelendik modified the milestones: 1.6, 1.7 Mar 11, 2021
@vdelendik vdelendik modified the milestones: 1.7, 1.8 Apr 29, 2021
@vdelendik vdelendik modified the milestones: 1.8, 1.9 May 31, 2021
@vdelendik vdelendik modified the milestones: 1.9, 2.0 Sep 28, 2021
@vdelendik vdelendik modified the milestones: 2.1, 2.2 Feb 13, 2022
@vdelendik
Copy link
Contributor Author

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

@vdelendik vdelendik modified the milestones: 2.1, 2.2 Apr 23, 2022
@vdelendik vdelendik changed the title test migration of the sonarqube from 1.2 to 1.3 version test migration of the sonarqube from 1.3 to 1.4 version Apr 20, 2023
@vdelendik
Copy link
Contributor Author

@okamara, let's test again

@ghost
Copy link

ghost commented Apr 20, 2023

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

  • Sonar can't start properly

Снимок экрана 2023-04-20 в 18 18 07

Снимок экрана 2023-04-20 в 18 19 41

@ghost ghost reopened this Apr 20, 2023
@vdelendik vdelendik changed the title test migration of the sonarqube from 1.3 to 1.4 version upgrade: add appropriate warn that previous sonar will be terminated completely Apr 23, 2023
@vdelendik
Copy link
Contributor Author

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
Copy link
Contributor Author

vdelendik commented Apr 24, 2023

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
Copy link
Contributor Author

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
Copy link

ghost commented Apr 28, 2023

verified. fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

1 participant