[Openstack] How do I stop image-create from using /tmp?

Scott Moser smoser at ubuntu.com
Tue Jul 3 12:35:57 UTC 2012


On Mon, 2 Jul 2012, Jay Pipes wrote:

> On 07/02/2012 01:32 PM, Mark Lehrer wrote:
> >> just did an "ln -s /some/dir/with/space /tmp" and that does solve
> >
> > I added an option to /etc/init/nova_compute.conf to specify the tmp
> > space, so the start line looks like this:
> >
> > exec su -s /bin/sh -c "export TMPDIR=/var/tmp; exec nova-compute
> > --flagfile ........
> >
> > Not a great solution either since package updates over-write this setting.
>
> Yeah, that's exactly what we found as well -- Chef would overwrite the
> upstart script, and we couldn't for the life of us figure out how to get
> Chef to set the TMPDIR environment variable for *user running nova-compute*.

I'm not familiar with Chef, or how you were using it, so I can't help
there.  I wont argue against a specific flag, but I do think its mostly
useless.  I think this is largely bikeshed, and for some reason I feel
compelled to argue in favor of blue.

However, going the flag route then seems more dangerous to me.  Any
code would then to know that it should reference this flag for temp file
creation.  That problem is already solved with TMPDIR and mkdtemp and
friends.  Using the standard path, you get that for free.  If things are
*not* respecting TMPDIR, they should.

And, for what its worth (not much), a better way of modifying the
/etc/init/nova_compute.conf file above would be to add:
 env TMPDIR=/var/tmp

(see man 5 init).




More information about the Openstack mailing list