----- Original Message -----
From: "Andy Grover" agrover@redhat.com To: targetd-devel@lists.fedorahosted.org Cc: "Tony Asleson" tasleson@redhat.com Sent: Monday, December 9, 2013 8:03:36 PM Subject: Re: [PATCH 2/2] nfs.py: Make nfs export changes persistent
On 12/09/2013 05:22 PM, Tony Asleson wrote:
In a glaring oversight the changes made via targetd for nfs exports was lost on system reboot. This patch fixes that by taking every export that is listed via `exportfs -v` and writes each entry to /etc/exports.d.
At the moment for updates the code just removes every file that is has created and re-creates a new file for each entry. Not the most performant implementation, but it minimizes risk to updating an existing export and not getting the change written out correctly. In big config testing we may find that this simple approach is actually faster than opening and checking each file for correctness and then updating/deleting etc. as needed.
Hi Tony, nice work.
I was assuming we'd just write one file to /etc/exports.d. Is this not possible, or are there advantages to splitting them out?
I originally tried to be smarter about making the settings persistent with separate files and eventually ended up with this simple approach. We can put them all in one file. I will re-submit a patch that does just that.
Regards, Tony