@@ -173,19 +173,7 @@ storage:
173173 sleep 0.5; \
174174 done; \
175175 done) &
176- done
177- systemd:
178- units:
179- - name: write-to-nfs.service
180- enabled: false
181- contents: |
182- [Unit]
183- ConditionFirstBoot=true
184- [Service]
185- Type=oneshot
186- RemainAfterExit=yes
187- ExecStart=/usr/local/bin/nfs-random-write.sh
188- Restart=on-failure` )
176+ done` )
189177 opts := platform.MachineOptions {
190178 MinMemory : 2048 ,
191179 }
@@ -225,9 +213,10 @@ systemd:
225213func doSyncTest (c cluster.TestCluster , client platform.Machine ) {
226214 c .RunCmdSync (client , "sudo touch /var/tmp/data3/test" )
227215 // Continue write
228- _ , err := c .SSH (client , `sudo systemctl enable --now write-to-nfs.service` )
216+ //_, err := c.SSH(client, `sudo systemctl enable --now write-to-nfs.service`)
217+ _ , err := c .SSH (client , "sudo systemd-run sh -c '/usr/local/bin/nfs-random-write.sh'" )
229218 if err != nil {
230- c .Fatalf ("failed to start service : %v" , err )
219+ c .Fatalf ("failed to start write-to-nfs : %v" , err )
231220 }
232221
233222 // Create a stage deploy using kargs while writing
@@ -241,10 +230,7 @@ func doSyncTest(c cluster.TestCluster, client platform.Machine) {
241230 c .Log ("Set link down and rebooting." )
242231 // Skip the error check as it is expected
243232 cmd := fmt .Sprintf ("sudo systemd-run sh -c 'ip link set %s down && sleep 5 && systemctl reboot'" , netdevice )
244- _ , err = c .SSH (client , cmd )
245- if err != nil {
246- c .Fatalf ("failed to set down link and reboot: %v" , err )
247- }
233+ _ , _ = c .SSH (client , cmd )
248234
249235 err = util .Retry (8 , 10 * time .Second , func () error {
250236 // Look for the kernel argument test=1
0 commit comments