From bb856ad8543084861e2bcf153f69bf8522dd9a0c Mon Sep 17 00:00:00 2001 From: Patryk Matuszak <305846+pmtk@users.noreply.github.com> Date: Tue, 21 Mar 2023 12:56:47 +0100 Subject: [PATCH] make sure microshift-etcd runs as root --- etcd/cmd/microshift-etcd/run.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/etcd/cmd/microshift-etcd/run.go b/etcd/cmd/microshift-etcd/run.go index 451403a0ae..0026092976 100644 --- a/etcd/cmd/microshift-etcd/run.go +++ b/etcd/cmd/microshift-etcd/run.go @@ -106,6 +106,10 @@ func (s *EtcdService) configure(cfg *config.MicroshiftConfig) { } func (s *EtcdService) Run() error { + if os.Geteuid() > 0 { + klog.Fatalf("microshift-etcd must be run privileged") + } + e, err := etcd.StartEtcd(s.etcdCfg) if err != nil { return fmt.Errorf("microshift-etcd failed to start: %v", err)