GutoVeronezi commented on code in PR #6320:
URL: https://github.com/apache/cloudstack/pull/6320#discussion_r870665583
##########
plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/veeam/VeeamClient.java:
##########
@@ -324,6 +316,21 @@ private boolean checkTaskStatus(final HttpResponse
response) throws IOException
return false;
}
+ protected boolean checkIfRestoreSessionFinished(String type, String path)
throws IOException {
+ for (int j = 0; j < this.restoreTimeout; j++) {
+ HttpResponse relatedResponse = get(path);
+ RestoreSession session =
parseRestoreSessionResponse(relatedResponse);
+ if (session.getResult().equals("Success")) {
+ return true;
+ }
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException ignored) {
+ }
Review Comment:
I think it would be good, at least, to put a trace log here.
##########
plugins/backup/veeam/src/main/java/org/apache/cloudstack/backup/VeeamBackupProvider.java:
##########
@@ -77,6 +77,9 @@ public class VeeamBackupProvider extends AdapterBase
implements BackupProvider,
private ConfigKey<Integer> VeeamApiRequestTimeout = new
ConfigKey<>("Advanced", Integer.class, "backup.plugin.veeam.request.timeout",
"300",
"The Veeam B&R API request timeout in seconds.", true,
ConfigKey.Scope.Zone);
+ private ConfigKey<Integer> VeeamRestoreTimeout = new
ConfigKey<>("Advanced", Integer.class, "backup.plugin.veeam.restore.timeout",
"600",
Review Comment:
@SadiJr, shouldn't this config be returned in `getConfigKeys`?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]