Skip to content

Commit

Permalink
Fix cml.service not waiting for process shutdown (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x2b3bfa0 authored Jul 8, 2021
1 parent 9fdaf56 commit 65a1177
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
7 changes: 3 additions & 4 deletions iterative/resource_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,15 +327,14 @@ sudo chmod +x /usr/bin/cml.sh
sudo bash -c 'cat << EOF > /etc/systemd/system/cml.service
[Unit]
Description=cml service
After=default.target
[Service]
Type=oneshot
RemainAfterExit=yes
Type=simple
ExecStart=/usr/bin/cml.sh
[Install]
WantedBy=multi-user.target
WantedBy=default.target
EOF'
{{if .cloud}}
Expand Down
7 changes: 3 additions & 4 deletions iterative/testdata/script_template_cloud_aws.golden
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,14 @@ sudo chmod +x /usr/bin/cml.sh

sudo bash -c 'cat << EOF > /etc/systemd/system/cml.service
[Unit]
Description=cml service
After=default.target
[Service]
Type=oneshot
RemainAfterExit=yes
Type=simple
ExecStart=/usr/bin/cml.sh
[Install]
WantedBy=multi-user.target
WantedBy=default.target
EOF'


Expand Down
7 changes: 3 additions & 4 deletions iterative/testdata/script_template_cloud_azure.golden
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,14 @@ sudo chmod +x /usr/bin/cml.sh

sudo bash -c 'cat << EOF > /etc/systemd/system/cml.service
[Unit]
Description=cml service
After=default.target
[Service]
Type=oneshot
RemainAfterExit=yes
Type=simple
ExecStart=/usr/bin/cml.sh
[Install]
WantedBy=multi-user.target
WantedBy=default.target
EOF'


Expand Down
7 changes: 3 additions & 4 deletions iterative/testdata/script_template_cloud_invalid.golden
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,14 @@ sudo chmod +x /usr/bin/cml.sh

sudo bash -c 'cat << EOF > /etc/systemd/system/cml.service
[Unit]
Description=cml service
After=default.target
[Service]
Type=oneshot
RemainAfterExit=yes
Type=simple
ExecStart=/usr/bin/cml.sh
[Install]
WantedBy=multi-user.target
WantedBy=default.target
EOF'


Expand Down

0 comments on commit 65a1177

Please sign in to comment.