olivierlemasle opened a new issue #4965:
URL: https://github.com/apache/cloudstack/issues/4965
##### ISSUE TYPE
* Bug Report
##### COMPONENT NAME
~~~
DB, Backup
~~~
##### CLOUDSTACK VERSION
~~~
4.14.1.0
4.15.0.0
~~~
##### CONFIGURATION
`backup.framework.enabled = true`
B&R framework enabled, with either Veeam or dummy provider (issue reproduced
with both providers)
##### OS / ENVIRONMENT
OS: CentOS Linux 7
Database: issue reproduced with:
- mariadb-5.5.68-1.el7.x86_64 (Server version: `5.5.68-MariaDB MariaDB
Server`)
- MySQL 5.5 (Server version: `5.5.62 MySQL Community Server (GPL)`)
##### SUMMARY
When a VM instance with at least 3 volumes is backed up using CloudStack B&R
framework, `listBackups` fail because `backup_volumes` data is truncated in
database.
##### STEPS TO REPRODUCE
- Enable B&R (`backup.framework.enabled = true`)
- Deploy a VM with a DATA volume
- Add another DATA volume to the VM, which has now 3 volumes (1 ROOT volume,
2 DATA volumes)
- Assign the VM to a backup offering
- Create a backup of the VM
- Try listing backups for the VM
##### EXPECTED RESULTS
~~~
An API response with the VM backups
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
<!-- Paste verbatim command output between quotes below -->
~~~
com.google.gson.stream.MalformedJsonException: Unterminated string near
~~~
or
~~~
java.io.EOFException: End of input
~~~
The first error was seen when `cloud.vm.instance.backup_volumes` was:
```
[{"uuid":"72a056e0-abec-4036-a779-575f645e6e0f","type":"DATADISK","size":10737418240,"path":"1630d4b0ad0a436caf146a7ef0486012"},{"uuid":"254d83d3-b0d7-4aea-bed4-585009e0603b","type":"ROOT","size":21474836480,"path":"ROOT-8207_2"},{"uuid":"7e8da461-b75d-42
```
The second error was seen when `cloud.vm.instance.backup_volumes` was:
```
[{"uuid":"fa90e222-f4c2-4034-8ae7-ca61a3e4c5ac","type":"ROOT","size":8589934592,"path":"fa90e222-f4c2-4034-8ae7-ca61a3e4c5ac"},{"uuid":"ffee8d81-77d4-49f5-ac31-4e57fbdb2e40","type":"DATADISK","size":5368709120,"path":"ffee8d81-77d4-49f5-ac31-4e57fbdb2e40"
```
Both errors are caused by a JSON object representing backup volumes, which
is truncated at 256 characters in database.
Please note that `cloud.vm.instance.backup_volumes` has data type TEXT, so
it should store up to 65,535 characters...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]