X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FKubernetesUtils.py;h=3e45d3a60f713f5ace29e576083906d1d81b5944;hb=refs%2Fchanges%2F80%2F11580%2F10;hp=ceeab0b07e47daba0b1beba6c4e424b3df122a53;hpb=0437095f4bf958154f25a3f163f432b22fcdc743;p=csit.git diff --git a/resources/libraries/python/KubernetesUtils.py b/resources/libraries/python/KubernetesUtils.py index ceeab0b07e..3e45d3a60f 100644 --- a/resources/libraries/python/KubernetesUtils.py +++ b/resources/libraries/python/KubernetesUtils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. +# Copyright (c) 2018 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -206,7 +206,7 @@ class KubernetesUtils(object): :type rtype: str :type name: str :raises RuntimeError: If retrieving or deleting Kubernetes resource - failed. + failed. """ ssh = SSH() ssh.connect(node) @@ -320,7 +320,11 @@ class KubernetesUtils(object): cmd = "for p in $(kubectl get pods {nspace} -o jsonpath="\ "'{{.items[*].metadata.name}}'); do echo $p; kubectl logs "\ "{nspace} $p; done".format(nspace=nspace) - ssh.exec_command_sudo(cmd) + ssh.exec_command(cmd) + + cmd = "kubectl exec {nspace} etcdv3 -- etcdctl --endpoints "\ + "\"localhost:22379\" get \"/\" --prefix=true".format(nspace=nspace) + ssh.exec_command(cmd) @staticmethod def get_kubernetes_logs_on_all_duts(nodes, nspace): @@ -479,5 +483,5 @@ class KubernetesUtils(object): if cpuset_cpus: corelist_workers = ','.join(str(cpu) for cpu in cpuset_cpus) vpp_config.add_cpu_corelist_workers(corelist_workers) - vpp_config.add_plugin_disable('dpdk_plugin.so') + vpp_config.add_plugin('disable', 'dpdk_plugin.so') vpp_config.apply_config(filename=kwargs['filename'], restart_vpp=False)