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 default value for master-node when provisioning cluster using OSB #621

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions osbenchmark/builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ def install(cfg):
master_nodes = cfg.opts("builder", "master.nodes")
seed_hosts = cfg.opts("builder", "seed.hosts")

# Ensure node_name and master_nodes match, using node_name as the default
if node_name not in master_nodes:
print(
f"The provided --node-name '{node_name}' and --master-nodes '{master_nodes}' are different. "
f"Using '{node_name}' for both node name and initial master node."
)
master_nodes = [node_name]
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am wondering, If this is the desired behavior then do we want to expose master_nodes ? Here we are reporting error but override the master_nodes values and continue with provisioning. I think we should either fail so that user is notified or not expose the master_nodes field at all. @IanHoang would like to know your thoughts as well


if build_type == "tar":
binary_supplier = supplier.create(cfg, sources, distribution, provision_config_instance, plugins)
p = provisioner.local(cfg=cfg, provision_config_instance=provision_config_instance, plugins=plugins, ip=ip, http_port=http_port,
Expand Down
Loading