[pve-devel] [PATCH docs 1/2] pvecm: Add required -r to rm

Dominic Jäger d.jaeger at proxmox.com
Thu Jul 23 09:17:11 CEST 2020


On Wed, Jul 22, 2020 at 12:31:53PM +0200, Thomas Lamprecht wrote:
> On 22.07.20 12:20, Dominic Jäger wrote:
> > /etc/corosync/* includes the directory uidgid.d.
> > Consequentlly, a correct rm call requires -r.
> 
> Does leaving this directory left-over causes any issues?
When I tested this it was empty. It should contain some optional permissions
for corosync [0].

We later say "(...) delete all remaining files left from the old cluster. This
ensures that the node can be added to another cluster again without problems."

Couldn't those permissions then be active in a potential new cluster?

> IIRC, I omit the "-r" explicitly as there can be also a directory from
> a qdevice or other ones, which we do not want to remove - to level
> corosync/* files where all desired to be removed, thus this rm varian.

Looking at the quote from before, why do we want some connection to the qdevice
to remain?

> But, maybe we should rather change it to:
> # rm -f /etc/corosync/corosync.conf /etc/corosync/authkey

I just tried it without -f:

root at pveA:/etc/corosync# ls
authkey  corosync.conf  uidgid.d
root at pveA:/etc/corosync# rm /etc/corosync/corosync.conf /etc/corosync/authkey
root at pveA:/etc/corosync# ls
uidgid.d

And the node was removed from the cluster as expected.

I can test it with permissions and qdevice, too. Would just have look up how
that actually works.

[0] https://www.mankier.com/8/pcs (ctrl+f for uidgid)





More information about the pve-devel mailing list