Open tuxwielder opened 5 years ago
The following seems to fix our issue for us:
--- srv/salt/ceph/subvolume/default.sls.org 2019-07-03 16:24:24.393357287 +0200
+++ srv/salt/ceph/subvolume/default.sls 2019-07-03 16:42:44.248197060 +0200
@@ -8,7 +8,7 @@
{# sed is easier to explain/debug than file.replace #}
fstab:
cmd.run:
- - name: "sed -i 's!LABEL=ROOT /var btrfs defaults,subvol=@/var 0 0!&\\\nLABEL=ROOT /var/lib/ceph btrfs defaults,subvol=@/var/lib/ceph 0 0!' /etc/fstab"
+ - name: "sed -i 's!\\(^[^ ]*\\).*/var .*.*$!&\\n\\1 /var/lib/ceph btrfs subvol=@/var/lib/ceph 0 0!' /etc/fstab"
- unless: "grep -q subvol=@/var/lib/ceph /etc/fstab"
- failhard: True
Description of Issue/Question
Since GMC2 the btrfs volume step as documented in the official deployment and admin guides fails (i.e. the instruction to run "root@master # salt-run state.orch ceph.migrate.subvolume"). I'm too frustrated to create a separate bug-report on the production! documentation being wrong :).
It fails because since commit c0eef0534c81e441578e5c7cfb682c3a395124d0 this logic has been moved to 'srv/salt/ceph/subvolume'
The README for this, is not packaged into the GMC2 RPM's, but reading the instructions from the Github repository, we are supposed to run:
As a preparatory step on the monitor minions.
The latter fails on our SLES15SP1/SES6 GMC2 (and probably SES6 GM!) deployments, because the code in '/srv/salt/ceph/subvolume/default.sls' assumes a default label in fstab ('LABEL=ROOT'), whereas our SLES15SP1/SES6 GMC2 installation uses UUID as labels (e.g. UUID=e0f0dd5d-4559-46fa-8894-c76da5fb359e /var btrfs subvol=/@/var 0 0 ).
Therefore the fstab is never adopted properly.
Setup
Just install SLES15SP1 with SES6 GMC2 and follow the new instructions.
Steps to Reproduce Issue
Versions Report
(Provided by running:
salt-run deepsea.version
rpm -qi salt-minion
rpm -qi salt-master
)