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

rke etcd snapshot-restore doesn't use this configuration and restores snapshot to a wrong directory #2547

Open
Zebradil opened this issue May 20, 2021 · 4 comments

Comments

@Zebradil
Copy link

I have custom directories for etcd data and wal files. rke etcd snapshot-restore doesn't use this configuration and restores snapshot to a wrong directory.

RKE version: v1.2.8

Docker version:

Client:
 Version:           20.10.6
 API version:       1.41
 Go version:        go1.16.3
 Git commit:        370c28948e
 Built:             Mon Apr 12 14:10:41 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.6
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.3
  Git commit:       8728dd246c
  Built:            Mon Apr 12 14:10:25 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.5.1
  GitCommit:        12dca9790f4cb6b18a6a7a027ce420145cb98ee7.m
 runc:
  Version:          1.0.0-rc94
  GitCommit:        2c7861bc5e1b3e756392236553ec14a78a09f8bf
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Operating system and kernel: Arch Linux, 5.12.4-arch1-2

Type/provider of hosts: Openstack

cluster.yml file:

# trimmed
services:
  etcd:
    extra_args:
      # scale etcd disk performance, see https://rancher.com/docs/rancher/v2.x/en/installation/options/etcd/
      data-dir: "/var/lib/rancher/etcd/data/"
      wal-dir: "/var/lib/rancher/etcd/wal/wal_dir"
    extra_binds:
      - "/var/lib/etcd/data:/var/lib/rancher/etcd/data"
      - "/var/lib/etcd/wal:/var/lib/rancher/etcd/wal"
# trimmed

Steps to Reproduce:

  1. Create RKE cluster using custom paths for data-dir and wal-dir arguments
  2. Create a snapshot with rke etcd snapshot-save
  3. Restore snapshot with rke etcd snapshot-restore

Results:

The snapshot is restored into a directory, which is not mounted to the etcd containers, etcd uses the pre-restore data.

@Zebradil
Copy link
Author

I got it working by patching the code, preparing a PR currently.

@superseb
Copy link
Contributor

superseb commented Jun 1, 2021

I'm looking at this

@fritzduchardt
Copy link

Any update on this? Ran into the same issue and can restore backups only with @Zebradil fix.

@superseb
Copy link
Contributor

superseb commented Aug 2, 2021

It will go in later, with current code freeze it won't go in next release.

@superseb superseb added this to the RKE v1.3.2 - Rancher v2.6.2 milestone Aug 3, 2021
@Jono-SUSE-Rancher Jono-SUSE-Rancher modified the milestones: RKE v1.3.3 - Rancher v2.6.3, RKE v1.x - Backlog - Rancher v2.x Dec 17, 2021
@superseb superseb removed this from the RKE v1.x - Backlog - Rancher v2.x milestone Sep 19, 2023
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

7 participants