"pulp in one container" instructions fail at `reset-admin-password`

I followed the instructions on Pulp in One Container | software repository management
installed to Fedora 38 server
and when I try podman exec -it pulp bash -c 'pulpcore-manager reset-admin-password'

I get this error:

dynaconf.validator.ValidationError: CONTENT_ORIGIN is a required setting but it was not configured. This may be caused by invalid read permissions of the settings file. Note that CONTENT_ORIGIN is set by the installer automatically.

I have tried both a hostname and localhost in the settings.py.

CONTENT_ORIGIN='http://localhost:8080'
ANSIBLE_API_HOSTNAME='http://localhost:8080'
ANSIBLE_CONTENT_HOSTNAME='http://localhost:8080/pulp/content'
CACHE_ENABLED=True

I suspect this is a common problem, or it isn’t and maybe something new with Fedora 38?

Hi @Blaise,

We could reproduce this error in our lab env.
Please, give us some time to investigate it further.

3 Likes

@Blaise could you paste the content of the settings/settings.py file of your pulp installation? The one out of the container.

Thanks

1 Like

Hi @decko ,
thanks for the tip

[root@1a4ba22e90a0 /]# cat /etc/pulp/settings.py
CONTENT_ORIGIN='http://localhost:8080'
ANSIBLE_API_HOSTNAME='http://localhost:8080'
ANSIBLE_CONTENT_HOSTNAME='http://localhost:8080/pulp/content'
CACHE_ENABLED=True

$ podman version
Client:       Podman Engine
Version:      4.5.1
API Version:  4.5.1
Go Version:   go1.20.4
Built:        Fri May 26 17:58:48 2023
OS/Arch:      linux/amd64

I’m using Fedora 38 here and tested it a couple of times today. No issues so far.

Did you use the SELinux version of the command to run pulp container?
https://pulpproject.org/pulp-in-one-container/#with-selinux

I don’t think have selinux enforced, but I tried with both sets of instructions just in case. The failure is the same.

FWIW, this is a fresh fedora38 install, not an upgrade from a previous version.

You can check under /etc/pulp into the container. Just to make sure the mapping between outside and inside the container are working properly.
You have to find the settings.py inside /etc/pulp and the content must be the same as the one out of it.

1 Like

I think mine here is a fresh one too.
Yet, I will try to run the same steps inside a fresh F38 vm here.

1 Like

I should probably also mention that I running on a headless server, which I have behind a reverse proxy, so once this gets up and running I will want to connect using its domain name, not localhost.

Don’t think it should be a problem.

You could try removing the container, change the hostname using hostnamectl and try to fresh start it again.

1 Like

SGTM. I’ll do that after I get it working .

@hyagi , I’m available if there’s anything I can do to help.
In the meantime, maybe I should try a different installation method. Maybe use pip install instead?

Hi @Blaise,

I’m very sorry for not posting any update, since decko took over the troubleshooting I didn’t proceed with the investigation.
Just out of curiosity, do you mind sending us the logs from pulp container at https://pastebin.centos.org/?

podman logs pulp &> /tmp/pulp-container.log
1 Like

Hi @hyagi , @decko
Amazingly, it seems to work now.
At least it doesn’t fail at the password change.
The logs are here:
https://paste.centos.org/view/bc988a45
and they do seem to include the earlier tracebacks.
Thanks so much. I hope this is useful.

2 Likes

Nothing better than a user hitting a problem, fixing it, and still sending us debug info so we can maybe figure out what happened post-mortem - thanks @Blaise !

1 Like

The Dynaconf FileNotFoundError issue again. :tired_face:

1 Like

Funny you should notice…

This is how I usually roll because we’re all in this together and I have been doing community projects for a very long time.

Also, I was impressed that @hyagi followed up and I figure if you folks are so committed, I am going to rise to the occasion.

Finally, for anyone reading this thread, consider that pulp is a piece of critical infrastructure so we can’t afford to fall into the “works on my machine” attitude that some other projects exhibit.

3 Likes

I have an intuition that maybe some services are not completely up in time and so they don’t appear when requested…?

Like what @Blaise ???

Like I said, it’s an intuition, but I noticed that things don’t always go smoothly near [oneshot] (line 378)

[oneshot] add-workers: ESC[32mAdding workers 2 through 2ESC[0m
[oneshot] add-workers: ESC[32mWorkers will be added shortly after the boot finishesESC[0m
s6-rc: fatal: unable to take locks: Resource busy