Skip to content

Restore recreates the embedded etcd data directory world accessible #4274

Closed

Description

@blacksoxx

What happened?

vcluster restore for the embedded etcd backing store moves the existing data directory aside and recreates it with os.MkdirAll(dir, 0777) (pkg/snapshot/restoreclient.go, backupFolder). The directory holds the restored etcd database, including every Secret of the virtual cluster. etcd creates and expects its data directory with mode 0700 and warns at startup when it finds anything looser.

What did you expect to happen?

The restored data directory created with 0700, like etcd creates it itself.

How can we reproduce it (as minimally and precisely as possible)?

Run a restore into a vCluster that uses the embedded etcd backing store and check the mode of /data/etcd in the control plane container afterwards. With the usual umask it is 0755 instead of 0700.

Anything else we need to know?

One line change plus a unit test.

vcluster version

main at c5e9027, same in v0.37.6.

Fix: #4275

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions