}
common_installer::Step::Status StepParseRpkManifest::process() {
+ if (context_->force_clean_from_db.get())
+ return Step::Status::OK;
+ if (!LocateConfigFile()) {
+ // continue if this is recovery, manifest file may never been created
+ if (manifest_location_ == ManifestLocation::RECOVERY) {
+ LOG(DEBUG) << "Manifest for recovery not found";
+ return Step::Status::OK;
+ }
+ LOG(ERROR) << "No manifest file exists";
+ return Step::Status::MANIFEST_NOT_FOUND;
+ }
+
+ parser_.reset(new rpk::parse::RPKConfigParser());
+ if (!parser_->ParseManifest(path_)) {
+ if (manifest_location_ == ManifestLocation::RECOVERY) {
+ LOG(DEBUG) << "Manifest for recovery is invalid";
+ bf::remove(path_);
+ return Step::Status::OK;
+ }
+ LOG(ERROR) << "[Parse] Parse failed. " << parser_->GetErrorMessage();
+ return Step::Status::PARSE_ERROR;
+ }
+
return common_installer::Step::Status::OK;
}