From: Greg Farnum <gregory.farnum@dreamhost.com>
To: Wido den Hollander <wido@widodh.nl>
Cc: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: global_init fails when only specifying monitor address
Date: Fri, 27 Apr 2012 15:53:07 -0700 [thread overview]
Message-ID: <C6BC88030EB84991B22AB940ABFE912E@dreamhost.com> (raw)
In-Reply-To: <4F994883.3060805@widodh.nl>
On Thursday, April 26, 2012 at 6:07 AM, Wido den Hollander wrote:
> Hi,
>
> I tried to connect to a small Ceph setup on my desktop without cephx and
> that failed:
>
> root@stack01:~# ceph -m wido-desktop.widodh.nl:6789 (http://wido-desktop.widodh.nl:6789) -s
> global_init: unable to open config file.
> root@stack01:~#
>
> I however worked with:
>
> root@stack01:~# ceph -m wido-desktop.widodh.nl:6789 (http://wido-desktop.widodh.nl:6789) -c /dev/null -s
> 2012-04-26 14:55:33.828524 pg v148: 594 pgs: 594 active+clean; 0
> bytes data, 7740 KB used, 70571 MB / 76800 MB avail
> 2012-04-26 14:55:33.829622 mds e1: 0/0/1 up
> 2012-04-26 14:55:33.836144 osd e14: 3 osds: 3 up, 3 in
> 2012-04-26 14:55:33.886429 log 2012-04-26 14:52:50.674430 osd.1
> [2a00:f10:11c:ab:52e5:49ff:fec2:c976]:6807/28366 12 : [INF] 1.2b scrub ok
> 2012-04-26 14:55:33.892423 mon e1: 1 mons at
> {desktop=[2a00:f10:11c:ab:52e5:49ff:fec2:c976]:6789/0}
> root@stack01:~#
>
> I quick look at global_init.cc (http://global_init.cc) showed me why this happened, it simply
> looks for a configuration file to open and when it can't it fails.
>
> But if a monitor address is set, a config file shouldn't be mandatory.
>
> It could be accomplished rather simple by setting the flag
> CINIT_FLAG_NO_DEFAULT_CONFIG_FILE if a mon_host has been set, but to do
> that conf->parse_argv(args); should move a few lines up.
>
> Comments? Thoughts?
If this is a big annoyance for you, you can cherry-pick the head of wip-2352-hack to build a ceph tool that doesn't require a config file if you specify -m in a similar fashion to what you suggest. Unfortunately actually doing what you suggest would break everything (you need to parse the config file before parsing command-line options so that the command-line ones win…although it's possible parsing them twice would work, actually…) and this hack isn't appropriate to put upstream so I need to spend some time working out a more general fix (hopefully, one that lets executables specify the arguments they need and then requiring the config file iff those aren't all set on the command-line).
-Greg
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2012-04-27 22:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 13:07 global_init fails when only specifying monitor address Wido den Hollander
2012-04-26 16:33 ` Sage Weil
2012-04-26 16:57 ` Greg Farnum
2012-04-26 17:01 ` Wido den Hollander
2012-04-29 1:10 ` Colin McCabe
2012-05-01 16:36 ` Greg Farnum
2012-04-27 22:53 ` Greg Farnum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C6BC88030EB84991B22AB940ABFE912E@dreamhost.com \
--to=gregory.farnum@dreamhost.com \
--cc=ceph-devel@vger.kernel.org \
--cc=wido@widodh.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox