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

[Backport][ipa-4-7] Handle NTP configuration in a replica server installation #2467

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion install/tools/man/ipa-replica-install.1
Expand Up @@ -14,7 +14,7 @@ Domain level 0 is not supported anymore.

To create a replica, the machine only needs to be enrolled in the FreeIPA domain first. This process of turning the IPA client into a replica is also referred to as replica promotion.

If you're starting with an existing IPA client, simply run ipa\-replica\-install to have it promoted into a replica.
If you're starting with an existing IPA client, simply run ipa\-replica\-install to have it promoted into a replica. The NTP configuration cannot be updated during client promotion.

To promote a blank machine into a replica, you have two options, you can either run ipa\-client\-install in a separate step, or pass the enrollment related options to the ipa\-replica\-install (see CLIENT ENROLLMENT OPTIONS). In the latter case, ipa\-replica\-install will join the machine to the IPA realm automatically and will proceed with the promotion step.

Expand Down
10 changes: 10 additions & 0 deletions ipaserver/install/server/replicainstall.py
Expand Up @@ -717,6 +717,11 @@ def ensure_enrolled(installer):
for ip in installer.ip_addresses:
# installer.ip_addresses is of type [CheckedIPAddress]
args.extend(("--ip-address", str(ip)))
if installer.ntp_servers:
for server in installer.ntp_servers:
args.extend(("--ntp-server", server))
if installer.ntp_pool:
args.extend(("--ntp-pool", installer.ntp_pool))

try:
# Call client install script
Expand Down Expand Up @@ -774,6 +779,11 @@ def promote_check(installer):
"the --domain, --server, --realm, --hostname, --password "
"and --keytab options.")

# The NTP configuration can not be touched on pre-installed client:
if options.no_ntp or options.ntp_servers or options.ntp_pool:
raise ScriptError(
"NTP configuration cannot be updated during promotion")

sstore = sysrestore.StateFile(paths.SYSRESTORE)

fstore = sysrestore.FileStore(paths.SYSRESTORE)
Expand Down