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

Document service restart #338

Closed
wants to merge 3 commits 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/modules/airflow/pages/usage-guide/operations/restart.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
= Service Restarts

== Manual Restarts

Sometimes it is necessary to restart services deployed in Kubernetes. A service restart should induce as little disruption as possible, ideally none.

Kubernetes offers rollout mechanism for this purpose. You can use `kubectl rollout restart statefulset` to restart the Airflow `scheduler`, `webserver` or `worker` Pods.

For example, given the following stateful sets deployed for an Airflow cluster:

[source,shell]
----
❯ kubectl get sts
NAME READY AGE
airflow-scheduler-default 1/1 61m

Check notice on line 15 in docs/modules/airflow/pages/usage-guide/operations/restart.adoc

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] docs/modules/airflow/pages/usage-guide/operations/restart.adoc#L15

Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1]) Suggestions: `61 m` Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1 Category: PUNCTUATION
Raw output
docs/modules/airflow/pages/usage-guide/operations/restart.adoc:15:34: Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1])
 Suggestions: `61 m`
 Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1
 Category: PUNCTUATION
airflow-webserver-default 1/1 61m

Check notice on line 16 in docs/modules/airflow/pages/usage-guide/operations/restart.adoc

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] docs/modules/airflow/pages/usage-guide/operations/restart.adoc#L16

Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1]) Suggestions: `61 m` Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1 Category: PUNCTUATION
Raw output
docs/modules/airflow/pages/usage-guide/operations/restart.adoc:16:34: Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1])
 Suggestions: `61 m`
 Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1
 Category: PUNCTUATION
airflow-worker-default 2/2 61m

Check notice on line 17 in docs/modules/airflow/pages/usage-guide/operations/restart.adoc

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] docs/modules/airflow/pages/usage-guide/operations/restart.adoc#L17

Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1]) Suggestions: `61 m` Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1 Category: PUNCTUATION
Raw output
docs/modules/airflow/pages/usage-guide/operations/restart.adoc:17:34: Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1])
 Suggestions: `61 m`
 Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1
 Category: PUNCTUATION
postgresql-airflow 1/1 64m

Check notice on line 18 in docs/modules/airflow/pages/usage-guide/operations/restart.adoc

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] docs/modules/airflow/pages/usage-guide/operations/restart.adoc#L18

Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1]) Suggestions: `64 m` Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1 Category: PUNCTUATION
Raw output
docs/modules/airflow/pages/usage-guide/operations/restart.adoc:18:34: Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1])
 Suggestions: `64 m`
 Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1
 Category: PUNCTUATION
redis-airflow-master 1/1 64m

Check notice on line 19 in docs/modules/airflow/pages/usage-guide/operations/restart.adoc

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] docs/modules/airflow/pages/usage-guide/operations/restart.adoc#L19

Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1]) Suggestions: `64 m` Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1 Category: PUNCTUATION
Raw output
docs/modules/airflow/pages/usage-guide/operations/restart.adoc:19:34: Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1])
 Suggestions: `64 m`
 Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1
 Category: PUNCTUATION
redis-airflow-replicas 1/1 64m

Check notice on line 20 in docs/modules/airflow/pages/usage-guide/operations/restart.adoc

View workflow job for this annotation

GitHub Actions / LanguageTool

[LanguageTool] docs/modules/airflow/pages/usage-guide/operations/restart.adoc#L20

Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1]) Suggestions: `64 m` Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1 Category: PUNCTUATION
Raw output
docs/modules/airflow/pages/usage-guide/operations/restart.adoc:20:34: Insert a space between the numerical value and the unit symbol. (UNIT_SPACE[1])
 Suggestions: `64 m`
 Rule: https://community.languagetool.org/rule/show/UNIT_SPACE?lang=en-US&subId=1
 Category: PUNCTUATION
----

To restart the Airflow scheduler, run:

[source,shell]
----
❯ kubectl rollout restart statefulset airflow-scheduler-default
statefulset.apps/airflow-scheduler-default restarted
----

NOTE: When using Airflow's https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/executor/kubernetes.html[Kubernetes executor], `worker` Pods are created dynamically by DAGs when needed, this in general it's not necessary to restart them.

== Automatic Restarts

The Commons Operator of the Stackable Platform might restart Pods automatically, for example to ensure that security certificates are up-to-date. For details, see the xref:commons:index.adoc[Commons Operator documentation].
1 change: 1 addition & 0 deletions docs/modules/airflow/partials/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@
*** xref:airflow:usage-guide/operations/pod-placement.adoc[]
*** xref:airflow:usage-guide/operations/pod-disruptions.adoc[]
*** xref:airflow:usage-guide/operations/graceful-shutdown.adoc[]
*** xref:airflow:usage-guide/operations/restart.adoc[]