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

Add p-helper commands to make restarting Pulp easier #161

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

gerrod3
Copy link
Contributor

@gerrod3 gerrod3 commented Jun 25, 2024

At long last, the prodigal p-helper commands have returned!

export HOME /var/lib/pulp/

# TODO: Modify OCI base image to allow for auto reload to be configurable so we don't have to override this.
/usr/local/bin/gunicorn pulpcore.app.wsgi:application --bind "127.0.0.1:24817" --name pulp-api --access-logfile - --access-logformat "pulp [%({correlation-id}o)s]: %(h)s %(l)s %(u)s %(t)s \"%(r)s\" %(s)s %(b)s \"%(f)s\" \"%(a)s\"" --reload
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this removing the automatic reload logic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't. In pulp_config.env we have PULP_GUNICORN_RELOAD=True and we have proper support for this in the OCI images, unless you are using a super old image nothing should change.

@@ -154,6 +156,12 @@ def parse_pulp_cli_command(subparsers):
parser.set_defaults(func=pulp)


def parse_phelper_commands(subparsers):
for action in ("start", "stop", "restart"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for action in ("start", "stop", "restart"):
for action in ("start", "stop", "restart", "status", "clean", "dbreset", "help"):

We need to register the rest of the commands:

oci-env phelp
usage: oci-env [-h] [-v] [-e ENV_FILE]
               {compose,exec,db,shell,test,generate-client,pulpcore-manager,profile,poll,pulp,pstart,pstop,prestart}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I really need to? clean and dbreset are already covered in other commands, status doesn't do anything extra than what pulp status does, and help is redundant. Those extra commands are helpful inside the container, but outside I don't think so.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, phelp can be useful for showing what commends are available for the user. If we wanted to completely mirror the old behaviour, it would be nice to have this change included.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I just added the rest of the phelper commands to the list. I guess it isn't much of a big deal.

@lubosmj lubosmj merged commit 92e07a8 into pulp:main Sep 26, 2024
6 of 7 checks passed
@gerrod3 gerrod3 deleted the phelper branch September 26, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants