Skip to content

Commit

Permalink
Merge remote-tracking branch 'gh/next'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sage Weil committed Jun 25, 2013
2 parents 3791a1e + 9ae0ec8 commit 37a2017
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ To build the source code, you must install the following:
- libleveldb-dev
- libsnappy-dev
- libcurl4-gnutls-dev
- python-argparse

For example:

$ apt-get install automake autoconf pkg-config gcc g++ make libboost-dev libedit-dev libssl-dev libtool libfcgi libfcgi-dev libfuse-dev linux-kernel-headers libcrypto++-dev libaio-dev libgoogle-perftools-dev libkeyutils-dev uuid-dev libatomic-ops-dev libboost-program-options-dev libboost-thread-dev libexpat1-dev libleveldb-dev libsnappy-dev libcurl4-gnutls-dev
$ apt-get install automake autoconf pkg-config gcc g++ make libboost-dev libedit-dev libssl-dev libtool libfcgi libfcgi-dev libfuse-dev linux-kernel-headers libcrypto++-dev libaio-dev libgoogle-perftools-dev libkeyutils-dev uuid-dev libatomic-ops-dev libboost-program-options-dev libboost-thread-dev libexpat1-dev libleveldb-dev libsnappy-dev libcurl4-gnutls-dev python-argparse
24 changes: 24 additions & 0 deletions src/common/pick_address.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,24 @@ static const struct sockaddr *find_ip_in_subnet_list(CephContext *cct,
return NULL;
}

// observe this change
struct Observer : public md_config_obs_t {
const char *conf_var;
Observer(const char *c) : conf_var(c) {}

const char** get_tracked_conf_keys() const {
static const char *foo[] = {
conf_var,
NULL
};
return foo;
}
void handle_conf_change(const struct md_config_t *conf,
const std::set <std::string> &changed) {
// do nothing.
}
};

static void fill_in_one_address(CephContext *cct,
const struct ifaddrs *ifa,
const string networks,
Expand Down Expand Up @@ -75,8 +93,14 @@ static void fill_in_one_address(CephContext *cct,
exit(1);
}

Observer obs(conf_var);

cct->_conf->add_observer(&obs);

cct->_conf->set_val_or_die(conf_var, buf);
cct->_conf->apply_changes(NULL);

cct->_conf->remove_observer(&obs);
}

void pick_addresses(CephContext *cct, int needs)
Expand Down
2 changes: 1 addition & 1 deletion src/init-radosgw.sysv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/bash -x
#! /bin/bash
### BEGIN INIT INFO
# Provides: radosgw
# Required-Start: $remote_fs $named $network $time
Expand Down
8 changes: 5 additions & 3 deletions src/mon/AuthMonitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ void AuthMonitor::create_initial()
{
dout(10) << "create_initial -- creating initial map" << dendl;

// initialize rotating keys
last_rotating_ver = 0;
check_rotate();
assert(pending_auth.size() == 1);

KeyRing keyring;
bufferlist bl;
int ret = mon->store->get("mkfs", "keyring", bl);
Expand All @@ -110,9 +115,6 @@ void AuthMonitor::create_initial()
inc.inc_type = GLOBAL_ID;
inc.max_global_id = max_global_id;
pending_auth.push_back(inc);

// initalize rotating keys, too
check_rotate();
}

void AuthMonitor::update_from_paxos(bool *need_bootstrap)
Expand Down
1 change: 1 addition & 0 deletions src/mon/Elector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ void Elector::dispatch(Message *m)
t.put("monmap", "last_committed", mon->monmap->epoch);
mon->store->apply_transaction(t);
//mon->monmon()->paxos->stash_latest(mon->monmap->epoch, em->monmap_bl);
cancel_timer();
mon->bootstrap();
m->put();
delete peermap;
Expand Down
1 change: 1 addition & 0 deletions src/mon/Monitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,7 @@ void Monitor::reset()
{
dout(10) << "reset" << dendl;

cancel_probe_timeout();
timecheck_finish();

leader_since = utime_t();
Expand Down

0 comments on commit 37a2017

Please sign in to comment.