[Openstack-operators] problem with glance-registory
Salman Toor
salman.toor at it.uu.se
Thu Sep 20 15:07:15 UTC 2012
Hi again,
Finally I manage to run glance-registry as a service, using glance user.
The problem was the ownership of the log file. When I removed
everything the log files in the /var/log/glance/* directory still be
there and the registry.log file was owned by the root user and root
group.
The problem becomes visible when I run the glance-registry manually
from the glance user account.
$ sudo su -s /bin/bash glance
$ glance-registry --config-file /etc/glance/glance-registry.conf --debug
--verbose
This command shows the correct message "cannot write in registry.log".
Which was not visible before.
I changed the ownership of the registry.log and everything started to
work fine.
Now glance-registry is running as a service using glance user account.
It seems like when I remove the glance using yum it didn't delete the
log files as that file contains all the old logs as well.
I am using slc6-x86_64 as a VM.
Regards..
Salman.
Quoting Derek Higgins <derekh at redhat.com>:
> On 09/20/2012 01:39 PM, Salman Toor wrote:
>> Hi again,
>>
>> Yes that's correct that I am running it using sudo, means as root.
>>
>> My password file and group file looks Ok. I have check the permissions
>> on the directories, Ok as well. Actually everything is as similar as it
>> is for keystone user.
>>
>> I have tried following steps
>>
>> 1 - Stop glance-api and glance-registry.
>> 2 - Remove everything using "yum remove".
>> 3 - Remove glance database and the glance user from mysql.
>> 4 - Delete user and group glance
>> 5 - Install everything form scratch using "sudo yum install
>> openstack-glance"
>> 6 - Create databases, fix the conf files.
>>
>> But the result is same. no success when it comes to the glance-registry.
>>
>> So still I am running manually using root account. :-(
>
> try running manually as glance
> $ sudo su -s /bin/bash glance
> $ glance-registry --config-file /etc/glance/glance-registry.conf --debug
> --verbose
>
> Also have you got selinux running?
> $ getenforce
>
> and if it is set to Enforcing check for denials
> $ grep AVC /var/log/audit/audit.log
>
> btw what package versions and platform are you running on?
>
>>
>> Regards..
>> Salman.
>>
>>
>> Quoting Derek Higgins <derekh at redhat.com>:
>>
>>> On 09/20/2012 12:18 PM, Salman Toor wrote:
>>>> Hi again,
>>>>
>>>> Thank very much Derek! I have resolved the problem.
>>>>
>>>> Just to make our conversation useful for others I am writing the steps
>>>> in a sequence.
>>>>
>>>> Problem
>>>> ------------
>>>> Cannot start the glance-registry, give following message,
>>>> openstack-glance-registry dead but pid file exists
>>>>
>>>> Note: My glance-registry.conf and glance-registry-paste.ini files are
>>>> according to the manual and I have no Error messages in the log files.
>>>>
>>>> Solution
>>>> -------------
>>>>
>>>> 1 - Used glance-registry tool to run the registry rather than running as
>>>> a service.
>>>> -bash-4.1$ sudo glance-registry --config-file
>>>> /etc/glance/glance-registry.conf --debug --verbose
>>>> [sudo] password for stoor:
>>>> /usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py:683:
>>>>
>>>> SADeprecationWarning: The 'listeners' argument to Pool (and
>>>> create_engine()) is deprecated. Use event.listen().
>>>> Pool.__init__(self, creator, **kw)
>>>> /usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py:159:
>>>>
>>>> SADeprecationWarning: Pool.add_listener is deprecated. Use
>>>> event.listen()
>>>> self.add_listener(l)
>>>>
>>>> and leave the terminal open.
>>>>
>>>> 2 - Open a new terminal, run the commands mentioned in the manual to
>>>> verify Image Service installation. it will work fine.
>>>>
>>>> ------------
>>>>
>>>> Conclusion: Run the glance-registry service manually.
>>>
>>> Glad to hear you got it sorted, but you should not have to run it
>>> manually. I suspect it works manually because your running the service
>>> as root, the service command normally starts it as the user "glance".
>>> You should try to resolve the root problem so that you don't have to run
>>> it manually.
>>>
>>>>
>>>> Note: Don't forget to run the glance-api as a normal service
>>>> -bash-4.1$ sudo /etc/init.d/openstack-glance-api start
>>>> Starting openstack-glance-api: [ OK ]
>>>>
>>>> Once again thanks to Derek Higgins. :-)
>>>>
>>>> Regards..
>>>> Salman.
>>>>
>>>>
>>>> Quoting Derek Higgins <derekh at redhat.com>:
>>>>
>>>>> On 09/20/2012 11:41 AM, Salman Toor wrote:
>>>>>> Hi Derek,
>>>>>>
>>>>>> Thanks for giving the starting point!
>>>>>>
>>>>>> It seems something wrong when it tries to work with DATABASE or
>>>>>>
>>>>>> it just hangs on some listener ...
>>>>>>
>>>>>> -bash-4.1$ sudo glance-registry --config-file
>>>>>> /etc/glance/glance-registry.conf --debug --verbose
>>>>>> /usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py:683:
>>>>>>
>>>>>>
>>>>>> SADeprecationWarning: The 'listeners' argument to Pool (a nd
>>>>>> create_engine()) is deprecated. Use event.listen().
>>>>>> Pool.__init__(self, creator, **kw)
>>>>>> /usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py:159:
>>>>>>
>>>>>>
>>>>>> SADeprecationWarning: Pool.add_listener is deprecated. U se
>>>>>> event.listen()
>>>>>> self.add_listener(l)
>>>>>>
>>>>>> Something wrong in the code or my configurations are bad... ?
>>>>>
>>>>> Those Deprecation warnings can be ignored, if its just sitting there
>>>>> not
>>>>> out putting anything then it should be running, try a glance index.
>>>>>
>>>>> If this works, try running it as the user "glance"
>>>>>
>>>>> Derek.
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>>
>> _______________________________________________
>> OpenStack-operators mailing list
>> OpenStack-operators at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>
>
More information about the OpenStack-operators
mailing list