Skip to content

Commit

Permalink
Merge pull request #4960 from apache/fix-dev-run-setup-config-2
Browse files Browse the repository at this point in the history
implement this same as maybe_boot_clouseau
  • Loading branch information
rnewson committed Jan 10, 2024
2 parents 20c30a5 + f1d6017 commit 50e1d16
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions dev/run
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,7 @@ def setup_configs(ctx):
write_config(ctx, node, env)
write_locald_configs(ctx, node, env)
generate_haproxy_config(ctx)
if env["nouveau_enable"] == "true":
generate_nouveau_config(ctx)
generate_nouveau_config(ctx)


def write_locald_configs(ctx, node, env):
Expand Down Expand Up @@ -414,6 +413,8 @@ def generate_haproxy_config(ctx):


def generate_nouveau_config(ctx):
if not ctx["with_nouveau"]:
return
src = os.path.join(ctx["rootdir"], "rel", "nouveau.yaml")
tgt = os.path.join(ctx["devdir"], "lib", "nouveau.yaml")

Expand Down Expand Up @@ -532,9 +533,12 @@ def boot_haproxy(ctx):
return sp.Popen(cmd, stdin=sp.PIPE, stdout=log, stderr=sp.STDOUT, env=env)


def maybe_boot_nouveau(ctx):
if ctx["with_nouveau"]:
return boot_nouveau(ctx)


def boot_nouveau(ctx):
if not ctx["with_nouveau"]:
return
config = os.path.join(ctx["devdir"], "lib", "nouveau.yaml")
cmd = [
"./gradlew",
Expand Down Expand Up @@ -901,7 +905,7 @@ def boot_nodes(ctx):
haproxy_proc = boot_haproxy(ctx)
if haproxy_proc is not None:
ctx["procs"].append(haproxy_proc)
nouveau_proc = boot_nouveau(ctx)
nouveau_proc = maybe_boot_nouveau(ctx)
if nouveau_proc is not None:
ctx["procs"].append(nouveau_proc)
for idx in [(i + ctx["node_number"]) for i in range(ctx["N"])]:
Expand Down

0 comments on commit 50e1d16

Please sign in to comment.