- The ``ceph -s`` or ``ceph status`` command has a fresh look.
- ``ceph mgr metadata`` will dump metadata associated with each mgr
daemon.
- - ``ceph {osd,mds,mon,mgr} versions`` summarizes versions of running daemons.
+ - ``ceph versions`` or ``ceph {osd,mds,mon,mgr} versions``
+ summarize versions of running daemons.
- ``ceph {osd,mds,mon,mgr} count-metadata <property>`` similarly
tabulates any other daemon metadata visible via the ``ceph
{osd,mds,mon,mgr} metadata`` commands.
#. Do not create any new erasure-code pools while upgrading the monitors.
+#. You can monitor the progress of your upgrade at each stage with the
+ ``ceph versions`` command, which will tell you what ceph version is
+ running for each type of daemon.
+
#. Set the ``noout`` flag for the duration of the upgrade. (Optional
but recommended.)::
# systemctl restart ceph-osd.target
You can monitor the progress of the OSD upgrades with the new
- ``ceph osd versions`` command.::
+ ``ceph versions`` or ``ceph osd versions`` command.::
# ceph osd versions
{
rdata.append(ds);
rs = "";
r = 0;
+ } else if (prefix == "versions") {
+ if (!f)
+ f.reset(Formatter::create("json-pretty"));
+ map<string,int> overall;
+ f->open_object_section("version");
+ map<string,int> mon, mgr, osd, mds;
+
+ count_metadata("ceph_version", &mon);
+ f->open_object_section("mon");
+ for (auto& p : mon) {
+ f->dump_int(p.first.c_str(), p.second);
+ overall[p.first] += p.second;
+ }
+ f->close_section();
+
+ mgrmon()->count_metadata("ceph_version", &mgr);
+ f->open_object_section("mgr");
+ for (auto& p : mgr) {
+ f->dump_int(p.first.c_str(), p.second);
+ overall[p.first] += p.second;
+ }
+ f->close_section();
+
+ osdmon()->count_metadata("ceph_version", &osd);
+ f->open_object_section("osd");
+ for (auto& p : osd) {
+ f->dump_int(p.first.c_str(), p.second);
+ overall[p.first] += p.second;
+ }
+ f->close_section();
+
+ mdsmon()->count_metadata("ceph_version", &mds);
+ f->open_object_section("mds");
+ for (auto& p : mon) {
+ f->dump_int(p.first.c_str(), p.second);
+ overall[p.first] += p.second;
+ }
+ f->close_section();
+
+ for (auto& p : mgrstatmon()->get_service_map().services) {
+ f->open_object_section(p.first.c_str());
+ map<string,int> m;
+ p.second.count_metadata("ceph_version", &m);
+ for (auto& q : m) {
+ f->dump_int(q.first.c_str(), q.second);
+ overall[q.first] += q.second;
+ }
+ f->close_section();
+ }
+
+ f->open_object_section("overall");
+ for (auto& p : overall) {
+ f->dump_int(p.first.c_str(), p.second);
+ }
+ f->close_section();
+ f->close_section();
+ f->flush(rdata);
+ rs = "";
+ r = 0;
}
out: