-
Notifications
You must be signed in to change notification settings - Fork 359
allow the status-section to be updated on a crm_shadow commit with an explicit switch #4106
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: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,7 @@ static struct { | |
| gboolean force; | ||
| gboolean batch; | ||
| gboolean full_upload; | ||
| gboolean update_status; | ||
| gchar *validate_with; | ||
| } options = { | ||
| .cmd_options = cib_sync_call, | ||
|
|
@@ -679,6 +680,12 @@ commit_shadow_file(GError **error) | |
| return; | ||
| } | ||
|
|
||
| if (options.update_status) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand how this would fix the issue. Based on RHEL-70283, it appears that the issue is that adding devices to a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't fix the issue right away. There is already RHELHA-1011 to take care of this from the pcs side. Just after your commit there was no low-level-tool left you could use to update the status section. Both for getting an atomic update and for the interface crm_shadow seems like the reasonable answer. |
||
| options.full_upload = TRUE; | ||
| free(crm_system_name); | ||
| crm_system_name = strdup("crm_shadow_status"); | ||
| } | ||
|
|
||
| filename = get_shadow_file(options.instance); | ||
| if (check_file_exists(filename, true, error) != pcmk_rc_ok) { | ||
| goto done; | ||
|
|
@@ -1139,6 +1146,11 @@ static GOptionEntry addl_entries[] = { | |
| &options.validate_with, | ||
| "(Advanced) Create an older configuration version", NULL }, | ||
|
|
||
| { "update-status", 'u', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, | ||
| &options.update_status, | ||
| "(Advanced) Upload entire CIB with --commit, without triggering a " | ||
| "controller refresh", NULL }, | ||
|
|
||
| { NULL } | ||
| }; | ||
|
|
||
|
|
||
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.
We need the commit message to reference RHEL-70283, and to explain why we're doing this (since future contributors may not be able to access this RHEL Jira issue).
We've encountered numerous issues when commit messages don't explain the reasoning for the changes in the commit. We often end up, much later, removing or changing behavior that we depend on. At best, we spend a long time trying to figure out why things are the way they are, and we're often not confident in the conclusions we reach.
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.
As it doesn't fix the issue right away I can add that being able to alter the status section is a pre-requisite for RHEL-70283 and that this commit gives us back this possibility.
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.
Of course I would have loved to get some pcs feedback regarding the approach.
Which is why I put it here for now as something generically useful. But the reference to what triggered the implementation is probably still a good idea.
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.
Added a bit of data that should help understand why the feature was added including a reference to the Jira Issue.