[ClusterLabs] Removing a resource without stopping it
Tomas Jelinek
tojeline at redhat.com
Mon Jan 31 04:37:16 EST 2022
Hi,
The output you posted actually shows the procedure you followed works.
Orphan resources are running resources which have no configuration
stored in CIB. Usually, they are stopped shortly after they are removed
from CIB. If you set stop-orphan-resources to false, pacemaker won't
stop them.
To summarize:
1) Set stop-orphan-resources to false. This prevents pacemaker from
stopping a resource once it is removed from CIB.
2) Run `pcs resource delete srv01-cs8 --force`. Using --force makes pcs
not trying to stop the resource. Pcs directly removes the resource from CIB.
3) Confirm by running `pcs status`. If you see the resource is orphaned,
it means the resource is still running after it has been removed from
CIB and the only trace of it is in pacemaker state - pacemaker remembers
it had started a resource which is now not present in CIB.
In this stage, when you flip stop-orphan-resources to true, pacemaker
stops the resource as there is no record of it in the CIB anymore and
therefore no reason for it to be running. Once stopped, the resource is
removed from pacemaker state as well.
Not sure if this helps you with the actual migration, but hopefully it
at least clarified a bit what's going on.
Regards,
Tomas
Dne 29. 01. 22 v 6:12 Digimer napsal(a):
> On 2022-01-29 00:10, Digimer wrote:
>> On 2022-01-28 16:54, Ken Gaillot wrote:
>>> On Fri, 2022-01-28 at 16:38 -0500, Digimer wrote:
>>>> Hi all,
>>>>
>>>> I'm trying to figure out how to move a running VM from one
>>>> pacemaker
>>>> cluster to another. I've got the storage and VM live migration
>>>> sorted,
>>>> but having trouble with pacemaker.
>>>>
>>>> I tried unmanaging the resource (the VM), then deleted the
>>>> resource,
>>>> and the node got fenced. So I am assuming it thought it couldn't
>>>> stop
>>>> the service so it self-fenced. In any case, can someone let me know
>>>> what
>>>> the proper procedure is?
>>>>
>>>> Said more directly;
>>>>
>>>> How to I delete a resource from pacemaker (via pcs on EL8)
>>>> without
>>>> stopping the resource?
>>>>
>>> Set the stop-orphan-resources cluster property to false (at least while
>>> you move it)
>>>
>>> The problem with your first approach is that once you remove the
>>> resource configuration, which includes the is-managed setting,
>>> Pacemaker no longer knows the resource is unmanaged. And even if you
>>> set it via resource defaults or something, eventually you have to set
>>> it back, at which point Pacemaker will still have the same response.
>>
>> Follow up;
>>
>> I tried to do the following sequence;
>>
>> ====
>> pcs property set stop-orphan-resources=false
>> pcs resource unmanage srv01-cs8 # Without this, the
>> resource was stopped
>> pcs resource delete srv01-cs8 # Failed with
>> "Warning: 'srv01-cs8' is unmanaged"
>> pcs resource delete srv01-cs8 --force # Got 'Deleting
>> Resource - srv01-cs8'
>> pcs resource status
>> --
>> * srv01-cs8 (ocf::alteeve:server): ORPHANED Started an-a01n01
>> (unmanaged)
>> --
>> ====
>>
>> So it seems like this doesn't delete the resource. Can I get some
>> insight on how to actually delete this resource without disabling the VM?
>>
>> Thanks!
>>
> Adding;
>
> I tried 'pcs property set stop-orphan-resources=true' and it stopped the
> VM and then actually deleted the resource. =/
>
> --
> Digimer
> Papers and Projects:https://alteeve.com/w/
> "I am, somehow, less interested in the weight and convolutions of Einstein’s brain than in the near certainty that people of equal talent have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
>
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/
More information about the Users
mailing list