-
Notifications
You must be signed in to change notification settings - Fork 34
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
Conversation
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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}
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
At long last, the prodigal p-helper commands have returned!