Re: [Cloud-init-dev] [Merge] ~raharper/cloud-init:feature/cloudinit-clean-from-write-log into cloud-init:master

2019-09-19 Thread Ryan Harper
For (a) what would you suggest instead? I'll look at (b). Diff comments: > diff --git a/cloudinit/util.py b/cloudinit/util.py > index aa23b3f..950921c 100644 > --- a/cloudinit/util.py > +++ b/cloudinit/util.py > @@ -1841,6 +1843,55 @@ def chmod(path, mode): > os.chmod(path,

Re: [Cloud-init-dev] [Merge] ~raharper/cloud-init:feature/cloudinit-clean-from-write-log into cloud-init:master

2019-09-19 Thread Ryan Harper
We're looking to have cloud-init clean remove as many of the artifacts that cloud-init is responsible for creating. Since clean already removes things in cloud paths, like /var/lib/cloud but we do touch other files outside of those paths and logging what files we wrote makes clean-up of those

Re: [Cloud-init-dev] [Merge] ~raharper/cloud-init:feature/cloudinit-clean-from-write-log into cloud-init:master

2019-09-19 Thread Scott Moser
For (a), I suggest maybe writing exactly one write for every write? Why do you need a log of files' you've written? Should we have a separate log for: - files opened? - files checked for existence? - commands run? - log files written? What is motivating you to have this list of files that

Re: [Cloud-init-dev] [Merge] ~raharper/cloud-init:feature/cloudinit-clean-from-write-log into cloud-init:master

2019-09-19 Thread Scott Moser
I think that this will not really get you what you're after. Having a list of the files that cloud-init created or appended to or truncated isn't going to get you to your goal. The partial solution comes at the cost of 2 open and writes for every write. Additionally, we're already writing