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

rke2 etcd-snapshot save logs wrong s3 bucket/folder path #4941

Closed
aganesh-suse opened this issue Oct 20, 2023 · 2 comments
Closed

rke2 etcd-snapshot save logs wrong s3 bucket/folder path #4941

aganesh-suse opened this issue Oct 20, 2023 · 2 comments
Assignees

Comments

@aganesh-suse
Copy link

aganesh-suse commented Oct 20, 2023

Environmental Info:
RKE2 Version:

rke2 -v
rke2 version v1.28.3-rc2+rke2r1 (0d0d0e4)
go version go1.20.10 X:boringcrypto

Node(s) CPU architecture, OS, and Version:

Ubuntu 22.04

Cluster Configuration:

3 server/1 agent
Describe the bug:

This is really a nit bug.
$ sudo rke2 etcd-snapshot save
.
.
INFO[0005] Uploading snapshot to s3://s3_bucket//var/lib/rancher/rke2/server/db/snapshots/on-demand-ip-x-x-x-x-1697836368
INFO[0007] Uploaded snapshot metadata s3://s3_bucket//var/lib/rancher/rke2/server/db/.metadata/on-demand-ip-x-x-x-x-1697836368
.
.

It is logging the s3_bucket/ as the s3 url... instead of s3_bucket/<s3_folder> path.
It saves to the right place though.

@mdrahman-suse
Copy link
Contributor

Validated using v1.29.1-rc2+rke2r1

Followed steps mentioned here: #4941 (comment)

Testing

  1. Install rke2
  2. Enable and start rke2-server.service
  3. Ensure cluster is up and running
  4. Perform etcd-snapshot save
sudo rke2 etcd-snapshot save \
--s3 \
--s3-bucket="<bucket>" \
--s3-folder="<folder>" \
--s3-access-key="<access-key>" \
--s3-secret-key="<secret-key>" \
--s3-region="<region>"

Replication result:

rke2 version v1.29.0+rke2r1 (4fd30c26c91dd3f2f623c5af00d1ebcfec8c2709)
go version go1.21.5 X:boringcrypto
  • Observed console output
...
INFO[0000] Saving etcd snapshot <snapshot-name> to S3
INFO[0000] Uploading snapshot to s3://<bucket>//var/lib/rancher/rke2/server/db/snapshots/<snapshot-name>
INFO[0000] Uploaded snapshot metadata s3://<bucket>/<folder>/.metadata/<snapshot-name>
INFO[0000] S3 upload complete for <snapshot-name>
...

Validation result:

rke2 version v1.29.1-rc2+rke2r1 (a4986a5a5840f1a259e66c61553a9abd58ef9624)
go version go1.21.6 X:boringcrypto
  • Observed console output
...
INFO[0000] Saving etcd snapshot <snapshot-name> to S3
INFO[0000] Uploading snapshot to s3://<bucket>/<folder>/<snapshot-name>
INFO[0000] Uploaded snapshot metadata s3://<bucket>/<folder>/.metadata/<snapshot-name>
INFO[0000] S3 upload complete for <snapshot-name>

Also validated on upgrades and compressed format

@mdrahman-suse
Copy link
Contributor

Validated the backports on

  • v1.28.6-rc2+rke2r1
  • v1.27.10-rc2+rke2r1
  • v1.26.13-rc2+rke2r1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants