X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fceph_mgr.cc;fp=src%2Fceph%2Fsrc%2Fceph_mgr.cc;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=5e8f6798e3924271ba21ed375b25931ed0cba81e;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/ceph_mgr.cc b/src/ceph/src/ceph_mgr.cc deleted file mode 100644 index 5e8f679..0000000 --- a/src/ceph/src/ceph_mgr.cc +++ /dev/null @@ -1,76 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab -/* - * Ceph - scalable distributed file system - * - * Copyright (C) 2015 Red Hat Inc - * - * Author: John Spray - * - * This is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software - * Foundation. See file COPYING. - * - */ - -#include - -#include - -#include "include/types.h" -#include "include/compat.h" -#include "common/config.h" -#include "common/ceph_argparse.h" -#include "common/errno.h" -#include "common/pick_address.h" -#include "global/global_init.h" - -#include "mgr/MgrStandby.h" - -static void usage() -{ - cout << "usage: ceph-mgr -i [flags]\n" - << std::endl; - generic_server_usage(); -} - -/** - * A short main() which just instantiates a MgrStandby and - * hands over control to that. - */ -int main(int argc, const char **argv) -{ - ceph_pthread_setname(pthread_self(), "ceph-mgr"); - - vector args; - argv_to_vec(argc, argv, args); - env_to_vec(args); - - auto cct = global_init(NULL, args, CEPH_ENTITY_TYPE_MGR, - CODE_ENVIRONMENT_DAEMON, 0, - "mgr_data"); - // For consumption by KeyRing::from_ceph_context in MonClient - g_conf->set_val_or_die("keyring", "$mgr_data/keyring"); - - // Handle --help - if ((args.size() == 1 && (std::string(args[0]) == "--help" || std::string(args[0]) == "-h"))) { - usage(); - } - - pick_addresses(g_ceph_context, CEPH_PICK_ADDRESS_PUBLIC); - - global_init_daemonize(g_ceph_context); - global_init_chdir(g_ceph_context); - common_init_finish(g_ceph_context); - - MgrStandby mgr(argc, argv); - int rc = mgr.init(); - if (rc != 0) { - std::cerr << "Error in initialization: " << cpp_strerror(rc) << std::endl; - return rc; - } - - return mgr.main(args); -} -