[Openstack-operators] Delete cinder service

Arne Wiebalck Arne.Wiebalck at cern.ch
Fri Sep 2 09:10:18 UTC 2016


There is ‘cinder-manage db purge’ to delete entries which are marked as deleted.

I never tried it (and suggest to start with a copy of the db before touching the prod
ones). We usually do not purge databases unless we hit an issue.

Cheers,
 Arne


> On 02 Sep 2016, at 10:28, William Josefsson <william.josefson at gmail.com> wrote:
> 
> Thanks everyone for your replies! I did a safe select first to make
> sure there was only one match. than I updated deleted=1 for that
> service which seem to work. Now 'cinder service-list' shows the right
> output.
> 
> I notice in DB 'volumes', there are plenty of old volume entries, long
> ago deleted, and they have 'deleted=1'. The host value, is the old
> host name that no longer exist.
> 
> Is there any cleanup of volumes entries with deleted=1, or is it
> normal these old entries lay around? thx will
> 
> 
> 
> On Fri, Sep 2, 2016 at 1:24 AM, Kris G. Lindgren <klindgren at godaddy.com> wrote:
>> Just be careful with LIMIT x on your servers if you have replicated mysql databases.  At least under older versions of mysql this can lead to broken replication as the results of the query performed on the master and on the slave are not guaranteed to be the same.
>> 
>> https://dev.mysql.com/doc/refman/5.7/en/replication-features-limit.html
>> 
>> ___________________________________________________________________
>> Kris Lindgren
>> Senior Linux Systems Engineer
>> GoDaddy
>> 
>> On 9/1/16, 9:51 AM, "Nick Jones" <nick.jones at datacentred.co.uk> wrote:
>> 
>> 
>>    On 1 Sep 2016, at 15:36, Jonathan D. Proulx wrote:
>> 
>>> On Thu, Sep 01, 2016 at 04:25:25PM +0300, Vladimir Prokofev wrote:
>>> :I've used direct database update to achive this in Mitaka:
>>> :use cinder;
>>> :update services set deleted = '1' where <your service parameters>;
>>> 
>>> 
>>> I belive the official way is:
>>> 
>>> cinder-manage service remove <binary> <host>
>>> 
>>> Which probably more or less does the same thing...
>> 
>>    Yep.  Both options basically require direct interaction with the
>>    database as opposed to via a Cinder API call, but at least with
>>    cinder-manage the scope for making a mistake is far more limited than
>>    missing some qualifying clause off an UPDATE statement (limit 1 is your
>>    friend!) ;)
>> 
>>>> 
>>    -Nick
>> 
>>    --
>>    DataCentred Limited registered in England and Wales no. 05611763
>> 
>>    _______________________________________________
>>    OpenStack-operators mailing list
>>    OpenStack-operators at lists.openstack.org
>>    http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>> 
>> 
>> _______________________________________________
>> OpenStack-operators mailing list
>> OpenStack-operators at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
> 
> _______________________________________________
> OpenStack-operators mailing list
> OpenStack-operators at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators

--
Arne Wiebalck
CERN IT



More information about the OpenStack-operators mailing list