https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2020-07-29T14:48:40ZCeph CephFS - Fix #46645: librados|libcephfs: use latest MonMap when creating from CephContexthttps://tracker.ceph.com/issues/46645?journal_id=1718992020-07-29T14:48:40ZShyamsundar Ranganathan
<ul></ul><p>Capturing a mail conversation on direction of fix:</p>
<blockquote>
<p>Shyamsundar</p>
</blockquote>
<p>Patrick</p>
<blockquote>
<p>MonClient::handle_monmap handles the message CEPH_MSG_MON_MAP. As a part<br />of handling the above message, we should also update global<br />CephContext->_conf such that newer instances of MonClient in the same<br />address space, is able to pick up the updated MONs from the CephContext<br />during initialization, rather than relying on bootstrap settings.<br />e.g from:<br />- libcephfs::ceph_mount_info::init<br />- librados::RadosClient::connect</p>
</blockquote>
<p>Right. Keep in mind that CephContext used to be global (I believe) but<br />recently became instantiated with some library state (like librados)..<br />librados/libcephfs allow you to use an existing CephContext during<br />init so CephContext can be shared.</p>
<blockquote>
<p>MonMap::build_initial is responsible to look at various sources for the<br />MON map and build an initial MonMap from the same. This method looks at<br />the CephCluster configuration section "monmap" first, and then with<br />"mon_host", file(entire configs), "mon_dns_srv_name" sections till one<br />is found.</p>
<p>We would need to either overwrite one of the above conf sections with<br />the updated monmap, add a new section to the config (that is looked up<br />first by MonMap::build-initial) or, store it in as a class variable(?).</p>
</blockquote>
<p>I think the right approach here is to<br />have MonClient store the latest MonMap in the CephContext (or just the<br />Mons entity_addrvec_t's if MonMap is generally large). Use that if<br />available before using configs/"monmap".</p>
<blockquote>
<p>Questions/Thoughts:<br />1) Where to store the updated MonMap</p>
<p>a) Add another conf section to CephContext, say "monmap-updates", and<br />store updated contents in there, reading from this conf section first<br />for future calls into MonMap::build_initial<br />- Preserves original config sections as is</p>
<p>b) Update the "monmap" section<br />- Requires converting the MMonMap message into "monmap" format for<br />future use<br />- Overwrites whatever was present in the initial "monmap"</p>
<p>c) (for completeness) MonMap class variable?</p>
<p>2) Format of the data to store</p>
<p>a) Store the contents of MonMap::decode into a stream in CephCluster<br />config using 1.a/c scheme</p>
<p>b) We could store the entire MMonMap message, as is, in the config<br />(assuming 1.a/c above)</p>
<p>c) In case of 1.b we would need to parse and store it in the existing<br />"monmap" format<br />- Decode MMonMap message extracting required information and store it as<br />in 1.b<br />- Seems lossy in terms of data that we could store</p>
<p>3) We would also need to handle this in crimson::Client::handle_monmap,<br />right?</p>
<p>4) For tests enhance, src/test/mon/MonMap.cc<br />- test build_initial with a refreshed MonMap, and ensure initial list<br />is built correctly</p>
</blockquote> CephFS - Fix #46645: librados|libcephfs: use latest MonMap when creating from CephContexthttps://tracker.ceph.com/issues/46645?journal_id=1725182020-08-10T14:11:53ZShyamsundar Ranganathan
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>Pull request ID</strong> set to <i>36533</i></li></ul> CephFS - Fix #46645: librados|libcephfs: use latest MonMap when creating from CephContexthttps://tracker.ceph.com/issues/46645?journal_id=1726092020-08-11T20:17:26ZShyamsundar Ranganathan
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Fix Under Review</i></li></ul> CephFS - Fix #46645: librados|libcephfs: use latest MonMap when creating from CephContexthttps://tracker.ceph.com/issues/46645?journal_id=1731312020-08-18T16:01:54ZPatrick Donnellypdonnell@redhat.com
<ul><li><strong>Status</strong> changed from <i>Fix Under Review</i> to <i>Pending Backport</i></li></ul> CephFS - Fix #46645: librados|libcephfs: use latest MonMap when creating from CephContexthttps://tracker.ceph.com/issues/46645?journal_id=1731322020-08-18T16:03:01ZPatrick Donnellypdonnell@redhat.com
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-9 status-3 priority-4 priority-default closed" href="/issues/47013">Backport #47013</a>: nautilus: librados|libcephfs: use latest MonMap when creating from CephContext</i> added</li></ul> CephFS - Fix #46645: librados|libcephfs: use latest MonMap when creating from CephContexthttps://tracker.ceph.com/issues/46645?journal_id=1731342020-08-18T16:03:08ZPatrick Donnellypdonnell@redhat.com
<ul><li><strong>Copied to</strong> <i><a class="issue tracker-9 status-3 priority-4 priority-default closed" href="/issues/47014">Backport #47014</a>: octopus: librados|libcephfs: use latest MonMap when creating from CephContext</i> added</li></ul> CephFS - Fix #46645: librados|libcephfs: use latest MonMap when creating from CephContexthttps://tracker.ceph.com/issues/46645?journal_id=1743012020-09-02T21:46:04ZPatrick Donnellypdonnell@redhat.com
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-3 priority-6 priority-high2 closed" href="/issues/47180">Bug #47180</a>: qa/standalone/mon/mon-handle-forward.sh failure</i> added</li></ul> CephFS - Fix #46645: librados|libcephfs: use latest MonMap when creating from CephContexthttps://tracker.ceph.com/issues/46645?journal_id=1763782020-09-30T15:41:21ZNathan Cutlerncutler@suse.cz
<ul><li><strong>Status</strong> changed from <i>Pending Backport</i> to <i>Resolved</i></li></ul><p>While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".</p>