-
Notifications
You must be signed in to change notification settings - Fork 94
Fix: bootstrap: On join node, retrieve qdevice data before starting qdevice (bsc#1254243) #1984
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
base: master
Are you sure you want to change the base?
Fix: bootstrap: On join node, retrieve qdevice data before starting qdevice (bsc#1254243) #1984
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
fddae99 to
626d8ce
Compare
- Rename it to retrieve_data for reusability - Combine cpio with find to support retrieve directories recursively
626d8ce to
332eca0
Compare
b2cb065 to
ae5fe39
Compare
ae5fe39 to
e58f46d
Compare
…device (bsc#1254243) Remove function start_qdevice_on_join_node, no need to do certificate on join node for qdevice
e58f46d to
8bb2c87
Compare
nicholasyang2022
left a comment
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.
The description of "Problem" and "Solution" is not so clear.
The name of the qdevice-related certification directory under /etc/corosync/qdevice/net is different between nodes, which might cause problems when the node re-joins the cluster.
How were they different? How did crmsh generate the directory name previously?
no need to do certificate on join node for qdevice
Why?
| cmd = 'cpio -o << EOF\n{}\nEOF\n'.format( | ||
| '\n'.join((f for f in get_files_to_sync() if f != CSYNC2_KEY and f != CSYNC2_CFG)) | ||
| ) | ||
| def retrieve_data(from_node, data_list=None, data_type=None): |
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 would be more clear to name it
retrieve_filesinstead ofretrieve_data, as the word "data" is too general. - And also
file_list. data_typeis only used for outputting messages and has no actual functions. Passing it makes the code harder to understand. It would be better to passmsgdirectly, or use a more clear parameter name to reflect its usage.
Problem
When setup qdevice via init and join commands:
The name of the qdevice-related certification directory under
/etc/corosync/qdevice/netis different between nodes, which might cause problems when the node re-joins the clusterSolution
Refactor bootstrap.retrieve_all_config_files function
On join node, retrieve qdevice data before starting qdevice (bsc#1254243)
Remove function start_qdevice_on_join_node, no need to do certificate on join node for qdevice