Dan Kenigsberg has submitted this change and it was merged. Change subject: multipath: Write multipath.conf atomically ......................................................................
multipath: Write multipath.conf atomically We used to create a temporary file, and then copy (using cp) the temporary file to final location. Using external process to copy files on local storage is not needed, we can use the Python standard library for that. Also, this operation is not atomic, and can leave half written file if the write is interrupted in the middle. Now we use NamedTemporaryFile(delete=False), to create a temporary file safely, but do not delete it, so we can rename the file atomically. Change-Id: I850d621b7cb09f2732b8b3eb2cb2897e87547ddb Signed-off-by: Nir Soffer <nsof...@redhat.com> Reviewed-on: https://gerrit.ovirt.org/44869 Reviewed-by: Piotr Kliczewski <piotr.kliczew...@gmail.com> Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg <dan...@redhat.com> --- M lib/vdsm/tool/configurators/multipath.py 1 file changed, 13 insertions(+), 9 deletions(-) Approvals: Piotr Kliczewski: Looks good to me, but someone else must approve Nir Soffer: Verified Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved -- To view, visit https://gerrit.ovirt.org/44869 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I850d621b7cb09f2732b8b3eb2cb2897e87547ddb Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Fabian Deutsch <fabi...@redhat.com> Gerrit-Reviewer: Fabian Deutsch <fdeut...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: Yeela Kaplan <ykap...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches