e2e node: make possible to add additional kernel arguments

Add an option to configure additional kernel arguments during
the setup of e2e node environment.

The example:
cos-stable1:
image_family: cos-89-lts # docker v19.03.6, deprecated after 2021-06-24
project: cos-cloud
metadata: "user-data<test/e2e_node/jenkins/cos-init-live-restore.yaml,gci-update-strategy=update_disabled"
kernel_arguments:
- "numa=fake=2"
machine: n1-standard-4

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
This commit is contained in:
Artyom Lukianov
2020-11-10 12:26:38 +02:00
parent 2112bddae1
commit 93ff47b05b
2 changed files with 101 additions and 20 deletions

View File

@@ -110,8 +110,10 @@ func runSSHCommand(cmd string, args ...string) (string, error) {
if *sshOptions != "" {
args = append(strings.Split(*sshOptions, " "), args...)
}
klog.Infof("Running the command %s, with args: %v", cmd, args)
output, err := exec.Command(cmd, args...).CombinedOutput()
if err != nil {
klog.Errorf("failed to run SSH command: out: %s, err: %v", output, err)
return string(output), fmt.Errorf("command [%s %s] failed with error: %v", cmd, strings.Join(args, " "), err)
}
return string(output), nil