online-install fails on expect of postgresql image
Closed this issue · 7 comments
Type: local, online installation
System: RHEL8
podman: podman version 3.3.1
command: ./mirror-registry install
Errror:
TASK [mirror_appliance : Check if Postgres image is loaded] *******************************************************************************************************************************************************
fatal: [root@localhost]: FAILED! => {"changed": true, "cmd": ["podman", "inspect", "--type=image", "registry.redhat.io/rhel8/postgresql-10:1-161"], "delta": "0:00:00.109087", "end": "2022-01-20 10:06:24.411485", "msg": "non-zero return code", "rc": 125, "start": "2022-01-20 10:06:24.302398", "stderr": "Error: error inspecting object: registry.redhat.io/rhel8/postgresql-10:1-161: image not known", "stderr_lines": ["Error: error inspecting object: registry.redhat.io/rhel8/postgresql-10:1-161: image not known"], "stdout": "[]", "stdout_lines": ["[]"]}
...ignoring
Resolution:
Manually pull the image:
podman pull registry.redhat.io/rhel8/postgresql-10:1-161
The same happens for radis as well. I would expect the installer to pull the images.
@rhodain at the moment online installation requires podman to be logged into registry.redhat.io so that it can pull the required images. Can you confirm that podman is able to pull the image outside of installation?
Created https://issues.redhat.com/browse/PROJQUAY-3076 to track and fix this issue. We should add validation before progressing with the Ansible playbook.
HI,
yes, I confirm that I logged in registry.redhat.io as just after the error from the installer I ran:
podman pull registry.redhat.io/rhel8/postgresql-10:1-161
Trying to pull registry.redhat.io/rhel8/postgresql-10:1-161...
Getting image source signatures
Checking if image destination supports signatures
Copying blob 63f9f4c31162 done
Copying blob ce3c6836540f done
Copying blob d49355ce848e done
Copying blob fcfe904ac5ff done
Copying config a6f45d5014 done
Writing manifest to image destination
Storing signatures
a6f45d501410cf8f33d6acd339e131937bd9ecc5a5fc40bb2adf5e2d9a8914af
I reran the installer and I failed again on the radis package. podman inspect
works only on already downloaded images.
The Ansible playbook is executing the podman commands as root. If you do a sudo podman login registry.redhat.io
and then run the installer, does it still error out? I think what's happening here is the user is logged into registry.redhat.io but not root.
All the commands are run as root directly. I do not use sudo. Here is the output of the commands:
[root@rhodain-quay install]# podman login registry.redhat.io
Username: *******
Password: *******
Login Succeeded!
[root@rhodain-quay install]# ./mirror-registry install --quayHostname rhodain-quay.redhat.com
__ __
/ \ / \ ______ _ _ __ __ __
/ /\ / /\ \ / __ \ | | | | / \ \ \ / /
/ / / / \ \ | | | | | | | | / /\ \ \ /
\ \ \ \ / / | |__| | | |__| | / ____ \ | |
\ \/ \ \/ / \_ ___/ \____/ /_/ \_\ |_|
\__/ \__/ \ \__
\___\ by Red Hat
Build, Store, and Distribute your Containers
INFO[2022-01-21 13:27:02] Install has begun
INFO[2022-01-21 13:27:02] Found execution environment at /root/install/execution-environment.tar
INFO[2022-01-21 13:27:02] Loading execution environment from execution-environment.tar
INFO[2022-01-21 13:27:10] Detected an installation to localhost
INFO[2022-01-21 13:27:10] Found SSH key at /root/.ssh/quay_installer
INFO[2022-01-21 13:27:10] Attempting to set SELinux rules on /root/.ssh/quay_installer
INFO[2022-01-21 13:27:10] Running install playbook. This may take some time. To see playbook output run the installer with -v (verbose) flag.
INFO[2022-01-21 13:27:10] Detected an installation to localhost
....
TASK [mirror_appliance : Check if Postgres image is loaded] *******************************************************************************************************************************************************
fatal: [root@localhost]: FAILED! => {"changed": true, "cmd": ["podman", "inspect", "--type=image", "registry.redhat.io/rhel8/postgresql-10:1-161"], "delta": "0:00:00.130061", "end": "2022-01-21 13:27:36.704703", "msg": "non-zero return code", "rc": 125, "start": "2022-01-21 13:27:36.574642", "stderr": "Error: error inspecting object: registry.redhat.io/rhel8/postgresql-10:1-161: image not known", "stderr_lines": ["Error: error inspecting object: registry.redhat.io/rhel8/postgresql-10:1-161: image not known"], "stdout": "[]", "stdout_lines": ["[]"]}
...ignoring
TASK [mirror_appliance : Pull Postgres image] *********************************************************************************************************************************************************************
fatal: [root@localhost]: FAILED! => {"changed": false, "msg": "Failed to pull image registry.redhat.io/rhel8/postgresql-10:1-161"}
PLAY RECAP ********************************************************************************************************************************************************************************************************
root@localhost : ok=13 changed=4 unreachable=0 failed=1 skipped=7 rescued=0 ignored=1
ERRO[2022-01-21 13:27:39] An error occurred: exit status 2
[root@rhodain-quay install]# podman image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
quay.io/quay/mirror-registry-ee latest e7fd2cab0796 2 minutes ago 397 MB
<none> <none> 0dd6d0b21e93 5 minutes ago 397 MB
<none> <none> 0823293a16d3 27 hours ago 397 MB
<none> <none> f6a8a9747166 27 hours ago 397 MB
<none> <none> fb48e528d8d4 27 hours ago 397 MB
<none> <none> 61c7588f9d77 27 hours ago 397 MB
<none> <none> d72a274a892c 27 hours ago 397 MB
<none> <none> 7790ca633ed0 27 hours ago 397 MB
<none> <none> 857c005b30b9 28 hours ago 397 MB
<none> <none> be84b1831289 28 hours ago 397 MB
registry.access.redhat.com/ubi8/pause latest 23b27449fc42 4 weeks ago 3.49 MB
[root@rhodain-quay install]# podman inspect --type=image registry.redhat.io/rhel8/postgresql-10:1-161
[]
Error: error inspecting object: registry.redhat.io/rhel8/postgresql-10:1-161: image not known
[root@rhodain-quay install]# podman pull registry.redhat.io/rhel8/postgresql-10:1-161
Trying to pull registry.redhat.io/rhel8/postgresql-10:1-161...
Getting image source signatures
Checking if image destination supports signatures
Copying blob 63f9f4c31162 done
Copying blob ce3c6836540f done
Copying blob d49355ce848e done
Copying blob fcfe904ac5ff done
Copying config a6f45d5014 done
Writing manifest to image destination
Storing signatures
a6f45d501410cf8f33d6acd339e131937bd9ecc5a5fc40bb2adf5e2d9a8914af
[root@rhodain-quay install]# podman inspect --type=image registry.redhat.io/rhel8/postgresql-10:1-161
[
{
"Id": "a6f45d501410cf8f33d6acd339e131937bd9ecc5a5fc40bb2adf5e2d9a8914af",
"Digest": "sha256:9a0e4988e56a75291b50ee506f4cfd3e373bfe916ce45d1dd562007ca265e820",
"RepoTags": [
"registry.redhat.io/rhel8/postgresql-10:1-161"
],
...
Got it, thanks for the logs. Will keep you updated.
@rhodain I was taking a closer look at this today. You do need to use sudo
. Podman stores images separately and currently the playbook uses root. Please give that a shot and let me know if you have any questions.