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

ADReplicationSiteLink: Support enable change notification replication #504

Closed
1800Zeta opened this issue Sep 17, 2019 · 7 comments · Fixed by #509
Closed

ADReplicationSiteLink: Support enable change notification replication #504

1800Zeta opened this issue Sep 17, 2019 · 7 comments · Fixed by #509
Labels
enhancement The issue is an enhancement request.

Comments

@1800Zeta
Copy link
Contributor

1800Zeta commented Sep 17, 2019

It would be good for the ADReplicationSiteLink resource to be able to enable the change notification replication.

Done in PowerShell by setting the options attribute:

Set-ADReplicationSiteLink "Europe-Asia" -Replace @{'options'=1}

Suggest having a boolean option for EnableChangeNotification. If true, options = 1, if false, options not set. Default value $false.

I am happy to look at this in the near future as I am looking to use this

@johlju johlju added enhancement The issue is an enhancement request. help wanted The issue is up for grabs for anyone in the community. labels Sep 17, 2019
@johlju
Copy link
Member

johlju commented Sep 17, 2019

I found this, so maybe we can't assume we can always set it to 1. See another link in the site in the provided link to be inspired how this might be solved. 🤔

a. If the Value(s) box shows , type 1
b. If the Value(s) box contains a value, you must derive the new value by using a Boolean BITWISE-OR calculation on the old value, as follows: old_value BITWISE-OR 1. For example, if the value in the Value(s) box is 2, calculate 0010 OR 0001 to equal 0011. Type the integer value of the result in the Edit Attribute box; for this example, the value is 3.
https://blogs.technet.microsoft.com/qzaidi/2010/09/23/enable-change-notifications-between-sites-how-and-why/

Please note that my knowledge in this are is lacking, so I don't know if this is still true today. 😃

@1800Zeta
Copy link
Contributor Author

Yeah I've not found any other value option set here through google (not studied all results).

There is the following script:
https://gallery.technet.microsoft.com/scriptcenter/61cb88bb-8c61-477f-834e-79ed0c153669
which runs

set-adobject –replace @{options=$($_.options –bor 1)} 

which might be a better option. I believe the other common value can be 5 which does no compression but notifiy.

I pulled the value 1 from the command Set-ADReplicationSiteLink documenation

I will try and get a list of available options so we can work out what's what exactly

@1800Zeta
Copy link
Contributor Author

OK, potential values are as follows:

0 Nothing enabled
1 USE_NOTIFY
2 TWOWAY_SYNC
3 USE_NOTIFY|TWOWAY_SYNC
4 DISABLE_COMPRESSION
5 USE_NOTIFY|DISABLE_COMPRESSION
6 TWOWAY_SYNC|DISABLE_COMPRESSION
7 USE_NOTIFY|TWOWAY_SYNC|DISABLE_COMPRESSION

Because of how the options are calculated (Bitwise), I will make it so that you can enable/disable all the above. I will rename the task to be 'ADReplicationSiteLink: Support setting options attribute'

There will be 3 parameters, OptionChangeNotification, OptionTwoWaySync and OptionDisableCompression. All 3 optional boolean values. Have done a function to convert the existing value to work out which are enabled. Will do a function to calculate the value that should be set

@johlju
Copy link
Member

johlju commented Sep 19, 2019

So great! Thanks for working on this! Great addition to the resource!

@1800Zeta
Copy link
Contributor Author

OK, got this all working, complete with Integration tests. Because of how I've done this, until the PR for Description on Sites is closed, I am unable to create a PR for this and the description of subnets (inc Integration tests) Once that's closed, I should be able to submit the two PR's as they are in separate branches (my bad for doing it wrong to begin with :))

@johlju
Copy link
Member

johlju commented Sep 20, 2019

I will have a look at the PR this tonight or this weekend. I was waiting for the new release to be complete yesterday.

@1800Zeta
Copy link
Contributor Author

Thank you @johlju

will have a look through and see if there is anything else I can pick off in the meantime

@johlju johlju added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Oct 9, 2019
johlju pushed a commit that referenced this issue Oct 15, 2019
…509)

- Changes to ADReplicationSiteLink
  - Added Integration testing (issue #356).
  - Added ability to set 'Options' such as Change Notification Replication (issue #504).
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants