Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to start PostgreSQL service #117

Open
rchakode opened this issue Mar 20, 2023 · 8 comments
Open

Failed to start PostgreSQL service #117

rchakode opened this issue Mar 20, 2023 · 8 comments

Comments

@rchakode
Copy link

rchakode commented Mar 20, 2023

It looks like there is a regression in mirror-registry 1.3.1, it's failing while starting PostgreSQL service (see details below).

It works with version 1.2.9.

My initial investigations by diving into generated manifests suggest that the service file has been renamed quay-postgres.service while the play is expecting posgres.service.

TASK [mirror_appliance : Set permissions on local storage directory] *************************************************************

skipping: [redhat@vmwftx-tobast1]

TASK [mirror_appliance : Copy Postgres systemd service file] *********************************************************************

ok: [redhat@vmwftx-tobast1]

TASK [mirror_appliance : Check if Postgres image is loaded] **********************************************************************

changed: [redhat@vmwftx-tobast1]

TASK [mirror_appliance : Pull Postgres image] ************************************************************************************

skipping: [redhat@vmwftx-tobast1]

TASK [mirror_appliance : Create Postgres Storage named volume] *******************************************************************

ok: [redhat@vmwftx-tobast1]

TASK [mirror_appliance : Start Postgres service] *********************************************************************************
fatal: [redhat@vmwftx-tobast1]: FAILED! => {"changed": false, "msg": "failure 1 during daemon-reload: Failed to connect to bus: Aucun fichier ou dossier de ce type\n"}
@dmage
Copy link
Contributor

dmage commented Mar 21, 2023

Is it a fresh installation? How do you run ./mirror-registry and what parameters do you use?

@rchakode
Copy link
Author

rchakode commented Mar 21, 2023

A fresh install with the following parameters (all the referenced TLS resources are available)

./mirror-registry install  \
   --initPassword mypasswd    \
   --initUser quayadmin    \
   --quayHostname myhost.ocp-domain:5000    \
   --sslKey /home/redhat/.redhat/ocp-bastion-mirror/ssl/myhost.key   \
   --sslCert /home/redhat/.redhat/ocp-bastion-mirror/ssl/myhost.cert    \
   --quayRoot /data-ocp-registry -v

Edit: change -vvv with -v

@dmage
Copy link
Contributor

dmage commented Mar 21, 2023

You can try --additionalArgs="-vvv" to have a more verbose output from Ansible

@rchakode
Copy link
Author

rchakode commented Mar 21, 2023

The -vvv option is not the root cause. I know it's actually -v.
Even without the verbose option, the issue is reproducible.

@rchakode
Copy link
Author

The same command with mirror-registry 1.2.9 works.

@dmage
Copy link
Contributor

dmage commented Mar 21, 2023

Right, but we need to see what exactly doesn't work. We have tested both v1.3.0 and v1.3.1 and they work in our environments.

Check if systemctl --user status works. If it doesn't work, perhaps something is wrong with environment variables for D-Bus.

@dmage
Copy link
Contributor

dmage commented Mar 21, 2023

Also, do you run it as root or as a user?

@rchakode
Copy link
Author

rchakode commented Mar 21, 2023

I'm using a regular user, who is a sudoer.

systemctl --user status

● myhost
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Tue 2023-03-21 09:17:43 CET; 5h 35min ago
   CGroup: [/user.slice/user-1001.slice/[email protected]](mailto:/user.slice/user-1001.slice/[email protected])
           └─init.scope
             ├─63714 /usr/lib/systemd/systemd --user
             └─63718 (sd-pam)

As additional details, I found that the command that fails is the following:

podman run --rm --interactive --tty --workdir /runner/project \
	--net host -v /home/redhat/ocp-bin/image-archive.tar:/runner/image-archive.tar \
	-v /home/redhat/.redhat/ocp-bastion-mirror/ssl/myhost.cert:/runner/certs/quay.cert:Z \
	-v /home/redhat/.redhat/ocp-bastion-mirror/ssl/myhost.key:/runner/certs/quay.key:Z \
	-v /home/redhat/.ssh/quay_installer:/runner/env/ssh_key \
	-e RUNNER_OMIT_EVENTS=False -e RUNNER_ONLY_FAILED_EVENTS=False -e ANSIBLE_HOST_KEY_CHECKING=False \
	-e ANSIBLE_CONFIG=/runner/project/ansible.cfg -e ANSIBLE_NOCOLOR=false --quiet --name ansible_runner_instance \
	quay.io/quay/mirror-registry-ee:latest \
	ansible-playbook -i redhat@myhost, --private-key /runner/env/ssh_key \
	-e "init_user=quayadmin init_password=Nvn4suU.BvlbuNf quay_image=registry.redhat.io/quay/quay-rhel8:v3.8.3 \
	quay_version=v3.8.3 redis_image=registry.redhat.io/rhel8/redis-6:1-92.1669834635 postgres_image=registry.redhat.io/rhel8/postgresql-10:1-203.1669834630 \
	pause_image=registry.access.redhat.com/ubi8/pause:8.7-6 \
	quay_hostname=myhost.mydomainn:5000 local_install=true quay_root=/data-ocp-registry \
	quay_storage=quay-storage pg_storage=pg-storage" install_mirror_appliance.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants