fix start nbd server

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
Abhishek Kumar 2026-02-27 13:17:54 +05:30
parent 196dd7fb28
commit 0dadbadb52
1 changed files with 8 additions and 0 deletions

View File

@ -386,8 +386,16 @@ public class IncrementalBackupServiceImpl extends ManagerBase implements Increme
private void startNBDServer(String transferId, String direction, Long hostId, String exportName, String volumePath) {
StartNBDServerAnswer nbdServerAnswer;
if (hostId == null) {
throw new CloudRuntimeException("Host cannot be determined for starting NBD server");
}
HostVO host = hostDao.findById(hostId);
if (host == null) {
throw new CloudRuntimeException("Host cannot be found for starting NBD server with ID: " + hostId);
}
StartNBDServerCommand nbdServerCmd = new StartNBDServerCommand(
transferId,
host.getPublicIpAddress(),
exportName,
volumePath,
transferId,