diff options
| author | Daniil Fedotov <dfedotov@pivotal.io> | 2015-12-08 14:06:52 +0000 |
|---|---|---|
| committer | Daniil Fedotov <dfedotov@pivotal.io> | 2015-12-08 14:07:36 +0000 |
| commit | d8ab7395d07f8b9d948db3928d9f79519e3ca831 (patch) | |
| tree | 1b63bc4798447aca3e1fc4b6635b5604ae8b9b81 | |
| parent | 40ce3d7f9e266e5e1ad63db1d8902b1bb7da6eed (diff) | |
| download | rabbitmq-server-git-d8ab7395d07f8b9d948db3928d9f79519e3ca831.tar.gz | |
Report backup directory if previous update is failed
| -rw-r--r-- | src/rabbit_upgrade.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/rabbit_upgrade.erl b/src/rabbit_upgrade.erl index daf39b8acc..f5efac141a 100644 --- a/src/rabbit_upgrade.erl +++ b/src/rabbit_upgrade.erl @@ -100,7 +100,12 @@ ensure_backup_taken() -> false -> ok = take_backup(); _ -> ok end; - true -> throw({error, previous_upgrade_failed}) + true -> + error("Lock file exist at location \"~s\". + Looks like previous upgrade is in process or has failed. + Backup could have been taken in directory \"~s\"", + [lock_filename(), backup_dir()]), + throw({error, previous_upgrade_failed}) end. take_backup() -> @@ -108,7 +113,7 @@ take_backup() -> case rabbit_mnesia:copy_db(BackupDir) of ok -> info("upgrades: Mnesia dir backed up to ~p~n", [BackupDir]); - {error, E} -> throw({could_not_back_up_mnesia_dir, E}) + {error, E} -> throw({could_not_back_up_mnesia_dir, E, BackupDir}) end. ensure_backup_removed() -> |
