|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/multiple_networks/configuring-additional-network.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | + |
| 7 | +[id="nw-multus-configuring-whereabouts-ip-reconciler-schedule_{context}"] |
| 8 | += Configuring the Whereabouts IP reconciler schedule |
| 9 | + |
| 10 | +The Whereabouts IPAM CNI plugin runs the IP reconciler daily. This process cleans up any stranded IP allocations that might result in exhausting IPs and therefore prevent new pods from getting an IP allocated to them. |
| 11 | + |
| 12 | +Use this procedure to change the frequency at which the IP reconciler runs. |
| 13 | + |
| 14 | +.Prerequisites |
| 15 | +* You installed the OpenShift CLI (`oc`). |
| 16 | +* You have access to the cluster as a user with the `cluster-admin` role. |
| 17 | +* You have deployed the `whereabouts-reconciler` daemon set, and the `whereabouts-reconciler` pods are up and running. |
| 18 | + |
| 19 | +.Procedure |
| 20 | + |
| 21 | +. 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: |
| 22 | ++ |
| 23 | +[source,terminal] |
| 24 | +---- |
| 25 | +$ oc create configmap whereabouts-config -n openshift-multus --from-literal=reconciler_cron_expression="*/15 * * * *" |
| 26 | +---- |
| 27 | ++ |
| 28 | +This cron expression indicates the IP reconciler runs every 15 minutes. Adjust the expression based on your specific requirements. |
| 29 | ++ |
| 30 | +[NOTE] |
| 31 | +==== |
| 32 | +The `whereabouts-reconciler` daemon set can only consume a cron expression pattern that includes five asterisks. The sixth, which is used to denote seconds, is currently not supported. |
| 33 | +==== |
| 34 | + |
| 35 | +. Retrieve information about resources related to the `whereabouts-reconciler` daemon set and pods within the `openshift-multus` namespace by running the following command: |
| 36 | ++ |
| 37 | +[source,terminal] |
| 38 | +---- |
| 39 | +$ oc get all -n openshift-multus | grep whereabouts-reconciler |
| 40 | +---- |
| 41 | ++ |
| 42 | +.Example output |
| 43 | ++ |
| 44 | +[source,terminal] |
| 45 | +---- |
| 46 | +pod/whereabouts-reconciler-2p7hw 1/1 Running 0 4m14s |
| 47 | +pod/whereabouts-reconciler-76jk7 1/1 Running 0 4m14s |
| 48 | +pod/whereabouts-reconciler-94zw6 1/1 Running 0 4m14s |
| 49 | +pod/whereabouts-reconciler-mfh68 1/1 Running 0 4m14s |
| 50 | +pod/whereabouts-reconciler-pgshz 1/1 Running 0 4m14s |
| 51 | +pod/whereabouts-reconciler-xn5xz 1/1 Running 0 4m14s |
| 52 | +daemonset.apps/whereabouts-reconciler 6 6 6 6 6 kubernetes.io/os=linux 4m16s |
| 53 | +---- |
| 54 | + |
| 55 | +. Run the following command to verify that the `whereabouts-reconciler` pod runs the IP reconciler with the configured interval: |
| 56 | ++ |
| 57 | +[source,terminal] |
| 58 | +---- |
| 59 | +$ oc -n openshift-multus logs whereabouts-reconciler-2p7hw |
| 60 | +---- |
| 61 | ++ |
| 62 | +.Example output |
| 63 | + |
| 64 | +[source,terminal] |
| 65 | +---- |
| 66 | +2024-02-02T16:33:54Z [debug] event not relevant: "/cron-schedule/..2024_02_02_16_33_54.1375928161": CREATE |
| 67 | +2024-02-02T16:33:54Z [debug] event not relevant: "/cron-schedule/..2024_02_02_16_33_54.1375928161": CHMOD |
| 68 | +2024-02-02T16:33:54Z [debug] event not relevant: "/cron-schedule/..data_tmp": RENAME |
| 69 | +2024-02-02T16:33:54Z [verbose] using expression: */15 * * * * |
| 70 | +2024-02-02T16:33:54Z [verbose] configuration updated to file "/cron-schedule/..data". New cron expression: */15 * * * * |
| 71 | +2024-02-02T16:33:54Z [verbose] successfully updated CRON configuration id "00c2d1c9-631d-403f-bb86-73ad104a6817" - new cron expression: */15 * * * * |
| 72 | +2024-02-02T16:33:54Z [debug] event not relevant: "/cron-schedule/config": CREATE |
| 73 | +2024-02-02T16:33:54Z [debug] event not relevant: "/cron-schedule/..2024_02_02_16_26_17.3874177937": REMOVE |
| 74 | +2024-02-02T16:45:00Z [verbose] starting reconciler run |
| 75 | +2024-02-02T16:45:00Z [debug] NewReconcileLooper - inferred connection data |
| 76 | +2024-02-02T16:45:00Z [debug] listing IP pools |
| 77 | +2024-02-02T16:45:00Z [debug] no IP addresses to cleanup |
| 78 | +2024-02-02T16:45:00Z [verbose] reconciler success |
| 79 | +---- |
0 commit comments