Closed navidshaikh closed 6 years ago
We got an atomic scanner which performs following operation
yum -q check-update --installroot=/scanin/<hash>
Scanner source code here This scanner works fine with CentOS base image, and CentOS based image_under_test.
We recently rebased this scanner onto RHEL7 base image and tried scanning another RHEL based container. It is failing with error
[Errno 30] Read-only file system: '/scanin/6fe46a33a57749b352ed567eb9b330f381d9a2efd2aaaccb4c221a2e8cc9ca83/etc/yum.repos.d/redhat.repo' Cannot open logfile /scanin/6fe46a33a57749b352ed567eb9b330f381d9a2efd2aaaccb4c221a2e8cc9ca83/var/log/yum.log ovl: Error while doing RPMdb copy-up: [Errno 30] Read-only file system: '/scanin/6fe46a33a57749b352ed567eb9b330f381d9a2efd2aaaccb4c221a2e8cc9ca83/var/lib/rpm/.dbenv.lock' Could not create lock at /scanin/6fe46a33a57749b352ed567eb9b330f381d9a2efd2aaaccb4c221a2e8cc9ca83/var/run/yum.pid: [Errno 30] Read-only file system: '/scanin/6fe46a33a57749b352ed567eb9b330f381d9a2efd2aaaccb4c221a2e8cc9ca83/var/run/yum.pid' Can't create lock file; exiting
on
[root@localhost ~]# cat /etc/os-release NAME="Red Hat Enterprise Linux Server" VERSION="7.4 (Maipo)" VERSION_ID="7.4" [..] [root@localhost ~]# rpm -q atomic atomic-1.22.1-1.gitd36c015.el7.x86_64
The image_under_test is mounted Read-only onto /scanin directory, while for CentOS based platform it could create lock file(read-write mode).
/scanin
How to get image_under_test mounted with read-write mode on /scanin directory?
I had to use atomic mount -o rw $IMAGE /mnt before executing atomic scan. This solved the issue.
atomic mount -o rw $IMAGE /mnt
atomic scan
We got an atomic scanner which performs following operation
Scanner source code here This scanner works fine with CentOS base image, and CentOS based image_under_test.
We recently rebased this scanner onto RHEL7 base image and tried scanning another RHEL based container. It is failing with error
on
The image_under_test is mounted Read-only onto
/scanin
directory, while for CentOS based platform it could create lock file(read-write mode).How to get image_under_test mounted with read-write mode on
/scanin
directory?