-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fixes #11631: Implement disable-flag for policy server policy copy for nodes #1248
Conversation
maybe wait for https://www.rudder-project.org/redmine/issues/12106 to be implemented before merging. |
|
||
commands: | ||
policy_server.!root_server.rsync_promises:: | ||
"/usr/bin/rsync -a --delete ${server_info.cfserved}:${server_data}/ ${client_data}" |
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.
maybe we could add the options --checksum --compress --sparse
any:: | ||
"pass3" expression => "pass2"; | ||
"pass2" expression => "pass1"; | ||
"pass1" expression => "any"; | ||
"pass1" expression => "any |
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.
Missing ;
Commit modified |
944bc4c
to
662b580
Compare
@@ -69,6 +69,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
<NAME>SUB_NODES_ID</NAME> | |||
<NAME>SUB_NODES_KEYHASH</NAME> | |||
<NAME>SUB_NODES_SERVER</NAME> | |||
<NAME>RELAY_SYNC_METHOD</NAME> | |||
<NAME>NO_SYNC_PROMISES</NAME> |
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.
why negative booleans?
Commit modified |
662b580
to
f9f5158
Compare
"sync_promises" expression => strcmp("&RELAY_SYNC_PROMISES&", "true"); | ||
"sync_sharedfiles" expression => strcmp("&RELAY_SYNC_SHAREDFILES&", "true"); | ||
|
||
"disable_classic_promises" expression => "sync_promises.(sync_method_rsync|sync_method_disable)"; |
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.
why sync_promises here?
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 disable classic synchronization of promises when other synchronization method of the promises directory is asked for.
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.
i'm not sure I understand - it should be disabled if sync_method_disable or sync_method_rsync; whatever the rest is
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.
Yes but if RELAY_SYNC_PROMISES is false and sync is disabled, we want to disable classic promises too?
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.
RELAY_SYNC_PROMISES can only be set in rsync mode, so we should ignore it in classic mode (at least, that's what the spec said)
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.
yes we should ignore it in classic mode, so if it set and in classic mode we don't disable it (just in case)
"any" usebundle => rudder_common_report("DistributePolicy", "result_success", "&TRACKINGKEY&", "Propagate promises", "None", "All files have been propagated"); | ||
|
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 should report result_na if we disabled synchronisation, or if it's rsync and no folder is selected
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 disable only small parts of propagation, and there is only one message for everything, so we cannot send na.
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 disable policies & shared files, leaving only tools and ncf - i guess it's more important to advertise that we are not synchronizing the relevant part
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.
why not have 2 or 3 components ? One for policies, one for shared files, and one for eveything else ?
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.
that would be better, can we do that in 4.1 ?
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 we can !
Replaced by #1256 |
https://www.rudder-project.org/redmine/issues/11631