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

common: remove \n on clog messages #13794

Merged
merged 1 commit into from Mar 7, 2017
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/mds/CDir.cc
Expand Up @@ -1698,7 +1698,7 @@ CDentry *CDir::_load_dentry(
<< " [" << first << "," << last << "] v" << inode_data.inode.version
<< " at " << dirpath << "/" << dname
<< ", but inode " << in->vino() << " v" << in->inode.version
<< " already exists at " << inopath << "\n";
<< " already exists at " << inopath;
return dn;
}
}
Expand Down Expand Up @@ -2218,7 +2218,7 @@ void CDir::_committed(int r, version_t v)
if (r < 0) {
dout(1) << "commit error " << r << " v " << v << dendl;
cache->mds->clog->error() << "failed to commit dir " << dirfrag() << " object,"
<< " errno " << r << "\n";
<< " errno " << r;
cache->mds->handle_write_error(r);
return;
}
Expand Down
14 changes: 7 additions & 7 deletions src/mds/CInode.cc
Expand Up @@ -990,7 +990,7 @@ void CInode::_stored(int r, version_t v, Context *fin)
if (r < 0) {
dout(1) << "store error " << r << " v " << v << " on " << *this << dendl;
mdcache->mds->clog->error() << "failed to store ino " << ino() << " object,"
<< " errno " << r << "\n";
<< " errno " << r;
mdcache->mds->handle_write_error(r);
fin->complete(r);
return;
Expand Down Expand Up @@ -1207,7 +1207,7 @@ void CInode::_stored_backtrace(int r, version_t v, Context *fin)
mdcache->mds->clog->error() << "failed to store backtrace on ino "
<< ino() << " object"
<< ", pool " << get_backtrace_pool()
<< ", errno " << r << "\n";
<< ", errno " << r;
mdcache->mds->handle_write_error(r);
if (fin)
fin->complete(r);
Expand Down Expand Up @@ -1272,7 +1272,7 @@ void CInode::verify_diri_backtrace(bufferlist &bl, int err)

if (err) {
MDSRank *mds = mdcache->mds;
mds->clog->error() << "bad backtrace on dir ino " << ino() << "\n";
mds->clog->error() << "bad backtrace on dir ino " << ino();
assert(!"bad backtrace" == (g_conf->mds_verify_backtrace > 1));

_mark_dirty_parent(mds->mdlog->get_current_segment(), false);
Expand Down Expand Up @@ -2020,7 +2020,7 @@ void CInode::finish_scatter_gather_update(int type)
if (pf->fragstat.nfiles < 0 ||
pf->fragstat.nsubdirs < 0) {
clog->error() << "bad/negative dir size on "
<< dir->dirfrag() << " " << pf->fragstat << "\n";
<< dir->dirfrag() << " " << pf->fragstat;
assert(!"bad/negative fragstat" == g_conf->mds_verify_scatter);

if (pf->fragstat.nfiles < 0)
Expand Down Expand Up @@ -2057,7 +2057,7 @@ void CInode::finish_scatter_gather_update(int type)
dout(20) << " dirstat mismatch, fixing" << dendl;
} else {
clog->error() << "unmatched fragstat on " << ino() << ", inode has "
<< pi->dirstat << ", dirfrags have " << dirstat << "\n";
<< pi->dirstat << ", dirfrags have " << dirstat;
assert(!"unmatched fragstat" == g_conf->mds_verify_scatter);
}
// trust the dirfrags for now
Expand All @@ -2074,7 +2074,7 @@ void CInode::finish_scatter_gather_update(int type)
if (pi->dirstat.nfiles < 0 ||
pi->dirstat.nsubdirs < 0) {
clog->error() << "bad/negative fragstat on " << ino()
<< ", inode has " << pi->dirstat << "\n";
<< ", inode has " << pi->dirstat;
assert(!"bad/negative fragstat" == g_conf->mds_verify_scatter);

if (pi->dirstat.nfiles < 0)
Expand Down Expand Up @@ -2164,7 +2164,7 @@ void CInode::finish_scatter_gather_update(int type)
dout(20) << " rstat mismatch, fixing" << dendl;
} else {
clog->error() << "unmatched rstat on " << ino() << ", inode has "
<< pi->rstat << ", dirfrags have " << rstat << "\n";
<< pi->rstat << ", dirfrags have " << rstat;
assert(!"unmatched rstat" == g_conf->mds_verify_scatter);
}
// trust the dirfrag for now
Expand Down
4 changes: 2 additions & 2 deletions src/mds/InoTable.cc
Expand Up @@ -108,7 +108,7 @@ void InoTable::replay_alloc_id(inodeno_t id)
projected_free.erase(id);
} else {
mds->clog->error() << "journal replay alloc " << id
<< " not in free " << free << "\n";
<< " not in free " << free;
}
projected_version = ++version;
}
Expand All @@ -124,7 +124,7 @@ void InoTable::replay_alloc_ids(interval_set<inodeno_t>& ids)
projected_free.subtract(ids);
} else {
mds->clog->error() << "journal replay alloc " << ids << ", only "
<< is << " is in free " << free << "\n";
<< is << " is in free " << free;
free.subtract(is);
projected_free.subtract(is);
}
Expand Down
4 changes: 2 additions & 2 deletions src/mds/Locker.cc
Expand Up @@ -2586,7 +2586,7 @@ void Locker::handle_client_caps(MClientCaps *m)
ss << "client." << session->get_client() << " does not advance its oldest_flush_tid ("
<< m->get_oldest_flush_tid() << "), "
<< session->get_num_completed_flushes()
<< " completed flushes recorded in session\n";
<< " completed flushes recorded in session";
mds->clog->warn() << ss.str();
dout(20) << __func__ << " " << ss.str() << dendl;
}
Expand Down Expand Up @@ -3499,7 +3499,7 @@ void Locker::caps_tick()
stringstream ss;
ss << "client." << cap->get_client() << " isn't responding to mclientcaps(revoke), ino "
<< cap->get_inode()->ino() << " pending " << ccap_string(cap->pending())
<< " issued " << ccap_string(cap->issued()) << ", sent " << age << " seconds ago\n";
<< " issued " << ccap_string(cap->issued()) << ", sent " << age << " seconds ago";
mds->clog->warn() << ss.str();
dout(20) << __func__ << " " << ss.str() << dendl;
} else {
Expand Down
10 changes: 5 additions & 5 deletions src/mds/MDCache.cc
Expand Up @@ -2270,7 +2270,7 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
if (pi->dirstat.size() != pf->fragstat.size()) {
mds->clog->error() << "unmatched fragstat size on single dirfrag "
<< parent->dirfrag() << ", inode has " << pi->dirstat
<< ", dirfrag has " << pf->fragstat << "\n";
<< ", dirfrag has " << pf->fragstat;

// trust the dirfrag for now
pi->dirstat = pf->fragstat;
Expand Down Expand Up @@ -2318,7 +2318,7 @@ void MDCache::predirty_journal_parents(MutationRef mut, EMetaBlob *blob,
if (pi->rstat.rbytes != pf->rstat.rbytes) {
mds->clog->error() << "unmatched rstat rbytes on single dirfrag "
<< parent->dirfrag() << ", inode has " << pi->rstat
<< ", dirfrag has " << pf->rstat << "\n";
<< ", dirfrag has " << pf->rstat;

// trust the dirfrag for now
pi->rstat = pf->rstat;
Expand Down Expand Up @@ -5617,7 +5617,7 @@ void MDCache::export_remaining_imported_caps()
cap_reconnect_waiters.clear();

if (warn_str.peek() != EOF) {
mds->clog->warn() << "failed to reconnect caps for missing inodes:" << "\n";
mds->clog->warn() << "failed to reconnect caps for missing inodes:";
mds->clog->warn(warn_str);
}
}
Expand Down Expand Up @@ -5775,7 +5775,7 @@ void MDCache::open_snap_parents()
++q)
warn_str << " client." << q->first << " snapid " << q->second << "\n";
}
mds->clog->warn() << "open_snap_parents has:" << "\n";
mds->clog->warn() << "open_snap_parents has:";
mds->clog->warn(warn_str);
}
assert(rejoin_waiters.empty());
Expand Down Expand Up @@ -11615,7 +11615,7 @@ void MDCache::force_readonly()
return;

dout(1) << "force file system read-only" << dendl;
mds->clog->warn() << "force file system read-only\n";
mds->clog->warn() << "force file system read-only";

set_readonly();

Expand Down
4 changes: 2 additions & 2 deletions src/mds/MDSDaemon.cc
Expand Up @@ -851,7 +851,7 @@ int MDSDaemon::_handle_command_legacy(std::vector<std::string> args)
}
else if (args[0] == "heap") {
if (!ceph_using_tcmalloc())
clog->info() << "tcmalloc not enabled, can't use heap profiler commands\n";
clog->info() << "tcmalloc not enabled, can't use heap profiler commands";
else {
ostringstream ss;
vector<std::string> cmdargs;
Expand Down Expand Up @@ -1368,7 +1368,7 @@ bool MDSDaemon::ms_verify_authorizer(Connection *con, int peer_type,
dout(1) << __func__ << ": auth cap parse error: " << errstr.str()
<< " parsing '" << auth_cap_str << "'" << dendl;
clog->warn() << name << " mds cap '" << auth_cap_str
<< "' does not parse: " << errstr.str() << "\n";
<< "' does not parse: " << errstr.str();
}
} catch (buffer::error& e) {
// Assume legacy auth, defaults to:
Expand Down
2 changes: 1 addition & 1 deletion src/mds/MDSTable.cc
Expand Up @@ -92,7 +92,7 @@ void MDSTable::save_2(int r, version_t v)
if (r < 0) {
dout(1) << "save error " << r << " v " << v << dendl;
mds->clog->error() << "failed to store table " << table_name << " object,"
<< " errno " << r << "\n";
<< " errno " << r;
mds->handle_write_error(r);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/mds/RecoveryQueue.cc
Expand Up @@ -90,7 +90,7 @@ void RecoveryQueue::_start(CInode *in)
// blech
if (pi->client_ranges.size() && !pi->get_max_size()) {
mds->clog->warn() << "bad client_range " << pi->client_ranges
<< " on ino " << pi->ino << "\n";
<< " on ino " << pi->ino;
}

if (pi->client_ranges.size() && pi->get_max_size()) {
Expand Down
12 changes: 6 additions & 6 deletions src/mds/Server.cc
Expand Up @@ -672,7 +672,7 @@ void Server::find_idle_sessions()
utime_t age = now;
age -= session->last_cap_renew;
mds->clog->info() << "closing stale session " << session->info.inst
<< " after " << age << "\n";
<< " after " << age;
dout(10) << "autoclosing stale session " << session->info.inst << " last " << session->last_cap_renew << dendl;
kill_session(session, NULL);
}
Expand Down Expand Up @@ -779,17 +779,17 @@ void Server::handle_client_reconnect(MClientReconnect *m)
mds->clog->info() << "denied reconnect attempt (mds is "
<< ceph_mds_state_name(mds->get_state())
<< ") from " << m->get_source_inst()
<< " after " << delay << " (allowed interval " << g_conf->mds_reconnect_timeout << ")\n";
<< " after " << delay << " (allowed interval " << g_conf->mds_reconnect_timeout << ")";
deny = true;
} else if (session->is_closed()) {
dout(1) << " session is closed, ignoring reconnect, sending close" << dendl;
mds->clog->info() << "denied reconnect attempt (mds is "
<< ceph_mds_state_name(mds->get_state())
<< ") from " << m->get_source_inst() << " (session is closed)\n";
<< ") from " << m->get_source_inst() << " (session is closed)";
deny = true;
} else if (mdcache->is_readonly()) {
dout(1) << " read-only FS, ignoring reconnect, sending close" << dendl;
mds->clog->info() << "denied reconnect attempt (mds is read-only)\n";
mds->clog->info() << "denied reconnect attempt (mds is read-only)";
deny = true;
}

Expand All @@ -801,7 +801,7 @@ void Server::handle_client_reconnect(MClientReconnect *m)

// notify client of success with an OPEN
m->get_connection()->send_message(new MClientSession(CEPH_SESSION_OPEN));
mds->clog->debug() << "reconnect by " << session->info.inst << " after " << delay << "\n";
mds->clog->debug() << "reconnect by " << session->info.inst << " after " << delay;

// snaprealms
for (vector<ceph_mds_snaprealm_reconnect>::iterator p = m->realms.begin();
Expand Down Expand Up @@ -2345,7 +2345,7 @@ CInode* Server::prepare_new_inode(MDRequestRef& mdr, CDir *dir, inodeno_t useino
dout(0) << "WARNING: client specified " << useino << " and i allocated " << in->inode.ino << dendl;
mds->clog->error() << mdr->client_request->get_source()
<< " specified ino " << useino
<< " but mds." << mds->get_nodeid() << " allocated " << in->inode.ino << "\n";
<< " but mds." << mds->get_nodeid() << " allocated " << in->inode.ino;
//ceph_abort(); // just for now.
}

Expand Down
2 changes: 1 addition & 1 deletion src/mds/StrayManager.cc
Expand Up @@ -661,7 +661,7 @@ bool StrayManager::__eval_stray(CDentry *dn, bool delay)
<< in->snaprealm->srnode.past_parents << dendl;
if (in->state_test(CInode::STATE_MISSINGOBJS)) {
mds->clog->error() << "previous attempt at committing dirfrag of ino "
<< in->ino() << " has failed, missing object\n";
<< in->ino() << " has failed, missing object";
mds->handle_write_error(-ENOENT);
}
return false; // not until some snaps are deleted.
Expand Down
6 changes: 3 additions & 3 deletions src/mds/journal.cc
Expand Up @@ -1550,7 +1550,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
// [repair bad inotable updates]
if (inotablev > mds->inotable->get_version()) {
mds->clog->error() << "journal replay inotablev mismatch "
<< mds->inotable->get_version() << " -> " << inotablev << "\n";
<< mds->inotable->get_version() << " -> " << inotablev;
mds->inotable->force_replay_version(inotablev);
}

Expand All @@ -1576,7 +1576,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
inodeno_t i = session->take_ino(used_preallocated_ino);
if (next != i)
mds->clog->warn() << " replayed op " << client_reqs << " used ino " << i
<< " but session next is " << next << "\n";
<< " but session next is " << next;
assert(i == used_preallocated_ino);
session->info.used_inos.clear();
}
Expand All @@ -1598,7 +1598,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
assert(sessionmapv == mds->sessionmap.get_version());
} else {
mds->clog->error() << "journal replay sessionmap v " << sessionmapv
<< " -(1|2) > table " << mds->sessionmap.get_version() << "\n";
<< " -(1|2) > table " << mds->sessionmap.get_version();
assert(g_conf->mds_wipe_sessions);
mds->sessionmap.wipe();
mds->sessionmap.set_version(sessionmapv);
Expand Down
1 change: 0 additions & 1 deletion src/mgr/DaemonServer.cc
Expand Up @@ -327,7 +327,6 @@ bool DaemonServer::handle_command(MCommand *m)
rs = ss.str();
odata.append(ds);
dout(1) << "do_command r=" << r << " " << rs << dendl;
//clog->info() << rs << "\n";
if (con) {
MCommandReply *reply = new MCommandReply(r, rs);
reply->set_tid(m->get_tid());
Expand Down
2 changes: 1 addition & 1 deletion src/mon/DataHealthService.cc
Expand Up @@ -219,7 +219,7 @@ void DataHealthService::service_tick()
if (ours.fs_stats.avail_percent != last_warned_percent)
mon->clog->warn()
<< "reached concerning levels of available space on local monitor storage"
<< " (" << ours.fs_stats.avail_percent << "% free)\n";
<< " (" << ours.fs_stats.avail_percent << "% free)";
last_warned_percent = ours.fs_stats.avail_percent;
} else {
last_warned_percent = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/mon/MDSMonitor.cc
Expand Up @@ -676,7 +676,7 @@ void MDSMonitor::_updated(MonOpRequestRef op)
MMDSBeacon *m = static_cast<MMDSBeacon*>(op->get_req());
dout(10) << "_updated " << m->get_orig_source() << " " << *m << dendl;
mon->clog->info() << m->get_orig_source_inst() << " "
<< ceph_mds_state_name(m->get_state()) << "\n";
<< ceph_mds_state_name(m->get_state());

if (m->get_state() == MDSMap::STATE_STOPPED) {
// send the map manually (they're out of the map, so they won't get it automatic)
Expand All @@ -701,7 +701,7 @@ void MDSMonitor::on_active()
update_logger();

if (mon->is_leader())
mon->clog->info() << "fsmap " << fsmap << "\n";
mon->clog->info() << "fsmap " << fsmap;
}

void MDSMonitor::get_health(list<pair<health_status_t, string> >& summary,
Expand Down
18 changes: 9 additions & 9 deletions src/mon/Monitor.cc
Expand Up @@ -1988,7 +1988,7 @@ void Monitor::start_election()
logger->inc(l_mon_num_elections);
logger->inc(l_mon_election_call);

clog->info() << "mon." << name << " calling new monitor election\n";
clog->info() << "mon." << name << " calling new monitor election";
elector.call_election();
}

Expand Down Expand Up @@ -2056,7 +2056,7 @@ void Monitor::win_election(epoch_t epoch, set<int>& active, uint64_t features,
outside_quorum.clear();

clog->info() << "mon." << name << "@" << rank
<< " won leader election with quorum " << quorum << "\n";
<< " won leader election with quorum " << quorum;

set_leader_supported_commands(cmdset, cmdsize);

Expand Down Expand Up @@ -4415,9 +4415,9 @@ void Monitor::handle_timecheck_leader(MonOpRequestRef op)
ostringstream ss;
health_status_t status = timecheck_status(ss, skew_bound, latency);
if (status == HEALTH_ERR)
clog->error() << other << " " << ss.str() << "\n";
clog->error() << other << " " << ss.str();
else if (status == HEALTH_WARN)
clog->warn() << other << " " << ss.str() << "\n";
clog->warn() << other << " " << ss.str();

dout(10) << __func__ << " from " << other << " ts " << m->timestamp
<< " delta " << delta << " skew_bound " << skew_bound
Expand Down Expand Up @@ -4759,7 +4759,7 @@ int Monitor::scrub_start()
assert(is_leader());

if (!scrub_result.empty()) {
clog->info() << "scrub already in progress\n";
clog->info() << "scrub already in progress";
return -EBUSY;
}

Expand Down Expand Up @@ -4947,13 +4947,13 @@ void Monitor::scrub_check_results()
continue;
if (p->second != mine) {
++errors;
clog->error() << "scrub mismatch" << "\n";
clog->error() << " mon." << rank << " " << mine << "\n";
clog->error() << " mon." << p->first << " " << p->second << "\n";
clog->error() << "scrub mismatch";
clog->error() << " mon." << rank << " " << mine;
clog->error() << " mon." << p->first << " " << p->second;
}
}
if (!errors)
clog->info() << "scrub ok on " << quorum << ": " << mine << "\n";
clog->info() << "scrub ok on " << quorum << ": " << mine;
}

inline void Monitor::scrub_timeout()
Expand Down
2 changes: 1 addition & 1 deletion src/mon/MonmapMonitor.cc
Expand Up @@ -168,7 +168,7 @@ void MonmapMonitor::on_active()
}

if (mon->is_leader())
mon->clog->info() << "monmap " << *mon->monmap << "\n";
mon->clog->info() << "monmap " << *mon->monmap;

apply_mon_features(mon->get_quorum_mon_features());
}
Expand Down