https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2015-08-04T23:19:06ZCeph Ceph-deploy - Bug #12385: hosts.remotes.set_repo_priority() can write invalid repo lineshttps://tracker.ceph.com/issues/12385?journal_id=562032015-08-04T23:19:06ZTravis Rhodentrhoden@redhat.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li><li><strong>Target version</strong> set to <i>1.5.27</i></li></ul><p>After pulling my hair out for a bit, this happens to already be resolved by: <a class="external" href="https://github.com/ceph/ceph-deploy/commit/56880827e096232a574a34343f1eec1086658aed">https://github.com/ceph/ceph-deploy/commit/56880827e096232a574a34343f1eec1086658aed</a></p>
<p>Since write_file() switched to using lower level file APIs (os.fdopen and os.open) I suspect it is no longer true that opening a file with mode 'w' truncates the file, as that would require O_TRUNC.</p>
<p>I'm not going to dig into it farther, but it appears fixed since we rewrite the entire file each time now.</p>