<div>I'd like to see this cache somewhere that's not part of the document root of my webserver - it forces me to one of 4 things</div><div><br></div><div>1) pre-create this directory and set appropriate permissions [but nothing has told me to do this]</div>
<div>2) change permissions of my webserver to be non-secure (security risk is minimised because chances are this is internal, but can't assume too much)</div><div>3) have this directory configurable so python-novaclient AND horizon can make use of this feature in a secure way</div>
<div>4) apply the patch to ignore this feature</div><div><br></div><div>either way I agree, it shouldn't fail - but this is a workaround, not a fix, as there is functionality that is silently being ignored - not by design, but by a workaround.</div>
<div><br></div><div>As part of the deb install, 1 could happen by:</div><div><br></div><div>mkdir /var/www/.novaclient</div><div>chown www-data:www-data /var/www/.novaclient</div><div>...</div><div><br></div><div>Is this a better fix (although seems insecure) - or - is this caching functionality just irrelevant when using Horizon?</div>
<div>If it is irrelevant (and not a nice to have as that is what you're implying) then remove from the code.  If its a nice to have, or a better way of phrasing: an option, give that option to the user to use.</div><div>
<br></div><div>Cheers,</div><div><br></div><div>Kev</div><br><div class="gmail_quote">On 21 March 2012 13:11, Kiall Mac Innes <span dir="ltr"><<a href="mailto:kiall@managedit.ie">kiall@managedit.ie</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It needs to create the directory in the first place to enable caching.. But - If for whatever reason caching fails that should be no reason to blow up and present an error.<div>
<br></div><div>Its probably worth highlighting this code is in python-novaclient, not horizon. The vast majority of uses cases will be able to cache just fine.<br>

<div><br></div><div>Anyway - The point is - cache if we can, but if we cant, lets not interrupt the user.</div><div><br></div><div>Thanks,<br>Kiall<br>
<br><br><div class="gmail_quote"><div><div class="h5">On Wed, Mar 21, 2012 at 12:42 PM, Kevin Jackson <span dir="ltr"><<a href="mailto:kevin@linuxservices.co.uk" target="_blank">kevin@linuxservices.co.uk</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">

If the code should just ignore the fact it can't create this directory - what is the point of it needing to attempt to create the directory in the first place?  What is its purpose if its superfluous?<div><br></div><div>



<div>try:</div><div>    os.makedirs(cache_dir, 0755)</div><div>except OSError as e:</div><div>     # NOTE(kiall): This is typicaly either permission denied while</div><div>     #              attempting to create the directory, or the directory</div>



<div>     #              already exists. Either way, don't fail.</div><div>     pass</div><div><br></div><div>Cheers,</div><div>Kev</div><div><div><br><div class="gmail_quote">On 21 March 2012 12:29, Kiall Mac Innes <span dir="ltr"><<a href="mailto:kiall@managedit.ie" target="_blank">kiall@managedit.ie</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This should fix the issue - <a href="https://review.openstack.org/5608" target="_blank">https://review.openstack.org/5608</a><div>



<br></div><div>It duplicates the fix from 5-10 lines below now that the dot files have been moved into a directory.<br clear="all">

<br>Thanks,<br>Kiall<br>
<br></div></blockquote></div></div><span><font color="#888888">-- <br>Kevin Jackson<br>@itarchitectkev<br>
</font></span></div></div>
<br></div></div><div class="im">_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></div></blockquote></div><br></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Kevin Jackson<br>@itarchitectkev<br>