Skip to content

Commit

Permalink
Allow multiple bind addresses on entrypoints
Browse files Browse the repository at this point in the history
Both content and api worker allow to specify --bind multiple times now.

fixes #6053

(cherry picked from commit c2b648e)
  • Loading branch information
mdellweg committed Nov 25, 2024
1 parent dd30998 commit 0827540
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGES/6053.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Allowed to bind api and content workers to multiple addresses.
You can specify `--bind` multiple times on the `pulpcore-{api,content}` entrypoints.
5 changes: 3 additions & 2 deletions pulpcore/app/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def load(self):
# https://github.com/benoitc/gunicorn/blob/master/gunicorn/config.py


@click.option("--bind", "-b", default="[::]:24817")
@click.option("--bind", "-b", default=["[::]:24817"], multiple=True)
@click.option("--workers", "-w", type=int)
# @click.option("--threads", "-w", type=int) # We don't use a threaded worker...
@click.option("--name", "-n", "proc_name")
Expand Down Expand Up @@ -136,5 +136,6 @@ def load(self):
@click.option("--user", "-u")
@click.option("--group", "-g")
@click.command()
def main(**options):
def main(bind, **options):
options["bind"] = list(bind)
PulpcoreApiApplication(options).run()
5 changes: 3 additions & 2 deletions pulpcore/content/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def load(self):
return pulpcore.content.server


@click.option("--bind", "-b", default="[::]:24816")
@click.option("--bind", "-b", default=["[::]:24816"], multiple=True)
@click.option("--workers", "-w", type=int)
# @click.option("--threads", "-w", type=int) # We don't use a threaded worker...
@click.option("--name", "-n", "proc_name")
Expand All @@ -40,5 +40,6 @@ def load(self):
@click.option("--user", "-u")
@click.option("--group", "-g")
@click.command()
def main(**options):
def main(bind, **options):
options["bind"] = list(bind)
PulpcoreContentApplication(options).run()

0 comments on commit 0827540

Please sign in to comment.