← Back to team overview

openstack team mailing list archive

Re: Horizon OpenStack Dashboard RC1 on Ubuntu 12.04 B1 - can't get it working

 

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

1) pre-create this directory and set appropriate permissions [but nothing
has told me to do this]
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)
3) have this directory configurable so python-novaclient AND horizon can
make use of this feature in a secure way
4) apply the patch to ignore this feature

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.

As part of the deb install, 1 could happen by:

mkdir /var/www/.novaclient
chown www-data:www-data /var/www/.novaclient
...

Is this a better fix (although seems insecure) - or - is this caching
functionality just irrelevant when using Horizon?
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.

Cheers,

Kev

On 21 March 2012 13:11, Kiall Mac Innes <kiall@xxxxxxxxxxxx> wrote:

> 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.
>
> 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.
>
> Anyway - The point is - cache if we can, but if we cant, lets not
> interrupt the user.
>
> Thanks,
> Kiall
>
>
> On Wed, Mar 21, 2012 at 12:42 PM, Kevin Jackson <kevin@xxxxxxxxxxxxxxxxxxx
> > wrote:
>
>> 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?
>>
>> try:
>>     os.makedirs(cache_dir, 0755)
>> except OSError as e:
>>      # NOTE(kiall): This is typicaly either permission denied while
>>      #              attempting to create the directory, or the directory
>>      #              already exists. Either way, don't fail.
>>      pass
>>
>> Cheers,
>> Kev
>>
>> On 21 March 2012 12:29, Kiall Mac Innes <kiall@xxxxxxxxxxxx> wrote:
>>
>>> This should fix the issue - https://review.openstack.org/5608
>>>
>>> It duplicates the fix from 5-10 lines below now that the dot files have
>>> been moved into a directory.
>>>
>>> Thanks,
>>> Kiall
>>>
>>> --
>> Kevin Jackson
>> @itarchitectkev
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : openstack@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>


-- 
Kevin Jackson
@itarchitectkev

References