Title: Backup related upgrade failure from 4.20.1/4.20.2 to 4.21.0/4.22.0 · Issue #12769 · apache/cloudstack · GitHub
Open Graph Title: Backup related upgrade failure from 4.20.1/4.20.2 to 4.21.0/4.22.0 · Issue #12769 · apache/cloudstack
X Title: Backup related upgrade failure from 4.20.1/4.20.2 to 4.21.0/4.22.0 · Issue #12769 · apache/cloudstack
Description: problem When upgrading from either 4.20.1 or 4.20.2 to 4.21.0 or 4.22.0, upgrade could fail when backup framework is in use. An error like the following is seen, 2026-03-09 01:56:55,403 DEBUG [c.c.u.d.ScriptRunner] (main:[]) (logid:) -- ...
Open Graph Description: problem When upgrading from either 4.20.1 or 4.20.2 to 4.21.0 or 4.22.0, upgrade could fail when backup framework is in use. An error like the following is seen, 2026-03-09 01:56:55,403 DEBUG [c.c....
X Description: problem When upgrading from either 4.20.1 or 4.20.2 to 4.21.0 or 4.22.0, upgrade could fail when backup framework is in use. An error like the following is seen, 2026-03-09 01:56:55,403 DEBUG [c.c....
Opengraph URL: https://github.com/apache/cloudstack/issues/12769
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Backup related upgrade failure from 4.20.1/4.20.2 to 4.21.0/4.22.0","articleBody":"### problem\n\nWhen upgrading from either 4.20.1 or 4.20.2 to 4.21.0 or 4.22.0, upgrade could fail when backup framework is in use.\nAn error like the following is seen,\n```\n2026-03-09 01:56:55,403 DEBUG [c.c.u.d.ScriptRunner] (main:[]) (logid:) -- Add diskOfferingId, deviceId, minIops and maxIops to backed_volumes in backups table\n2026-03-09 01:56:55,403 DEBUG [c.c.u.d.ScriptRunner] (main:[]) (logid:) UPDATE `cloud`.`backups` b INNER JOIN `cloud`.`vm_instance` vm ON b.vm_id = vm.id SET b.backed_volumes = ( SELECT CONCAT(\"[\", GROUP_CONCAT( CONCAT( \"{\\\"uuid\\\":\\\"\", v.uuid, \"\\\",\", \"\\\"type\\\":\\\"\", v.volume_type, \"\\\",\", \"\\\"size\\\":\", v.`size`, \",\", \"\\\"path\\\":\\\"\", IFNULL(v.path, 'null'), \"\\\",\", \"\\\"deviceId\\\":\", IFNULL(v.device_id, 'null'), \",\", \"\\\"diskOfferingId\\\":\\\"\", doff.uuid, \"\\\",\", \"\\\"minIops\\\":\", IFNULL(v.min_iops, 'null'), \",\", \"\\\"maxIops\\\":\", IFNULL(v.max_iops, 'null'), \"}\" ) SEPARATOR \",\" ), \"]\") FROM `cloud`.`volumes` v LEFT JOIN `cloud`.`disk_offering` doff ON v.disk_offering_id = doff.id WHERE v.instance_id = vm.id )\n2026-03-09 01:56:55,458 ERROR [c.c.u.d.ScriptRunner] (main:[]) (logid:) Error executing: UPDATE `cloud`.`backups` b INNER JOIN `cloud`.`vm_instance` vm ON b.vm_id = vm.id SET b.backed_volumes = ( SELECT CONCAT(\"[\", GROUP_CONCAT( CONCAT( \"{\\\"uuid\\\":\\\"\", v.uuid, \"\\\",\", \"\\\"type\\\":\\\"\", v.volume_type, \"\\\",\", \"\\\"size\\\":\", v.`size`, \",\", \"\\\"path\\\":\\\"\", IFNULL(v.path, 'null'), \"\\\",\", \"\\\"deviceId\\\":\", IFNULL(v.device_id, 'null'), \",\", \"\\\"diskOfferingId\\\":\\\"\", doff.uuid, \"\\\",\", \"\\\"minIops\\\":\", IFNULL(v.min_iops, 'null'), \",\", \"\\\"maxIops\\\":\", IFNULL(v.max_iops, 'null'), \"}\" ) SEPARATOR \",\" ), \"]\") FROM `cloud`.`volumes` v LEFT JOIN `cloud`.`disk_offering` doff ON v.disk_offering_id = doff.id WHERE v.instance_id = vm.id )\n2026-03-09 01:56:55,475 ERROR [c.c.u.d.ScriptRunner] (main:[]) (logid:) java.sql.SQLException: Row 19 was cut by GROUP_CONCAT()\n2026-03-09 01:56:55,495 ERROR [c.c.u.DatabaseUpgradeChecker] (main:[]) (logid:) Unable to execute upgrade script java.sql.SQLException: Row 19 was cut by GROUP_CONCAT()\n at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:186)\n at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:88)\n```\n\nThis is due to the following DB changes in the 4.20.1to4.21.0 upgrade path,\nhttps://github.com/apache/cloudstack/blob/main/engine/schema/src/main/resources/META-INF/db/schema-42010to42100.sql#L686-L709\n\nThe error is due to the length limit for `group_concat_max_len` in MySQL and it could be seen if there are backups for VMs having multiple volumes (possible 3 or more).\n\nWorkaround is setting value for `group_concat_max_len`:\n`SET GLOBAL group_concat_max_len = 1000000;`\n\n### versions\n\nUpgrade 4.20.x to 4.21/4.22","author":{"url":"https://github.com/shwstppr","@type":"Person","name":"shwstppr"},"datePublished":"2026-03-09T11:24:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/12769/cloudstack/issues/12769"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1315d7ce-fcaa-1cd9-bccf-1f1a5bffbc5a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 95D4:6529:177875:21C923:6A4E64BB |
| html-safe-nonce | a93a634418d51211c6dc44abc76e6b5c7083ba2873dedc6aae311321af7b9a7c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUQ0OjY1Mjk6MTc3ODc1OjIxQzkyMzo2QTRFNjRCQiIsInZpc2l0b3JfaWQiOiI5OTQ4OTg1OTU3MzQ3NzQ5NzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2a448ce8d6ccc7cda5694ea53a1987581923caa09ca5d0ca3be8f279157acbf0 |
| hovercard-subject-tag | issue:4045015535 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/12769/issue_layout |
| twitter:image | https://opengraph.githubassets.com/837f468851d857bb2d2f5258688f0c6b507f209ea74ccedf8a1f8391ca4f7a98/apache/cloudstack/issues/12769 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/837f468851d857bb2d2f5258688f0c6b507f209ea74ccedf8a1f8391ca4f7a98/apache/cloudstack/issues/12769 |
| og:image:alt | problem When upgrading from either 4.20.1 or 4.20.2 to 4.21.0 or 4.22.0, upgrade could fail when backup framework is in use. An error like the following is seen, 2026-03-09 01:56:55,403 DEBUG [c.c.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shwstppr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/cloudstack git https://github.com/apache/cloudstack.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 9759448 |
| octolytics-dimension-repository_nwo | apache/cloudstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9759448 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width