1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/nw-multus-configuring-whereabouts-ip-reconciler-schedule.adoc

73 lines
3.5 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/multiple_networks/secondary_networks/configuring-ip-secondary-nwt.adoc
:_mod-docs-content-type: PROCEDURE
[id="nw-multus-configuring-whereabouts-ip-reconciler-schedule_{context}"]
= Configuring the Whereabouts IP reconciler schedule
[role="_abstract"]
The Whereabouts IPAM CNI plugin runs the IP address reconciler daily. This process cleans up any stranded IP address allocations that might result in exhausting IP addresses and therefore prevent new pods from getting a stranded IP address allocated to them.
Use this procedure to change the frequency at which the IP reconciler runs.
.Prerequisites
* You installed the {oc-first}.
* You have access to the cluster as a user with the `cluster-admin` role.
* You have deployed the `whereabouts-reconciler` daemon set, and the `whereabouts-reconciler` pods are up and running.
.Procedure
. Run the following command to create a `ConfigMap` object named `whereabouts-config` in the `openshift-multus` namespace with a specific cron expression for the IP reconciler:
+
[source,terminal]
----
$ oc create configmap whereabouts-config -n openshift-multus --from-literal=reconciler_cron_expression="*/15 * * * *"
----
+
This cron expression indicates the IP reconciler runs every 15 minutes. Adjust the expression based on your specific requirements.
+
[NOTE]
====
The `whereabouts-reconciler` daemon set can only consume a cron expression pattern that includes five asterisks. Red{nbsp} Hat does not support the sixth asterisk, which is used to denote seconds.
====
. Retrieve information about resources related to the `whereabouts-reconciler` daemon set and pods within the `openshift-multus` namespace by running the following command:
+
[source,terminal]
----
$ oc get all -n openshift-multus | grep whereabouts-reconciler
----
+
[source,terminal]
----
pod/whereabouts-reconciler-2p7hw 1/1 Running 0 4m14s
pod/whereabouts-reconciler-76jk7 1/1 Running 0 4m14s
daemonset.apps/whereabouts-reconciler 6 6 6 6 6 kubernetes.io/os=linux 4m16s
----
. Run the following command to verify that the `whereabouts-reconciler` pod runs the IP reconciler with the configured interval:
+
[source,terminal]
----
$ oc -n openshift-multus logs whereabouts-reconciler-2p7hw
----
+
[source,terminal]
----
2024-02-02T16:33:54Z [debug] event not relevant: "/cron-schedule/..2024_02_02_16_33_54.1375928161": CREATE
2024-02-02T16:33:54Z [debug] event not relevant: "/cron-schedule/..2024_02_02_16_33_54.1375928161": CHMOD
2024-02-02T16:33:54Z [debug] event not relevant: "/cron-schedule/..data_tmp": RENAME
2024-02-02T16:33:54Z [verbose] using expression: */15 * * * *
2024-02-02T16:33:54Z [verbose] configuration updated to file "/cron-schedule/..data". New cron expression: */15 * * * *
2024-02-02T16:33:54Z [verbose] successfully updated CRON configuration id "00c2d1c9-631d-403f-bb86-73ad104a6817" - new cron expression: */15 * * * *
2024-02-02T16:33:54Z [debug] event not relevant: "/cron-schedule/config": CREATE
2024-02-02T16:33:54Z [debug] event not relevant: "/cron-schedule/..2024_02_02_16_26_17.3874177937": REMOVE
2024-02-02T16:45:00Z [verbose] starting reconciler run
2024-02-02T16:45:00Z [debug] NewReconcileLooper - inferred connection data
2024-02-02T16:45:00Z [debug] listing IP pools
2024-02-02T16:45:00Z [debug] no IP addresses to cleanup
2024-02-02T16:45:00Z [verbose] reconciler success
----