Description of problem: When creating NFS mounts using cockpit-storaged, existing newline characters are doubled, resulting in unwanted blank lines being inserted into /etc/fstab Version-Release number of selected component (if applicable): cockpit-282-1.fc37.x86_64 cockpit-storaged-282-1.fc37.noarch How reproducible: Always Steps to Reproduce: 1. Navigate to storage page in cockpit (https://localhost:9090/storage) 2. Add a valid NFS mount, ensuring that 'Mount at boot' is enabled 3. Inspect /etc/fstab Actual results: Every newline character is doubled with each edit of NFS mounts with cockpit-storaged Expected results: No unwanted blank lines should be added Additional info: This occurs every time NFS mounts are edited with cockpit-storaged, meaning more and more blank lines end up being inserted in /etc/fstab. For an example of the problem, see below. /etc/fstab prior to mountpoint creation: # # /etc/fstab # Created by anaconda on Fri Jan 29 17:08:22 2021 # # Accessible filesystems, by reference, are maintained under '/dev/disk/'. # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. # # After editing this file, run 'systemctl daemon-reload' to update systemd # units generated from this file. # UUID=b62f70a2-0892-4f54-8f5a-4801383e0b25 / btrfs subvol=root,x-systemd.device-timeout=0,compress=zstd:1 0 0 UUID=a9d5f7f6-f4ed-479f-90ca-bfcb102801f4 /boot ext4 defaults 1 2 UUID=6BA8-E6F2 /boot/efi vfat umask=0077,shortname=winnt 0 2 UUID=b62f70a2-0892-4f54-8f5a-4801383e0b25 /home btrfs subvol=home,x-systemd.device-timeout=0,compress=zstd:1 0 0 /etc/fstab after mountpoint creation with cockpit-storaged: # # /etc/fstab # Created by anaconda on Fri Jan 29 17:08:22 2021 # # Accessible filesystems, by reference, are maintained under '/dev/disk/'. # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info. # # After editing this file, run 'systemctl daemon-reload' to update systemd # units generated from this file. # UUID=b62f70a2-0892-4f54-8f5a-4801383e0b25 / btrfs subvol=root,x-systemd.device-timeout=0,compress=zstd:1 0 0 UUID=a9d5f7f6-f4ed-479f-90ca-bfcb102801f4 /boot ext4 defaults 1 2 UUID=6BA8-E6F2 /boot/efi vfat umask=0077,shortname=winnt 0 2 UUID=b62f70a2-0892-4f54-8f5a-4801383e0b25 /home btrfs subvol=home,x-systemd.device-timeout=0,compress=zstd:1 0 0 localhost:/home/user/test /home/user/mnt/test nfs defaults
I can reproduce this perfectly well, even in our TestStorageNfs.testNfsClient integration test. Thanks for the report!
Fixed in https://github.com/cockpit-project/cockpit/pull/18169
Great! I'll give it a test as soon as it is in bodhi.
This was fixed months ago.