mirror of https://github.com/apache/cloudstack.git
upload fix-1
This commit is contained in:
parent
5389fe60aa
commit
aae158b2af
|
|
@ -23,18 +23,16 @@ public class CreateImageTransferCommand extends Command {
|
|||
private String transferId;
|
||||
private String hostIpAddress;
|
||||
private String exportName;
|
||||
private String volumePath;
|
||||
private int nbdPort;
|
||||
private String direction;
|
||||
|
||||
public CreateImageTransferCommand() {
|
||||
}
|
||||
|
||||
public CreateImageTransferCommand(String transferId, String hostIpAddress, String exportName, String volumePath, int nbdPort, String direction) {
|
||||
public CreateImageTransferCommand(String transferId, String hostIpAddress, String exportName, int nbdPort, String direction) {
|
||||
this.transferId = transferId;
|
||||
this.hostIpAddress = hostIpAddress;
|
||||
this.exportName = exportName;
|
||||
this.volumePath = volumePath;
|
||||
this.nbdPort = nbdPort;
|
||||
this.direction = direction;
|
||||
}
|
||||
|
|
@ -60,10 +58,6 @@ public class CreateImageTransferCommand extends Command {
|
|||
return true;
|
||||
}
|
||||
|
||||
public String getVolumePath() {
|
||||
return volumePath;
|
||||
}
|
||||
|
||||
public String getDirection() {
|
||||
return direction;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public class ImageTransferVO implements ImageTransfer {
|
|||
private String uuid;
|
||||
|
||||
@Column(name = "backup_id")
|
||||
private long backupId;
|
||||
private Long backupId;
|
||||
|
||||
@Column(name = "disk_id")
|
||||
private long diskId;
|
||||
|
|
|
|||
|
|
@ -293,7 +293,6 @@ public class IncrementalBackupServiceImpl extends ManagerBase implements Increme
|
|||
transferId,
|
||||
host.getPrivateIpAddress(),
|
||||
volume.getUuid(),
|
||||
null,
|
||||
backup.getNbdPort(),
|
||||
cmd.getDirection().toString()
|
||||
);
|
||||
|
|
@ -354,13 +353,15 @@ public class IncrementalBackupServiceImpl extends ManagerBase implements Increme
|
|||
Long poolId = volume.getPoolId();
|
||||
StoragePoolVO storagePoolVO = primaryDataStoreDao.findById(poolId);
|
||||
Host host = getFirstHostFromStoragePool(storagePoolVO);
|
||||
// todo: This only works with file based storage (not ceph, linbit)
|
||||
String volumePath = String.format("/mnt/%s/%s", storagePoolVO.getUuid(), volume.getPath());
|
||||
|
||||
StartNBDServerAnswer nbdServerAnswer;
|
||||
StartNBDServerCommand nbdServerCmd = new StartNBDServerCommand(
|
||||
transferId,
|
||||
host.getPrivateIpAddress(),
|
||||
volume.getUuid(),
|
||||
volume.getPath(),
|
||||
volumePath,
|
||||
nbdPort,
|
||||
cmd.getDirection().toString()
|
||||
);
|
||||
|
|
@ -379,7 +380,6 @@ public class IncrementalBackupServiceImpl extends ManagerBase implements Increme
|
|||
transferId,
|
||||
host.getPrivateIpAddress(),
|
||||
volume.getUuid(),
|
||||
volume.getPath(),
|
||||
nbdPort,
|
||||
cmd.getDirection().toString()
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3741,7 +3741,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
|
|||
stopScript.add(String.format("systemctl stop %s", unitName));
|
||||
stopScript.execute();
|
||||
resetService(unitName);
|
||||
logger.info(String.format("Image server %s stoppped", unitName));
|
||||
logger.info(String.format("Image server %s stopped", unitName));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -3759,7 +3759,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
|
|||
}
|
||||
|
||||
String systemdRunCmd = String.format(
|
||||
"systemd-run --unit=%s --property=Restart=no /usr/bin/python3 %s --listen 0.0.0.0 --port 54323",
|
||||
"systemd-run --unit=%s --property=Restart=no /usr/bin/python3 %s --listen 0.0.0.0 --port %d",
|
||||
unitName, imageServerScript, imageServerPort);
|
||||
|
||||
Script startScript = new Script("/bin/bash", logger);
|
||||
|
|
@ -3785,7 +3785,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
|
|||
String verifyResult = verifyScript.execute();
|
||||
if (verifyResult == null) {
|
||||
serviceActive = true;
|
||||
logger.info(String.format("Image server is now active (attempt %d)", unitName, attempt + 1));
|
||||
logger.info(String.format("Image server is now active (attempt %d)", attempt + 1));
|
||||
break;
|
||||
}
|
||||
try {
|
||||
|
|
@ -3797,7 +3797,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
|
|||
}
|
||||
|
||||
if (!serviceActive) {
|
||||
logger.error(String.format("Image server failed to start within %d seconds", unitName, maxWaitSeconds));
|
||||
logger.error(String.format("Image server failed to start within %d seconds", maxWaitSeconds));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue