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

[GRM] Do not yield --help output on error #4807

Closed
ialidzhikov opened this issue Aug 30, 2021 · 5 comments · Fixed by #5307
Closed

[GRM] Do not yield --help output on error #4807

ialidzhikov opened this issue Aug 30, 2021 · 5 comments · Fixed by #5307
Assignees
Labels
area/ops-productivity Operator productivity related (how to improve operations) kind/enhancement Enhancement, improvement, extension priority/3 Priority (lower number equals higher priority)

Comments

@ialidzhikov
Copy link
Member

How to categorize this issue?
/area ops-productivity
/kind enhancement
/priority 3

What would you like to be added:

$ k -n garden logs gardener-resource-manager-57fd658c9-8lfkw -p

E0830 09:42:04.221217       1 leaderelection.go:325] error retrieving resource lock garden/gardener-resource-manager: context deadline exceeded
I0830 09:42:04.221260       1 leaderelection.go:278] failed to renew lease garden/gardener-resource-manager: timed out waiting for the condition
Error: error running manager: leader election lost
{"level":"info","ts":"2021-08-30T09:42:04.221Z","logger":"controller-runtime.manager.controller.resource-controller","msg":"Shutdown signal received, waiting for all workers to finish"}
{"level":"info","ts":"2021-08-30T09:42:04.221Z","logger":"controller-runtime.manager.controller.health-controller","msg":"Shutdown signal received, waiting for all workers to finish"}
{"level":"info","ts":"2021-08-30T09:42:04.221Z","logger":"controller-runtime.manager.controller.secret-controller","msg":"Shutdown signal received, waiting for all workers to finish"}
{"level":"info","ts":"2021-08-30T09:42:04.221Z","logger":"controller-runtime.manager.controller.garbage_collector","msg":"Shutdown signal received, waiting for all workers to finish"}
{"level":"info","ts":"2021-08-30T09:42:04.221Z","logger":"controller-runtime.manager.controller.resource-controller","msg":"All workers finished"}
{"level":"info","ts":"2021-08-30T09:42:04.221Z","logger":"controller-runtime.manager.controller.health-controller","msg":"All workers finished"}
{"level":"info","ts":"2021-08-30T09:42:04.221Z","logger":"controller-runtime.manager.controller.garbage_collector","msg":"All workers finished"}
{"level":"info","ts":"2021-08-30T09:42:04.221Z","logger":"controller-runtime.manager.controller.secret-controller","msg":"All workers finished"}
Usage:
  gardener-resource-manager [flags]

Flags:
      --always-update                             if set to false then a resource will only be updated if its desired state differs from the actual state. otherwise, an update request will be always sent.
      --cache-resync-period duration              duration how often the controller's cache is resynced (default 24h0m0s)
      --cluster-id string                         optional cluster id for source cluster
      --garbage-collector-sync-period duration    duration how often the garbage collection should be performed (default: 0, i.e., gc is disabled)
      --health-bind-address string                bind address for the health server (default ":8081")
      --health-max-concurrent-workers int         number of worker threads for concurrent health reconciliation of resources (default 10)
      --health-sync-period duration               duration how often the health of existing resources should be synced (default 1m0s)
  -h, --help                                      help for gardener-resource-manager
      --kubeconfig string                         path to the kubeconfig for the source cluster
      --leader-election                           enable or disable leader election (default true)
      --leader-election-lease-duration duration   lease duration for leader election (default 15s)
      --leader-election-namespace string          namespace for leader election
      --leader-election-renew-deadline duration   renew deadline for leader election (default 10s)
      --leader-election-resource-lock string      Which resource type to use for leader election. Supported options are 'endpoints', 'configmaps', 'leases', 'endpointsleases' and 'configmapsleases'. (default "leases")
      --leader-election-retry-period duration     retry period for leader election (default 2s)
      --max-concurrent-workers int                number of worker threads for concurrent reconciliation of resources (default 10)
      --metrics-bind-address string               bind address for the metrics server (default ":8080")
      --namespace string                          namespace in which the ManagedResources should be observed (defaults to all namespaces)
      --resource-class string                     resource class used to filter resource resources (default "resources")
      --secret-max-concurrent-workers int         number of worker threads for concurrent secret reconciliation of resources (default 5)
      --sync-period duration                      duration how often existing resources should be synced (default 1m0s)
      --target-cache-resync-period duration       duration how often the controller's cache for the target cluster is resynced (default 24h0m0s)
      --target-disable-cache                      disable the cache for target cluster and always talk directly to the API server (defaults to false)
      --target-kubeconfig string                  path to the kubeconfig for the target cluster
      --version version[=true]                    Print version information and quit
@ialidzhikov ialidzhikov changed the title Do not yield --help output Do not yield --help output on error Aug 30, 2021
@timebertt
Copy link
Member

@rfranzke rfranzke changed the title Do not yield --help output on error [GRM] Do not yield --help output on error Oct 8, 2021
@rfranzke rfranzke transferred this issue from gardener-attic/gardener-resource-manager Oct 8, 2021
@gardener-robot gardener-robot added area/ops-productivity Operator productivity related (how to improve operations) kind/enhancement Enhancement, improvement, extension priority/3 Priority (lower number equals higher priority) labels Oct 8, 2021
@acumino
Copy link
Member

acumino commented Jan 21, 2022

Similar change is required in -

gardenelet
gardener-scheduler
gardener-apiserver
gardener-controller-manager
gardener-resource-manager

Will all these be refactored like GSAC in #3459, then required changes can be made in that PR only and we can close this issue?
@rfranzke @timebertt

@rfranzke
Copy link
Member

@acumino
Copy link
Member

acumino commented Jan 21, 2022

Thanks, I will make the required changes.

@acumino
Copy link
Member

acumino commented Jan 21, 2022

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ops-productivity Operator productivity related (how to improve operations) kind/enhancement Enhancement, improvement, extension priority/3 Priority (lower number equals higher priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants