Commit 96e45bb6 authored by Joel Hockey's avatar Joel Hockey Committed by Commit Bot

Add more output to Backup export failure

crostini.BackupRestore tast test is failing due to failing to share the
backup file, so adding more context to log message to help debug.

Bug: 1130412
Change-Id: I6e1e2e33044532d7acd2b8695f9411b5d8f8265c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2418529
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Commit-Queue: Nicholas Verne <nverne@chromium.org>
Auto-Submit: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: default avatarNicholas Verne <nverne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808791}
parent dd783510
...@@ -296,7 +296,7 @@ void CrostiniExportImport::Start( ...@@ -296,7 +296,7 @@ void CrostiniExportImport::Start(
kCrostiniDefaultVmName, path, false, kCrostiniDefaultVmName, path, false,
base::BindOnce(&CrostiniExportImport::ExportAfterSharing, base::BindOnce(&CrostiniExportImport::ExportAfterSharing,
weak_ptr_factory_.GetWeakPtr(), weak_ptr_factory_.GetWeakPtr(),
operation_data->container_id, operation_data->container_id, path,
std::move(callback)))); std::move(callback))));
break; break;
case ExportImportType::IMPORT: case ExportImportType::IMPORT:
...@@ -304,19 +304,22 @@ void CrostiniExportImport::Start( ...@@ -304,19 +304,22 @@ void CrostiniExportImport::Start(
kCrostiniDefaultVmName, path, false, kCrostiniDefaultVmName, path, false,
base::BindOnce(&CrostiniExportImport::ImportAfterSharing, base::BindOnce(&CrostiniExportImport::ImportAfterSharing,
weak_ptr_factory_.GetWeakPtr(), weak_ptr_factory_.GetWeakPtr(),
operation_data->container_id, std::move(callback))); operation_data->container_id, path,
std::move(callback)));
break; break;
} }
} }
void CrostiniExportImport::ExportAfterSharing( void CrostiniExportImport::ExportAfterSharing(
const ContainerId& container_id, const ContainerId& container_id,
const base::FilePath& path,
CrostiniManager::CrostiniResultCallback callback, CrostiniManager::CrostiniResultCallback callback,
const base::FilePath& container_path, const base::FilePath& container_path,
bool result, bool result,
const std::string& failure_reason) { const std::string& failure_reason) {
if (!result) { if (!result) {
LOG(ERROR) << "Error sharing for export " << container_path.value() << ": " LOG(ERROR) << "Error sharing for export host path=" << path.value()
<< ", container path=" << container_path.value() << ": "
<< failure_reason; << failure_reason;
auto it = status_trackers_.find(container_id); auto it = status_trackers_.find(container_id);
if (it != status_trackers_.end()) { if (it != status_trackers_.end()) {
...@@ -468,12 +471,14 @@ void CrostiniExportImport::OnExportContainerProgress( ...@@ -468,12 +471,14 @@ void CrostiniExportImport::OnExportContainerProgress(
void CrostiniExportImport::ImportAfterSharing( void CrostiniExportImport::ImportAfterSharing(
const ContainerId& container_id, const ContainerId& container_id,
const base::FilePath& path,
CrostiniManager::CrostiniResultCallback callback, CrostiniManager::CrostiniResultCallback callback,
const base::FilePath& container_path, const base::FilePath& container_path,
bool result, bool result,
const std::string& failure_reason) { const std::string& failure_reason) {
if (!result) { if (!result) {
LOG(ERROR) << "Error sharing for import " << container_path.value() << ": " LOG(ERROR) << "Error sharing for import path=" << path
<< ", container path=" << container_path.value() << ": "
<< failure_reason; << failure_reason;
auto it = status_trackers_.find(container_id); auto it = status_trackers_.find(container_id);
if (it != status_trackers_.end()) { if (it != status_trackers_.end()) {
......
...@@ -202,6 +202,7 @@ class CrostiniExportImport : public KeyedService, ...@@ -202,6 +202,7 @@ class CrostiniExportImport : public KeyedService,
uint64_t minimum_required_space) override; uint64_t minimum_required_space) override;
void ExportAfterSharing(const ContainerId& container_id, void ExportAfterSharing(const ContainerId& container_id,
const base::FilePath& path,
CrostiniManager::CrostiniResultCallback callback, CrostiniManager::CrostiniResultCallback callback,
const base::FilePath& container_path, const base::FilePath& container_path,
bool result, bool result,
...@@ -214,6 +215,7 @@ class CrostiniExportImport : public KeyedService, ...@@ -214,6 +215,7 @@ class CrostiniExportImport : public KeyedService,
uint64_t compressed_size); uint64_t compressed_size);
void ImportAfterSharing(const ContainerId& container_id, void ImportAfterSharing(const ContainerId& container_id,
const base::FilePath& path,
CrostiniManager::CrostiniResultCallback callback, CrostiniManager::CrostiniResultCallback callback,
const base::FilePath& container_path, const base::FilePath& container_path,
bool result, bool result,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment