-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mkcloud writes temporary files in cwd #224
Comments
There are even more files that are created by mkcloud in The mkcloud hosts use the update_automation script to create symlinks for several tools in ~/bin. Then a new mkcloud run is started from a dedicated directory (as it now is accessible via $PATH). So in short, we use it kind of that way (thats just pseudo code to show what must be possible):
Files (that are interesting for debugging the current run) are written only to Maybe this kind of usage should be better documented. We could change that behaviour, sure. A |
s/is/was/ I realise it started out life with Jenkins as the only use case, but it has grown way beyond that.
I'm curious - what are the other ways, if not via directories?
Absolutely! There is no "maybe" here. By now the existing docs do imply the use of directories, but still need to be more explicit about it, e.g. about what files are created.
Yes I think this would be a much better approach, but it should be FHS-compliant since |
I wonder if a lot of the mess in the way we currently have all these |
I guess, the easiest thing would be to replace some uses of cwd with a tmpdir=/tmp/mkcloud.$$/$filename |
Not |
@aspiers From my point of view this is done for two reasons:
Btw. the prefix "manual" was used to differentiate from the jenkins mkcloud runs on the same host.
And we would need a tool to do the cleanup of all old/unused files. If they are cluttered at various places this makes it quite hard without having a tool. So all these changes open new issues.
No, not some. If we change something here, then lets do it right and have mkcloud put absolutely nothing in cwd, but all in a dedicated new directory. |
That's not too convincing, because you could instead have a single
But we already need a tool to do cleanup. It's not just these files which are created, it's also a lot of state inside libvirt, LVM, backing storage, iptables rules, changes to /etc ... the list goes on.
Why do you need
That's true at least :-)
... or in multiple directories. I agree there are pros and cons either way, but let's remain mindful that the FHS was designed with careful intentions, and they must have had good reasons for deciding it was worth having pid files and log files (for example) in different directories. So let's ask ourselves, what are those reasons, and do they apply to |
I don't want to convince you. I just explained why it is this way currently.
Just an example: You quickly get to know that run X took 5MB logs and run Y took 6GB logs. Thats just a 'du -sch manual.*' away. Spreading files in the fs tree makes this overview harder.
My point here was that $somewhen not all supportconfigs become old and can be cleaned up, but an entire cloud run becomes old and all its related files need to be cleaned up. This is easier if all these files a collected in a single directory (wherever that might be located). |
Well its mkcloud itself cleaning up the last cloud (that is still running) of the slot it should use for its run. But thats by design, so that people are able to connect to the cloud as long as it is still running.
Sure, but many of them are not specific for a single mkcloud run, but generic changes. And they are all very small in size. I won't start to clean up in /etc when the disk is at 100%. |
OK :-)
Does it really, though? Firstly
As I already pointed out, I think this is a fallacy: it misleads people into thinking they can correctly clean up an entire cloud with one simple
Sure, when I said "we already need a tool", I was also trying to imply "we already have a tool", and it's called
What do you mean by "files of individual mkcloud runs", exactly? I agree there should be an easy way to get this overview and delete files, but I don't think keeping everything in one directory requires this, or even particularly assists it. |
Exactly. And it is exactly what I want :) Obviously not what you want, though.
Getting the size of only the log does not help us maintaining the workers. When cleaning up it does not make sense to delete parts of a run (like only delete log, or only delete supportconfigs), if we clean up we delete everything from this run, and that operation must be easy.
I think, if someone working with openstack assumes that a
logs (the ones I do myself by adding
sure
LOL |
mkcloud writes
mkcloud.pid
andmkcloud.config
temporary files into whichever directory you run it from, but these should go under/tmp
or/var
to avoid littering the git working tree (best case) or other random directories (worst case) with temporary files. This happens even before thesanity_check
function is hit which is currently causing #222.The text was updated successfully, but these errors were encountered: