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

[BUG]Error: unknown flag: --etcd-snapshot-timeout #707

Closed
Fish-pro opened this issue Jan 25, 2024 · 5 comments
Closed

[BUG]Error: unknown flag: --etcd-snapshot-timeout #707

Fish-pro opened this issue Jan 25, 2024 · 5 comments
Labels
kind/bug Bug status/closed Issue is closed (either delivered or triaged)

Comments

@Fish-pro
Copy link

Describe the bug:
A clear and concise description of what the bug is.

Containers cannot be started using files under package charts for installation

➜  etcd-backup-restore git:(master) helm install bak .
NAME: bak
LAST DEPLOYED: Thu Jan 25 13:37:32 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
➜  etcd-backup-restore git:(master) kubectl get po
NAME         READY   STATUS             RESTARTS      AGE
bak-etcd-0   0/2     CrashLoopBackOff   4 (73s ago)   2m43s

Expected behavior:
A clear and concise description of what you expected to happen.

Normal container startup

How To Reproduce (as minimally and precisely as possible):

Logs:

➜  etcd-backup-restore git:(master) k logs -f bak-etcd-0 -c backup-restore
Error: unknown flag: --etcd-snapshot-timeout
Usage:
  etcdbrctl server [flags]

Flags:
      --auto-compaction-mode string               mode for auto-compaction: 'periodic' for duration based retention. 'revision' for revision number based retention. (default "periodic")
      --auto-compaction-retention string          Auto-compaction retention length. (default "30m")
      --cacert string                             verify certificates of TLS-enabled secure servers using this CA bundle
      --cert string                               identify secure client using this TLS certificate file
      --compress-snapshots                        whether to compress the snapshots or not
      --compression-policy string                 Policy for compressing the snapshots (default "gzip")
      --config-file string                        path to the configuration file
  -d, --data-dir string                           path to the data directory (default "default.etcd")
      --defragmentation-schedule string           schedule to defragment etcd data directory (default "0 0 */3 * *")
      --delta-snapshot-memory-limit uint          memory limit after which delta snapshots will be taken (default 10485760)
      --delta-snapshot-period duration            Period after which delta snapshot will be persisted. If this value is set to be lesser than 1, delta snapshotting will be disabled. (default 20s)
      --embedded-etcd-quota-bytes int             maximum backend quota for the embedded etcd used for applying delta snapshots (default 8589934592)
      --enable-profiling                          enable profiling
  -e, --endpoints strings                         comma separated list of etcd endpoints (default [127.0.0.1:2379])
unknown flag: --etcd-snapshot-timeout
      --etcd-connection-timeout duration          etcd client connection timeout (default 30s)
      --etcd-password string                      etcd server password, if one is required
      --etcd-username string                      etcd server username, if one is required
      --garbage-collection-period duration        Period for garbage collecting old backups (default 1m0s)
      --garbage-collection-policy string          Policy for garbage collecting old backups (default "Exponential")
  -h, --help                                      help for server
      --initial-advertise-peer-urls stringArray   list of this member's peer URLs to advertise to the rest of the cluster (default [http://localhost:2380])
      --initial-cluster string                    initial cluster configuration for restore bootstrap (default "default=http://localhost:2380")
      --initial-cluster-token string              initial cluster token for the etcd cluster during restore bootstrap (default "etcd-cluster")
      --insecure-skip-tls-verify                  skip server certificate verification (default true)
      --insecure-transport                        disable transport security for client connections (default true)
      --key string                                identify secure client using this TLS key file
      --log-level uint32                          verbosity level of logs (default 4)
  -m, --max-backups uint                          maximum number of previous backups to keep (default 7)
      --max-call-send-message-size int            maximum size of message that the client sends (default 10485760)
      --max-fetchers uint                         maximum number of threads that will fetch delta snapshots in parallel (default 6)
      --max-parallel-chunk-uploads uint           maximum number of parallel chunk uploads allowed  (default 5)
      --max-request-bytes uint                    Maximum client request size in bytes the server will accept (default 10485760)
      --max-txn-ops uint                          Maximum number of operations permitted in a transaction (default 10240)
      --name string                               human-readable name for this member (default "default")
  -s, --schedule string                           schedule for snapshots (default "0 */1 * * *")
      --server-cert string                        TLS certificate file for backup-restore server
      --server-key string                         TLS key file for backup-restore server
  -p, --server-port uint                          port on which server should listen (default 8080)
      --skip-hash-check                           ignore snapshot integrity hash value (required if copied from data directory)
      --snapstore-temp-directory string           temporary directory for processing (default "/tmp")
      --storage-provider string                   snapshot storage provider
      --store-container string                    container which will be used as snapstore
      --store-prefix string                       prefix or directory inside container under which snapstore is created

Screenshots (if applicable):

Environment (please complete the following information):

  • Etcd version/commit ID :
  • Etcd-backup-restore version/commit ID:
  • Cloud Provider [All/AWS/GCS/ABS/Swift/OSS]:

Anything else we need to know?:

After trying to locate it, I found that the command line in the image is not the latest client, so we should update the next image

➜  etcd-backup-restore git:(master) go run main.go server -h
Server will keep listening for http request to deliver its functionality through http endpoints.

Usage:
  etcdbrctl server [flags]

Flags:
      --auto-compaction-mode string                        mode for auto-compaction: 'periodic' for duration based retention. 'revision' for revision number based retention. (default "periodic")
      --auto-compaction-retention string                   Auto-compaction retention length. (default "30m")
      --backoff-attempt-limit uint                         threshold no. of attempt limit (default 6)
      --backoff-multiplier uint                            multiplicative factor for backoff mechanism (default 2)
      --backoff-threshold-time duration                    upper bound backoff time (default 2m8s)
      --cacert string                                      verify certificates of TLS-enabled secure servers using this CA bundle
      --cert string                                        identify secure client using this TLS certificate file
      --compress-snapshots                                 whether to compress the snapshots or not
      --compression-policy string                          Policy for compressing the snapshots (default "gzip")
      --config-file string                                 path to the configuration file
  -d, --data-dir string                                    path to the data directory (default "default.etcd")
      --defragmentation-schedule string                    schedule to defragment etcd data directory (default "0 0 */3 * *")
      --delta-snapshot-lease-name string                   delta snapshot lease name (default "delta-snapshot-revisions")
      --delta-snapshot-memory-limit uint                   memory limit after which delta snapshots will be taken (default 10485760)
      --delta-snapshot-period duration                     Period after which delta snapshot will be persisted. If this value is set to be lesser than 1, delta snapshotting will be disabled. (default 20s)
      --delta-snapshot-retention-period duration           Defines the retention period for older delta snapshots, excluding the latest snapshot set which is always retained for data safety.
      --embedded-etcd-quota-bytes int                      maximum backend quota for the embedded etcd used for applying delta snapshots (default 8589934592)
      --enable-etcd-member-gc                              Allows leading sidecar to remove any superfluous etcd members from the cluster
      --enable-member-lease-renewal                        Allows sidecar to periodically renew the member leases
      --enable-profiling                                   enable profiling
      --enable-snapshot-lease-renewal                      Allows sidecar to renew the snapshot leases when snapshots are taken
  -e, --endpoints strings                                  comma separated list of etcd endpoints (default [127.0.0.1:2379])
      --etcd-connection-timeout duration                   etcd client connection timeout (default 30s)
      --etcd-connection-timeout-leader-election duration   timeout duration of etcd client connection during leader election (default 5s)
      --etcd-defrag-timeout duration                       timeout duration for etcd defrag call (default 8m0s)
      --etcd-password string                               etcd server password, if one is required
      --etcd-snapshot-timeout duration                     timeout duration for taking etcd snapshots (default 15m0s)
      --etcd-username string                               etcd server username, if one is required
      --full-snapshot-lease-name string                    full snapshot lease name (default "full-snapshot-revisions")
      --garbage-collection-period duration                 Period for garbage collecting old backups (default 1m0s)
      --garbage-collection-policy string                   Policy for garbage collecting old backups (default "Exponential")
  -h, --help                                               help for server
      --initial-advertise-peer-urls stringArray            list of this member's peer URLs to advertise to the rest of the cluster (default [http://localhost:2380])
      --initial-cluster string                             initial cluster configuration for restore bootstrap (default "default=http://localhost:2380")
      --initial-cluster-token string                       initial cluster token for the etcd cluster during restore bootstrap (default "etcd-cluster")
      --insecure-skip-tls-verify                           skip server certificate verification (default true)
      --insecure-transport                                 disable transport security for client connections (default true)
      --k8s-heartbeat-duration duration                    Heartbeat duration (default 30s)
      --k8s-member-gc-duration duration                    Etcd member garbage collection duration (default 1m0s)
      --key string                                         identify secure client using this TLS key file
      --log-level uint32                                   verbosity level of logs (default 4)
  -m, --max-backups uint                                   maximum number of previous backups to keep (default 7)
      --max-call-send-message-size int                     maximum size of message that the client sends (default 10485760)
      --max-fetchers uint                                  maximum number of threads that will fetch delta snapshots in parallel (default 6)
      --max-parallel-chunk-uploads uint                    maximum number of parallel chunk uploads allowed (default 5)
      --max-request-bytes uint                             Maximum client request size in bytes the server will accept (default 10485760)
      --max-txn-ops uint                                   Maximum number of operations permitted in a transaction (default 10240)
      --min-chunk-size int                                 Minimum size for multipart chunk upload (default 5242880)
      --name string                                        human-readable name for this member (default "default")
      --reelection-period duration                         period after which election will be re-triggered to check the leadership status (default 5s)
      --restoration-temp-snapshots-dir string              path to the temporary directory to store snapshot files during restoration (default "default.restoration.tmp")
  -s, --schedule string                                    schedule for snapshots (default "0 */1 * * *")
      --server-cert string                                 TLS certificate file for backup-restore server
      --server-key string                                  TLS key file for backup-restore server
  -p, --server-port uint                                   port on which server should listen (default 8080)
      --service-endpoints strings                          comma separated list of etcd endpoints that are used for etcd-backup-restore to connect to etcd through a (Kubernetes) service
      --skip-hash-check                                    ignore snapshot integrity hash value (required if copied from data directory)
      --snapstore-temp-directory string                    temporary directory for processing (default "/tmp")
      --storage-provider string                            snapshot storage provider
      --store-container string                             container which will be used as snapstore
      --store-prefix string                                prefix or directory inside container under which snapstore is created
