Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: ceph-objectstore-tool: Use exit status 11 for incompatible import attemp... #4129

Merged
merged 1 commit into from Mar 21, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/tools/ceph_objectstore_tool.cc
Expand Up @@ -1732,7 +1732,7 @@ int do_import(ObjectStore *store, OSDSuperblock& sb)
cerr << std::endl;
cerr << "If you wish to import, first do 'ceph-objectstore-tool...--op set-allow-sharded-objects'" << std::endl;
}
return 1;
return 11; // Assume no +EAGAIN gets to end of main() until we clean up error code handling
}

// Don't import if pool no longer exists
Expand All @@ -1745,7 +1745,7 @@ int do_import(ObjectStore *store, OSDSuperblock& sb)
if (!curmap.have_pg_pool(pgid.pgid.m_pool)) {
cerr << "Pool " << pgid.pgid.m_pool << " no longer exists" << std::endl;
// Special exit code for this error, used by test code
return 10;
return 10; // Assume no +ECHILD gets to end of main() until we clean up error code handling
}

log_oid = OSD::make_pg_log_oid(pgid);
Expand Down Expand Up @@ -3078,5 +3078,8 @@ int main(int argc, char **argv)
return 1;
}

// Check for -errno accidentally getting here
if (ret < 0)
ret = 1;
return ret;
}