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

Fixes #11631: Implement disable-flag for policy server policy copy for nodes #1248

Conversation

peckpeck
Copy link
Member

@peckpeck peckpeck commented Feb 9, 2018

@peckpeck
Copy link
Member Author

peckpeck commented Feb 9, 2018

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}"
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

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

Missing ;

@peckpeck
Copy link
Member Author

Commit modified

@peckpeck peckpeck force-pushed the ust_11631/implement_disable_flag_for_policy_server_policy_copy_for_nodes branch from 944bc4c to 662b580 Compare February 13, 2018 14:54
@@ -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>
Copy link
Member

Choose a reason for hiding this comment

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

why negative booleans?

@peckpeck
Copy link
Member Author

Commit modified

@peckpeck peckpeck force-pushed the ust_11631/implement_disable_flag_for_policy_server_policy_copy_for_nodes branch from 662b580 to f9f5158 Compare February 15, 2018 10:08
"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)";
Copy link
Member

Choose a reason for hiding this comment

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

why sync_promises here?

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member

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?

Copy link
Member

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)

Copy link
Member Author

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");

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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

Copy link
Member

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 ?

Copy link
Member Author

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 ?

Copy link
Member

Choose a reason for hiding this comment

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

Of course we can !

@amousset
Copy link
Member

Replaced by #1256

@amousset amousset closed this Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants