diff options
author | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2019-10-08 14:43:47 +0200 |
---|---|---|
committer | Pawel Wieczorek <p.wieczorek2@samsung.com> | 2020-01-29 17:14:53 +0100 |
commit | e15544dfe000aa6d055b5d8bc0fadfc8f0ef5648 (patch) | |
tree | 83f78fe30b8a1d001139eb57171a5e31e9444971 /test/security/k8s | |
parent | f649f22f8e4ec272fff3d806f8e4ba9b82ec7b4d (diff) |
k8s: Drop process name trimming from etcd on RKE
Information for etcd extracted from container on a RKE-based cluster
does not include process name.
Issue-ID: SECCOM-235
Change-Id: Ie6aee550868431d5f4d27c3b3d262e17e1aa6156
Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'test/security/k8s')
-rw-r--r-- | test/security/k8s/src/check/raw/raw.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/security/k8s/src/check/raw/raw.go b/test/security/k8s/src/check/raw/raw.go index eea5c01d2..91237ba82 100644 --- a/test/security/k8s/src/check/raw/raw.go +++ b/test/security/k8s/src/check/raw/raw.go @@ -49,7 +49,7 @@ func (r *Raw) GetControllerManagerParams() ([]string, error) { // GetEtcdParams returns parameters of running etcd. // It queries only cluster nodes with "controlplane" role. func (r *Raw) GetEtcdParams() ([]string, error) { - return []string{}, check.ErrNotImplemented + return getProcessParams(check.EtcdProcess) } func getProcessParams(process check.Command) ([]string, error) { @@ -67,6 +67,10 @@ func getProcessParams(process check.Command) ([]string, error) { cmd = trimOutput(cmd) // TODO: improve `docker inspect` query format. if len(cmd) > 0 { + if process == check.EtcdProcess { // etcd process name is not included in its argument list. + return btos(cmd), nil + } + i := bytes.Index(cmd, []byte(process.String())) if i == -1 { return []string{}, fmt.Errorf("missing %s command", process) |