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 1817605 - atomic install fails due to missing /var/lib/atomic directory
Summary: atomic install fails due to missing /var/lib/atomic directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jindrich Novy
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-26 16:06 UTC by Michael Nguyen
Modified: 2023-09-14 05:54 UTC (History)
12 users (show)

Fixed In Version: atomic-1.22.1-33.gitb507039.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-01 00:26:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1235 0 None None None 2020-04-01 00:26:57 UTC

Description Michael Nguyen 2020-03-26 16:06:30 UTC
Description of problem:
Cannot install the cockpit container (and possibly others) with the atomic command.  [Errno 2] No such file or directory: '/var/lib/atomic/install.json.lock'

Version-Release number of selected component (if applicable):
$ rpm -q atomic containers-common skopeo
atomic-1.22.1-29.gitb507039.el7.x86_64
containers-common-0.1.40-7.el7_8.x86_64
skopeo-0.1.40-7.el7_8.x86_64

$ rpm-ostree status
State: idle; auto updates disabled
Deployments:
● ostree://rhel-atomic-host-ostree:rhel-atomic-host/7/x86_64/standard
        OstreeRemoteStatus: Remote "rhel-atomic-host-ostree" not found
                   Version: 7.8.0 (2020-03-26 10:03:56)
                    Commit: 808a4d2401252b4b8b618ed9a3be8ebd98624d3f95950169107d508f27d50b29


How reproducible:
Always

Steps to Reproduce:
1. atomic install registry.access.redhat.com/rhel7/cockpit-ws


Actual results:
[cloud-user@s8 ~]$ sudo atomic install registry.access.redhat.com/rhel7/cockpit-ws
Pulling registry.access.redhat.com/rhel7/cockpit-ws:latest ...
Copying blob 1f1202c893ce done
Copying blob 32be9843afa0 done
Copying blob dc86afe5cc0c done
Copying config 34edc0b57e done
Writing manifest to image destination
Storing signatures
/usr/bin/docker run --rm --privileged -v /:/host registry.access.redhat.com/rhel7/cockpit-ws /container/atomic-install
+ sed -e /pam_selinux/d -e /pam_sepermit/d /etc/pam.d/cockpit
+ mkdir -p /host/etc/cockpit/ws-certs.d /host/etc/cockpit/machines.d
+ chmod 755 /host/etc/cockpit/ws-certs.d /host/etc/cockpit/machines.d
+ chown root:root /host/etc/cockpit/ws-certs.d /host/etc/cockpit/machines.d
+ mkdir -p /host/var/lib/cockpit
+ chmod 775 /host/var/lib/cockpit
+ chown root:wheel /host/var/lib/cockpit
+ mkdir -p /etc/ssh
+ /bin/mount --bind /host/etc/cockpit /etc/cockpit
+ /usr/sbin/remotectl certificate --ensure
[Errno 2] No such file or directory: '/var/lib/atomic/install.json.lock'


Expected results:
Cockpit container runs successfully

Additional info:
containers-common (part of skopeo) created /var/lib/atomic for its sigstore.  The sigstore has since been moved to /var/lib/containers so atomic is failing to create the install.json.lock file because /var/lib/atomic doesn't exist.

Comment 2 Martin Pitt 2020-03-26 16:12:50 UTC
This is the same issue as https://github.com/projectatomic/atomic/issues/1258 which we found a year ago.

We have used the mkdir workaround since then on Fedora Atomic: https://github.com/cockpit-project/cockpit-ostree/commit/0cdb0bee6fc5af7ff5eb291f0a49510146ca8883

Comment 6 Alex Jia 2020-03-27 11:47:43 UTC
Verified in atomic-1.22.1-33.gitb507039.el7_8.x86_64.

[root@atomic-host-test-001 cloud-user]# rpm -q atomic
atomic-1.22.1-33.gitb507039.el7_8.x86_64

[root@atomic-host-test-001 cloud-user]# atomic install registry.access.redhat.com/rhel7/cockpit-ws
/usr/bin/docker run --rm --privileged -v /:/host registry.access.redhat.com/rhel7/cockpit-ws /container/atomic-install
+ sed -e /pam_selinux/d -e /pam_sepermit/d /etc/pam.d/cockpit
+ mkdir -p /host/etc/cockpit/ws-certs.d /host/etc/cockpit/machines.d
+ chmod 755 /host/etc/cockpit/ws-certs.d /host/etc/cockpit/machines.d
+ chown root:root /host/etc/cockpit/ws-certs.d /host/etc/cockpit/machines.d
+ mkdir -p /host/var/lib/cockpit
+ chmod 775 /host/var/lib/cockpit
+ chown root:wheel /host/var/lib/cockpit
+ mkdir -p /etc/ssh
+ /bin/mount --bind /host/etc/cockpit /etc/cockpit
+ /usr/sbin/remotectl certificate --ensure

[root@atomic-host-test-001 cloud-user]# atomic images list | grep cockpit-ws
   registry.access.redhat.com/rhel7/cockpit-ws      latest   34edc0b57e16   2020-03-10 12:11   224.07 MB      docker

Comment 8 errata-xmlrpc 2020-04-01 00:26:56 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://access.redhat.com/errata/RHBA-2020:1235

Comment 9 Red Hat Bugzilla 2023-09-14 05:54:47 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


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