mon/OSDMonitor : Use user provided ruleset for replicated pool

When creating a replicated pool, currently ceph ignore the ruleset
name provided by user but use a global default ruleset.

This patch fix this bug, so the rulset specified by
 ceph osd pool create <pg_num> <pgp_num> replicated <my_ruleset_name>
can be properly set.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
On Mon, 4 Aug 2014, Loic Dachary wrote:
> In src/mon/OSDMonitor.cc:
> 
> > @@ -5037,8 +5041,13 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m,
> >      cmd_getval(g_ceph_context, cmdmap, "ruleset", ruleset_name);
> >      string erasure_code_profile;
> >      cmd_getval(g_ceph_context, cmdmap, "erasure_code_profile", erasure_code_profile);
> > -    if (erasure_code_profile == "")
> > -      erasure_code_profile = "default";
> > +    if (pool_type == pg_pool_t::TYPE_REPLICATED)
> > +      //FIXME:for replicated pool,cmd_map will put ruleset_name to erasure_code_profile field
> 
> There is no convenient way to fix this. Instead, the argument could be renamed in
> https://github.com/ceph/ceph/blob/master/src/mon/MonCommands.h#L554 to reflect the fact that it depends on the context (for instance
> profile_or_ruleset ) ?

Note sure we should rename the argument since they are passed by name via 
the REST API...