Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Hotfix/azure only reboot nvidia #135

Merged
merged 8 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ require (
github.com/masterzen/winrm v0.0.0-20200615185753-c42b5136ff88 // indirect
github.com/mitchellh/gox v1.0.1 // indirect
github.com/packer-community/winrmcp v0.0.0-20180921211025-c76d91c1e7db // indirect
github.com/sebdah/goldie/v2 v2.5.3 // indirect
github.com/sebdah/goldie/v2 v2.5.3
github.com/stretchr/testify v1.6.1
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf
github.com/tombuildsstuff/giovanni v0.12.0 // indirect
Expand All @@ -35,7 +35,7 @@ require (
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0
golang.org/x/tools v0.0.0-20201028111035-eafbe7b904eb // indirect
google.golang.org/api v0.34.0 // indirect
gopkg.in/alessio/shellescape.v1 v1.0.0-20170105083845-52074bc9df61 // indirect
gopkg.in/alessio/shellescape.v1 v1.0.0-20170105083845-52074bc9df61
k8s.io/api v0.20.5
k8s.io/apimachinery v0.20.5
k8s.io/client-go v0.20.5
Expand Down
7 changes: 7 additions & 0 deletions iterative/resource_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,15 @@ sudo bash -c 'cat << EOF > /etc/systemd/system/cml.service
WantedBy=multi-user.target
EOF'

{{if .cloud}}
{{if eq .cloud "azure"}}
sudo systemctl enable cml.service
sudo reboot
{{- else}}
sudo systemctl daemon-reload
sudo systemctl enable cml.service --now
{{- end}}
{{- end}}
{{- end}}
`)
var customDataBuffer bytes.Buffer
Expand Down
5 changes: 3 additions & 2 deletions iterative/resource_runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package iterative

import (
"encoding/base64"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/sebdah/goldie/v2"
"os"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/sebdah/goldie/v2"

"github.com/stretchr/testify/assert"
)

Expand Down
6 changes: 4 additions & 2 deletions iterative/testdata/script_template_cloud_aws.golden
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,7 @@ sudo bash -c 'cat << EOF > /etc/systemd/system/cml.service
WantedBy=multi-user.target
EOF'

sudo systemctl enable cml.service
sudo reboot


sudo systemctl daemon-reload
sudo systemctl enable cml.service --now
2 changes: 2 additions & 0 deletions iterative/testdata/script_template_cloud_azure.golden
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,7 @@ sudo bash -c 'cat << EOF > /etc/systemd/system/cml.service
WantedBy=multi-user.target
EOF'



sudo systemctl enable cml.service
sudo reboot
6 changes: 4 additions & 2 deletions iterative/testdata/script_template_cloud_invalid.golden
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,7 @@ sudo bash -c 'cat << EOF > /etc/systemd/system/cml.service
WantedBy=multi-user.target
EOF'

sudo systemctl enable cml.service
sudo reboot


sudo systemctl daemon-reload
sudo systemctl enable cml.service --now