Skip to content

Issues with Cloudstack Upgrade from 4.19.2 to 4.20.1 #11038

Closed

Description

@apraba05

problem

2025-06-16 13:03:13,993 ERROR [c.c.u.d.ScriptRunner] (main:[]) (logid:) Error executing: CREATE TABLE cloud.nsx_providers ( id bigint unsigned NOT NULL auto_increment COMMENT 'id', uuid varchar(40), zone_id bigint unsigned NOT NULL COMMENT 'Zone ID', host_id bigint unsigned NOT NULL COMMENT 'Host ID', provider_name varchar(40), hostname varchar(255) NOT NULL, port varchar(255), username varchar(255) NOT NULL, password varchar(255) NOT NULL, tier0_gateway varchar(255), edge_cluster varchar(255), transport_zone varchar(255), created datetime NOT NULL COMMENT 'date created', removed datetime COMMENT 'date removed if not null', PRIMARY KEY (id), CONSTRAINT fk_nsx_providers__zone_id FOREIGN KEY fk_nsx_providers__zone_id (zone_id) REFERENCES data_center(id) ON DELETE CASCADE, INDEX i_nsx_providers__zone_id(zone_id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8
2025-06-16 13:03:13,999 ERROR [c.c.u.d.ScriptRunner] (main:[]) (logid:) java.sql.SQLSyntaxErrorException: Table 'nsx_providers' already exists
2025-06-16 13:03:14,005 ERROR [c.c.u.DatabaseUpgradeChecker] (main:[]) (logid:) Unable to execute upgrade script java.sql.SQLSyntaxErrorException: Table 'nsx_providers' already exists
at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:186)
at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:88)
at com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:242)
at com.cloud.upgrade.DatabaseUpgradeChecker.executeUpgrade(DatabaseUpgradeChecker.java:363)
at com.cloud.upgrade.DatabaseUpgradeChecker.executeUpgrades(DatabaseUpgradeChecker.java:339)
at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:305)
at com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:478)
at org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.checkIntegrity(CloudStackExtendedLifeCycle.java:62)
at org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLifeCycle.start(CloudStackExtendedLifeCycle.java:52)
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178)
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54)
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356)
at java.base/java.lang.Iterable.forEach(Iterable.java:75)
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155)

I am getting this error when upgrading the management to 4.20.1. I have upgraded all the host servers and then when I look to use the UI it isn't working due to this error. When I tried removing the table there are just more errors that continue to pop up.

versions

4.20.1

The steps to reproduce the bug

...

What to do about it?

No response

Activity

  1. weizhouapache commented on Jun 16, 2025

    @weizhouapache
    Member

    @apraba05
    Did you upgrade before and fail ?
    How many management servers do you have ?

  2. apraba05 commented on Jun 17, 2025

    @apraba05
    Author

    @weizhouapache It's running on one management server but I am unsure as to why there is this error.

  3. locked and limited conversation to collaborators on Jun 17, 2025
  4. converted this issue into a discussion #11046 on Jun 17, 2025
  5. added this to the unplanned milestone on Sep 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions