RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1273365 - Can't unmount a container image previously mounted with atomic mount
Summary: Can't unmount a container image previously mounted with atomic mount
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.2
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Brent Baude
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-20 09:45 UTC by Alex Jia
Modified: 2016-04-07 09:54 UTC (History)
5 users (show)

Fixed In Version: atomic-1.6-1.gitca1e384.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1274518 (view as bug list)
Environment:
Last Closed: 2016-03-31 23:25:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0527 0 normal SHIPPED_LIVE atomic bug fix and enhancement update 2016-04-01 03:20:15 UTC

Description Alex Jia 2015-10-20 09:45:30 UTC
Description of problem:
Can't unmount a container image previously mounted with atomic mount, and got error "Device mounted at /mnt is not a docker container."

Version-Release number of selected component (if applicable):
[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo atomic host status
  TIMESTAMP (UTC)         VERSION   ID             OSNAME               REFSPEC                                                        
* 2015-10-15 09:13:14     7.1.6     9f139ac644     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard     
  2015-02-19 20:26:26     7.1.0     5799825b36     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard    
 
[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ rpm -q atomic docker
atomic-1.5-4.git7e4365f.el7.x86_64
docker-1.8.2-7.el7.x86_64


How reproducible:
always

Steps to Reproduce:
1. atomic update busybox
2. atomic mount <image_id> /mnt
3. atomic unmount /mnt
or 
   atomic unmount /var/mnt

Actual results:

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo atomic update busybox
Using default tag: latest
Trying to pull repository registry.access.redhat.com/busybox ... not found
Trying to pull repository docker.io/library/busybox ... latest: Pulling from library/busybox
718495ebac5c: Pull complete 
0064fda8c45d: Pull complete 
library/busybox:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:3ebe07818fc2a8001cbb672b878ab0b81f047066093bb9c3f05600514710b921
Status: Downloaded newer image for docker.io/busybox:latest

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo atomic images
 REPOSITORY                          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
 docker.io/busybox                   latest              0064fda8c45d        2015-10-14 19:36    1.11 MB     

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo atomic mount 0064fda8c45d /mnt
[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo df | grep mnt
/dev/dm-4                  10474496    1888  10472608   1% /var/mnt

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo grep mnt /proc/mounts
/dev/mapper/docker-253:0-2905705-8a2542a055de6d5c982a6c02fdd05163ee48553eedcc2e898c2f5c4f7ebc20e2 /var/mnt xfs ro,context="system_u:object_r:svirt_sandbox_file_t:s0:c765,c1004",nosuid,nodev,relatime,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota 0 0
/dev/mapper/docker-253:0-2905705-8a2542a055de6d5c982a6c02fdd05163ee48553eedcc2e898c2f5c4f7ebc20e2 /var/mnt xfs ro,context="system_u:object_r:svirt_sandbox_file_t:s0:c765,c1004",nosuid,nodev,relatime,attr2,inode64,logbsize=64k,sunit=128,swidth=128,noquota 0 0

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo atomic unmount /mnt
Device mounted at /mnt is not a docker container.

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo atomic unmount /var/mnt
Device mounted at /var/mnt is not a docker container.

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ df | grep mnt
/dev/dm-4                  10474496    1888  10472608   1% /var/mnt


Expected results:

Can unmount a container image previously mounted with atomic mount

Additional info:

It's okay on 7.1.5 RHEL Atomic OSTree, it should be a regression bug.

Comment 2 Daniel Walsh 2015-10-20 16:10:15 UTC
Is the backend the same both devmapper?  Or is this on overlayfs?

Comment 3 Alex Jia 2015-10-21 03:26:47 UTC
(In reply to Daniel Walsh from comment #2)
> Is the backend the same both devmapper?  Or is this on overlayfs?

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ rpm -q kernel
kernel-3.10.0-229.14.1.el7.x86_64
[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ lsmod|grep -i overlay
[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ dmesg|grep -i overlay
[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo docker info | grep -i -A3 storage 
Storage Driver: devicemapper
 Pool Name: atomicos-docker--pool
 Pool Blocksize: 65.54 kB
 Backing Filesystem: xfs

Comment 4 Daniel Walsh 2015-10-21 16:06:37 UTC
Brent does the latest fix for atomic unmount fix this problem?

Comment 7 Brent Baude 2015-10-22 18:29:24 UTC
(In reply to Daniel Walsh from comment #4)
> Brent does the latest fix for atomic unmount fix this problem?

Yes, I believe it will. I also just submitted a new PR to fix a bug related to atomic mount and XFS ... which default RHEL/Atomic is.  Would be prudent to pick that one up too.

Comment 8 Daniel Walsh 2015-10-22 18:56:43 UTC
Fixed in atomic-1.6

Comment 11 Alex Jia 2015-10-23 08:21:14 UTC
This issue has been verified on atomic-1.6-1.gitca1e384.el7.x86_64, so move the bug to verified status, the test details as follows.

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo atomic host status
  TIMESTAMP (UTC)         VERSION               ID             OSNAME               REFSPEC                                                               
* 2015-10-23 07:19:49     7.2.internal.0.47     4bd90ff2fd     rhel-atomic-host     rhelah-autobuild:rhel-atomic-host/7.2/x86_64/autobrew/buildmaster     
  2015-10-15 09:13:14     7.1.6                 9f139ac644     rhel-atomic-host     rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard            

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ rpm -q atomic
atomic-1.6-1.gitca1e384.el7.x86_64

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo atomic images
 REPOSITORY                          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
 docker.io/busybox                   latest              0064fda8c45d        2015-10-14 19:36    1.11 MB  
   
[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo atomic mount busybox /mnt

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ df -hT
Filesystem                Type      Size  Used Avail Use% Mounted on
/dev/mapper/atomicos-root xfs       3.0G  2.1G  866M  72% /
devtmpfs                  devtmpfs  902M     0  902M   0% /dev
tmpfs                     tmpfs     921M     0  921M   0% /dev/shm
tmpfs                     tmpfs     921M  304K  920M   1% /run
tmpfs                     tmpfs     921M     0  921M   0% /sys/fs/cgroup
/dev/vda1                 xfs       297M  139M  159M  47% /boot
tmpfs                     tmpfs     185M     0  185M   0% /run/user/1000
/dev/dm-4                 xfs        10G  1.9M   10G   1% /var/mnt

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ sudo atomic unmount /mnt

[cloud-user@plat-infra-382a4f35-aa37-447b-a7f6-c8b8181165fd ~]$ df -hT
Filesystem                Type      Size  Used Avail Use% Mounted on
/dev/mapper/atomicos-root xfs       3.0G  2.1G  866M  72% /
devtmpfs                  devtmpfs  902M     0  902M   0% /dev
tmpfs                     tmpfs     921M     0  921M   0% /dev/shm
tmpfs                     tmpfs     921M  300K  920M   1% /run
tmpfs                     tmpfs     921M     0  921M   0% /sys/fs/cgroup
/dev/vda1                 xfs       297M  139M  159M  47% /boot
tmpfs                     tmpfs     185M     0  185M   0% /run/user/1000

Comment 14 errata-xmlrpc 2016-03-31 23:25:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0527.html


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