pause action uses --delete-local-data which is deprecated

Bug #1910797 reported by Drew Freiberger
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Kubernetes Worker Charm
Triaged
Low
Unassigned

Bug Description

When performing a kubernetes node drain via the pause action, pods with emptydirs halt the drain process.

Please add an option to pass the --delete-emptydir-data flag to kubectl drain.

Revision history for this message
George Kraft (cynerva) wrote :

You can run the pause action with delete-local-data=true and it should cover your use case:

juju run-action kubernetes-worker/0 pause delete-local-data=true

This will call `kubectl drain` with --delete-local-data, which is equivalent to --delete-emptydir-data. They changed the name of the flag in Kubernetes 1.20, but the old flag still works. The action completes, but shows a warning:

unit-kubernetes-worker-0:
  UnitId: kubernetes-worker/0
  id: "2"
  results:
    Stderr: |
      Flag --delete-local-data has been deprecated, This option is deprecated and will be deleted. Use --delete-emptydir-data.
      WARNING: ignoring DaemonSet-managed Pods: ingress-nginx-kubernetes-worker/nginx-ingress-controller-kubernetes-worker-f5kz5
  status: completed
  timing:
    completed: 2021-01-08 19:10:32 +0000 UTC
    enqueued: 2021-01-08 19:09:26 +0000 UTC
    started: 2021-01-08 19:09:31 +0000 UTC

We'll need to update the action to handle this deprecation.

summary: - Add delete-emptydir-data option to pause action
+ pause action uses --delete-local-data which is deprecated
George Kraft (cynerva)
Changed in charm-kubernetes-worker:
importance: Undecided → Low
status: New → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.