Bug 1288938 - Cannot copy non-regular/non-symlink file: msr
Cannot copy non-regular/non-symlink file: msr
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: atomic (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lokesh Mandvekar
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-06 23:38 EST by Chris Murphy
Modified: 2015-12-07 13:08 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-07 01:35:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
strace atomic host upgrade (1.72 MB, application/x-gzip)
2015-12-06 23:40 EST, Chris Murphy
no flags Details

  None (edit)
Description Chris Murphy 2015-12-06 23:38:54 EST
Description of problem:

After "converting" Fedora Atomic Host to Btrfs issuing either 'rpm-ostree upgrade' or 'atomic host upgrade' it fails with an error message.


Version-Release number of selected component (if applicable):
rpm-ostree-2015.9-2.fc23.x86_64
atomic-1.6-5.git09ac479.fc23.x86_64

Fedora Atomic Host
    Version: 23.22
    origin refspec: fedora-atomic:fedora-atomic/f23/x86_64/docker-host



How reproducible:
Always



Steps to Reproduce:
1. Fedora-Cloud-Atomic-23-20151201.x86_64.qcow2 is converted such that boot and root fs are Btrfs (see below for details)
2. atomic host upgrade or rpm-ostree upgrade


Actual results:

-bash-4.3# rpm-ostree upgrade
Updating from: fedora-atomic:fedora-atomic/f23/x86_64/docker-host


Copying /etc changes: 22 modified, 0 removed, 29606 added
error: During /etc merge: Cannot copy non-regular/non-symlink file: msr



Expected results:

Should update.


Additional info:

Understood this is an unsupported configuration, but one day maybe it will be supported so the problem should be found.

Convert to btrfs:
1. Fedora-Cloud-Atomic-23-20151201.x86_64.qcow2 as backing file.
2. New FCA23-20151201-btrfsconverted.qcow2 file as separate device.
3. Boot VM, and create a new btrfs volume on /dev/vdb (-d single -m single, nothing special)
4. Mount the real root using 'mount /dev/mapper/atomicos-root /var/mnt/xfs' and copy it using rsync -pogAXtlHrDx to the btrfs volume. Also make a boot subvolume on Btrfs volume so it can be mounted at /boot, similar to the original ext4 boot volume.
5. Fix up the grub.cfg, and fstab to accommodate the changes.
6. Confirm it boots OK and also 'ostree admin status' and "ostree fsck' have no complaints.
Comment 1 Chris Murphy 2015-12-06 23:40 EST
Created attachment 1102991 [details]
strace atomic host upgrade

The entire strace is 22MB uncompressed. The last 50 or so lines:


getdents(15, /* 170 entries */, 32768)  = 5072
newfstatat(15, "cpu", {st_mode=S_IFDIR|0755, st_size=22, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(15, "cpu", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 18
mkdirat(17, "cpu", 0700)                = 0
openat(17, "cpu", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 19
llistxattr("/proc/self/fd/15/cpu", NULL, 0) = 17
llistxattr("/proc/self/fd/15/cpu", "security.selinux\0", 17) = 17
lgetxattr("/proc/self/fd/15/cpu", "security.selinux", 0x0, 0) = 32
lgetxattr("/proc/self/fd/15/cpu", "security.selinux", "system_u:object_r:net_conf_t:s0", 32) = 32
fsetxattr(19, "security.selinux", "system_u:object_r:net_conf_t:s0", 32, 0) = 0
fstat(18, {st_mode=S_IFDIR|0755, st_size=22, ...}) = 0
fchown(19, 0, 0)                        = 0
fchmod(19, 040755)                      = 0
fstat(18, {st_mode=S_IFDIR|0755, st_size=22, ...}) = 0
fcntl(18, F_GETFL)                      = 0x18800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY)
fcntl(18, F_SETFD, FD_CLOEXEC)          = 0
getdents(18, /* 5 entries */, 32768)    = 128
newfstatat(18, "0", {st_mode=S_IFDIR|0755, st_size=16, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(18, "0", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 20
mkdirat(19, "0", 0700)                  = 0
openat(19, "0", O_RDONLY|O_NOCTTY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 21
llistxattr("/proc/self/fd/18/0", NULL, 0) = 17
llistxattr("/proc/self/fd/18/0", "security.selinux\0", 17) = 17
lgetxattr("/proc/self/fd/18/0", "security.selinux", 0x0, 0) = 32
lgetxattr("/proc/self/fd/18/0", "security.selinux", "system_u:object_r:net_conf_t:s0", 32) = 32
fsetxattr(21, "security.selinux", "system_u:object_r:net_conf_t:s0", 32, 0) = 0
fstat(20, {st_mode=S_IFDIR|0755, st_size=16, ...}) = 0
fchown(21, 0, 0)                        = 0
fchmod(21, 040755)                      = 0
fstat(20, {st_mode=S_IFDIR|0755, st_size=16, ...}) = 0
fcntl(20, F_GETFL)                      = 0x18800 (flags O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY)
fcntl(20, F_SETFD, FD_CLOEXEC)          = 0
getdents(20, /* 4 entries */, 32768)    = 104
newfstatat(20, "msr", {st_mode=S_IFCHR|0600, st_rdev=makedev(202, 0), ...}, AT_SYMLINK_NOFOLLOW) = 0
unlinkat(21, "msr", 0)                  = -1 ENOENT (No such file or directory)
close(20)                               = 0
close(21)                               = 0
close(18)                               = 0
close(19)                               = 0
close(15)                               = 0
close(17)                               = 0
close(16)                               = 0
close(11)                               = 0
close(13)                               = 0
close(14)                               = 0
munmap(0x7faaf8c58000, 782336)          = 0
munmap(0x7fab05ed9000, 4096)            = 0
munmap(0x7fab05eda000, 49152)           = 0
munmap(0x7fab05ee6000, 1445888)         = 0
close(12)                               = 0
munmap(0x7fab0606c000, 815)             = 0
munmap(0x7fab0606b000, 58)              = 0
munmap(0x7fab0606a000, 2062)            = 0
munmap(0x7fab06049000, 58)              = 0
munmap(0x7fab06048000, 445)             = 0
munmap(0x7fab06047000, 58)              = 0
munmap(0x7fab0606e000, 1062)            = 0
munmap(0x7fab0606d000, 59)              = 0
close(4)                                = 0
close(6)                                = 0
close(5)                                = 0
close(-1)                               = -1 EBADF (Bad file descriptor)
close(3)                                = 0
ioctl(1, TCGETS, {B115200 opost isig icanon echo ...}) = 0
write(2, "\33[31m\33[1merror: \33[22m\33[0mDuring "..., 90error: During /etc merge: Cannot copy non-regular/non-symlink file: msr
) = 90
exit_group(1)                           = ?
+++ exited with 1 +++
Comment 2 Chris Murphy 2015-12-06 23:49:28 EST
Seems like this is not related to btrfs or rsync, because when I use the original Atomic Host qcow2 (as backing file for a new qcow2 file), I get this similar error:

-bash-4.3# atomic host upgrade
Updating from: fedora-atomic:fedora-atomic/f23/x86_64/docker-host

40 metadata, 106 content objects fetched; 99046 KiB transferred in 19 seconds
Copying /etc changes: 22 modified, 0 removed, 18079 added
error: During /etc merge: Cannot copy non-regular/non-symlink file: vga_arbiter
-bash-4.3# rpm-ostree upgrade
Updating from: fedora-atomic:fedora-atomic/f23/x86_64/docker-host

Copying /etc changes: 22 modified, 0 removed, 18079 added
error: During /etc merge: Cannot copy non-regular/non-symlink file: vga_arbiter
Comment 3 Chris Murphy 2015-12-07 01:35:14 EST
When I create a new qcow2:
# qemu-img create -f qcow2 -b Fedora-Cloud-Atomic-23-20151201.x86_64.qcow2 FCA23-20151201-20151206.qcow2

and then attach and boot FCA23-20151201-20151206.qcow2, the command succeeds:
$ [fedora@atomic01 ~]$ sudo rpm-ostree upgrade
Updating from: fedora-atomic:fedora-atomic/f23/x86_64/docker-host

40 metadata, 106 content objects fetched; 99046 KiB transferred in 16 seconds
Copying /etc changes: 22 modified, 0 removed, 43 added
Transaction complete; bootconfig swap: yes deployment count change: 1
Changed:
  dbus 1:1.10.4-1.fc23 -> 1:1.10.6-1.fc23
  dbus-libs 1:1.10.4-1.fc23 -> 1:1.10.6-1.fc23
  glibc 2.22-5.fc23 -> 2.22-6.fc23
  glibc-common 2.22-5.fc23 -> 2.22-6.fc23
  grep 2.22-2.fc23 -> 2.22-3.fc23
  krb5-libs 1.13.2-13.fc23 -> 1.14-2.fc23
  libxml2 2.9.3-1.fc23 -> 2.9.3-2.fc23
  nettle 3.1.1-4.fc23 -> 3.1.1-5.fc23
  openssl 1:1.0.2d-3.fc23 -> 1:1.0.2e-1.fc23
  openssl-libs 1:1.0.2d-3.fc23 -> 1:1.0.2e-1.fc23
  pcre 8.38-2.fc23 -> 8.38-3.fc23
  python3-libxml2 2.9.3-1.fc23 -> 2.9.3-2.fc23
  rpcbind 0.2.3-0.4.fc23 -> 0.2.3-5.fc23
  rpm-ostree 2015.9-2.fc23 -> 2015.10-1.fc23
Upgrade prepared for next boot; run "systemctl reboot" to start a reboot


I don't know how I got into the originally reported problem, so I'm going to close this as not having enough information. I'll reopen if I figure out what's going on.
Comment 4 Colin Walters 2015-12-07 11:48:09 EST
I'm guessing you somehow rsync'd /dev into /etc.
Comment 5 Chris Murphy 2015-12-07 13:08:02 EST
(In reply to Colin Walters from comment #4)
> I'm guessing you somehow rsync'd /dev into /etc.

I'm not sure how, because the rsync was done while booted from another (non-atomic) system. I rsync'd the inactive real root. I'll give it another shot at some point.

Note You need to log in before you can comment on or make changes to this bug.