@Fish-pro Fish-pro added the kind/bug Bug label Jan 25, 2024
@ishan16696
Copy link
Member

Hi @Fish-pro ,
As I can notice you are using the helm-charts of etcd-backup-restore but unfortunately helm charts of etcd-backup-restore is not maintained and updated as while working to make etcd and backup-restore HA, we need the involvement of etcd-druid aka etcd operator for helping in features like scaling up the single node etcd to multi-node etcd etc.
I would suggest you to deploy etcd and backup-restore using etcd-druid: https://github.com/gardener/etcd-druid
Here's doc for getting started: https://github.com/gardener/etcd-druid/blob/master/docs/development/getting-started-locally.md

@unmarshall
Copy link
Contributor

To add etcd-backup-restore is part of an etcd cluster and has a defined set of responsibilities. Today if you are using etcd-backup-restore then assumption is that you also will use the new etcd-wrapper which is a replacement for the previous etcd-custom-image. There are other resources that are required to be created for a fully functioning etcd cluster - e.g SA, Service (Client & Peer), PDB, ConfigMap etc. and these are created via etcd-druid. Provisioning of these resources is outside the responsibility set of etcd-backup-restore and thus these charts are not maintained. Druid currently provisions etcd clusters and is productively been used in gardener clusters for several years but it will be soon enhanced to do a lot more and will becomes a full-fledged etcd operator (work is already underway).

We would like to understand your use case better in order to decide on the next steps.

@Fish-pro
Copy link
Author

Fish-pro commented Feb 1, 2024

@unmarshall @ishan16696 Thanks for reply. I will try to use i. So I understand that charts in this repo will not be maintained, right?

@unmarshall
Copy link
Contributor

unmarshall commented Feb 1, 2024

So I understand that charts in this repo will not be maintained, right?

That is the current decision. If you are using these charts then you are effectively setting up an entire etcd cluster and this work today is automated via etcd-druid. We are also in the process of working on the next version of backup-restore which will be a much improved version with a lot of additional functionalities. Using etcd-druid would be beneficial as that would abstract you from the upcoming changes.

In case you face any issues in using etcd-druid we would be happy to help.

@Fish-pro
Copy link
Author

Fish-pro commented Feb 1, 2024

So I understand that charts in this repo will not be maintained, right?

That is the current decision. If you are using these charts then you are effectively setting up an entire etcd cluster and this work today is automated via etcd-druid. We are also in the process of working on the next version of backup-restore which will be a much improved version with a lot of additional functionalities. Using etcd-druid would be beneficial as that would abstract you from the upcoming changes.

In case you face any issues in using etcd-druid we would be happy to help.

@unmarshall thanks

@Fish-pro Fish-pro closed this as completed Feb 1, 2024
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Bug status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

No branches or pull requests

4 participants