Upgrading to SonarQube 10 doubles the environment

hi team

I performed the environment upgrade to 10.0 from 8.9LTS, and instead of a migration the process created a new empty 10.0 version environment (without projects, users, etc) now I have the 8.9 environment with my data and another empty 10.0 environment, below I am listing the process I followed to make this upgrade and also the duplicated environment.

Can anyone help me?

1- I´ve changed the SonarQube version on my values.yaml
2- Run the command below
➜  helm upgrade --install -f values.yaml -n sonarqubelts sonarqube sonarqube/sonarqube
3- I ran the setup in my browser



➜   k get pod
NAME                            READY   STATUS    RESTARTS      AGE
sonarqube-lts-postgresql-0      1/1     Running   0             69d
sonarqube-lts-sonarqube-lts-0   1/1     Running   0             69d
sonarqube-postgresql-0          1/1     Running   0             14h
sonarqube-sonarqube-0           1/1     Running   0             14h
➜  


➜   k get svc
NAME                                TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)   AGE
sonarqube-lts-postgresql            ClusterIP   xx.21.177.67    <none>        5432/TCP   69d
sonarqube-lts-postgresql-headless   ClusterIP   None            <none>        5432/TCP   69d
sonarqube-lts-sonarqube-lts         ClusterIP   xx.21.133.52    <none>        9000/TCP   69d
sonarqube-postgresql                ClusterIP   xx.21.186.209   <none>        5432/TCP   14h
sonarqube-postgresql-headless       ClusterIP   None            <none>        5432/TCP   14h
sonarqube-sonarqube                 ClusterIP   xx.21.172.73    <none>        9000/TCP   14h
➜  

➜   k get pvc
NAME                              STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS            AGE
data-sonarqube-lts-postgresql-0   Bound    pvc-4f202a58-c540-4b65-9244-44b759b6ac74   20Gi       RWO            vpc-block-10iops-tier   69d
data-sonarqube-postgresql-0       Bound    pvc-64f170fe-a38d-479c-b93a-25c27a7fedf9   20Gi       RWO            vpc-block-10iops-tier   14h
➜  

Hi,

First, you can’t upgrade directly from 8.9 to 10.0. You have to upgrade first to 9.9 LTS, and then to 10.0.

Second, it sound like you didn’t point your new instance to the old database / schema.

Take a closer look at your JDBC values.

 
HTH,
Ann

1 Like

Hi Ann,
I think the problem was the jump from version 8.9 to 10.0. Thanks, I’ll remove the parallel 10.0 version and try the upgrade to 9.9.1.

But as for JDBC, should I point the 8.9 jdbc path inside the 9.9.1 values.yaml ?

Again, thanks for the help.

Hi,

Yes, you should point 9.9.1 to the old database.

 
HTH,
Ann

1 Like