Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

checking etcd data-dir fails #139

Closed
xelalexv opened this issue Jun 18, 2018 · 2 comments
Closed

checking etcd data-dir fails #139

xelalexv opened this issue Jun 18, 2018 · 2 comments

Comments

@xelalexv
Copy link

The permissions/ownership tests on etc data-dir (1.4.11 & 12) fail even though things are set correctly. The problem seems to be with the start of the check:

ps -ef | grep $etcdbin | ...

I set verbose log level, and get:

`20917 util.go:278] Substituting $etcdbin with 'etcd'

So we grep for etcd on the process list, which unfortunately also hits the kube-apiserver process, since that contains the string etcd in its argument list (--etcd-servers). kube-bench then correctly complains:

I0618 08:45:40.804145   19160 check.go:161] failed to run: ps -ef | grep etcd | grep -v grep | sed 's%.*data-dir[= ]\([^ ]*\).*%\1%' | xargs stat -c %a
failed command:[xargs stat -c %a], error: exit status 123

Changing according grep in the check to `grep -E "\s+$etcdbin\s+" did work, but that might still not be the safest way to do that.

@lizrice
Copy link
Contributor

lizrice commented Jun 18, 2018

I think this might be fixed by #134

@xelalexv
Copy link
Author

I can confirm, #134 fixes this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants