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

ignore missing info.yaml file when joining dqlite control plane node #4488

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neoaggelos
Copy link
Member

Summary

When joining control plane nodes, do not fail if the info.yaml file of the existing dqlite cluster does not exist

Addresses the following error:

Traceback (most recent call last):
  File "/snap/microk8s/6738/scripts/wrappers/join.py", line 1015, in <module>
    join(prog_name="microk8s join")
  File "/snap/microk8s/6738/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/snap/microk8s/6738/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/snap/microk8s/6738/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/snap/microk8s/6738/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/snap/microk8s/6738/scripts/wrappers/join.py", line 1005, in join
    join_dqlite(connection_parts, verify, worker)
  File "/snap/microk8s/6738/scripts/wrappers/join.py", line 689, in join_dqlite
    join_dqlite_master_node(info, master_ip)
  File "/snap/microk8s/6738/scripts/wrappers/join.py", line 839, in join_dqlite_master_node
    update_dqlite(info["cluster_cert"], info["cluster_key"], info["voters"], hostname_override)
  File "/snap/microk8s/6738/scripts/wrappers/join.py", line 597, in update_dqlite
    with open("{}/info.yaml".format(cluster_backup_dir)) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/var/snap/microk8s/6738/var/kubernetes/backend.backup/info.yaml'

Copy link
Contributor

@addyess addyess left a comment

Choose a reason for hiding this comment

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

black did some odd things here...

scripts/wrappers/join.py Outdated Show resolved Hide resolved
scripts/wrappers/join.py Show resolved Hide resolved
scripts/wrappers/join.py Outdated Show resolved Hide resolved
scripts/wrappers/join.py Outdated Show resolved Hide resolved
Copy link
Contributor

@addyess addyess left a comment

Choose a reason for hiding this comment

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

yah, thanks

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.

None yet

2 participants