Wipe And Restore
-
@Nika I just don’t have time at the moment (I’m at work). I can look at it tonight.
-
@Wayne-Workman OH Cool. thank you very much.
-
I’m just going to use this thread to jot down some notes while I work on this. It should be very simple though.
This is what an instant deployment full-wipe task looks like in FOG 1.2.0
+--------+----------+---------------------+---------------------+------------+-------------+--------------+-----------+------------------------+------------+------------+---------+-----------------+-------------------+----------------+-----------------+---------------+----------------+-----------------+-----------------+------------------+---------------+--------------+ | taskID | taskName | taskCreateTime | taskCheckIn | taskHostID | taskStateID | taskCreateBy | taskForce | taskScheduledStartTime | taskTypeID | taskPCT | taskBPM | taskTimeElapsed | taskTimeRemaining | taskDataCopied | taskPercentText | taskDataTotal | taskNFSGroupID | taskNFSMemberID | taskNFSFailures | taskLastMemberID | taskPassreset | taskShutdown | +--------+----------+---------------------+---------------------+------------+-------------+--------------+-----------+------------------------+------------+------------+---------+-----------------+-------------------+----------------+-----------------+---------------+----------------+-----------------+-----------------+------------------+---------------+--------------+ | 2 | | 2016-01-13 22:31:16 | 0000-00-00 00:00:00 | 1 | 1 | wayne | 0 | 0000-00-00 00:00:00 | 20 | 0000000000 | | | | | | | 0 | 0 | | 0 | | | +--------+----------+---------------------+---------------------+------------+-------------+--------------+-----------+------------------------+------------+------------+---------+-----------------+-------------------+----------------+-----------------+---------------+----------------+-----------------+-----------------+------------------+---------------+--------------+
This is what an instant deployment image task looks like in FOG 1.2.0
+--------+----------+---------------------+---------------------+------------+-------------+--------------+-----------+------------------------+------------+------------+---------+-----------------+-------------------+----------------+-----------------+---------------+----------------+-----------------+-----------------+------------------+---------------+--------------+ | taskID | taskName | taskCreateTime | taskCheckIn | taskHostID | taskStateID | taskCreateBy | taskForce | taskScheduledStartTime | taskTypeID | taskPCT | taskBPM | taskTimeElapsed | taskTimeRemaining | taskDataCopied | taskPercentText | taskDataTotal | taskNFSGroupID | taskNFSMemberID | taskNFSFailures | taskLastMemberID | taskPassreset | taskShutdown | +--------+----------+---------------------+---------------------+------------+-------------+--------------+-----------+------------------------+------------+------------+---------+-----------------+-------------------+----------------+-----------------+---------------+----------------+-----------------+-----------------+------------------+---------------+--------------+ | 3 | | 2016-01-13 22:40:27 | 0000-00-00 00:00:00 | 1 | 1 | wayne | 0 | 0000-00-00 00:00:00 | 1 | 0000000000 | | | | | | | 1 | 1 | | 0 | | | +--------+----------+---------------------+---------------------+------------+-------------+--------------+-----------+------------------------+------------+------------+---------+-----------------+-------------------+----------------+-----------------+---------------+----------------+-----------------+-----------------+------------------+---------------+--------------+
So considering the above information, we need to check the tasks table for tasks that have taskTypeID 18, 19 or 20 where taskStateID is 1, 2 or 3.
When this is seen, the taskHostID needs noted. When the task disappears, a new imaging task needs created using the image assigned to the host.
I did do a full wipe just for testing - after the wiping is started, the taskStateID does not change. Perhaps @Tom-Elliott can see if that’s the case in the current FOG trunk, and if so, hopefully get that fixed before 1.3.0 release. I assume the taskStateID gets set to 4 when it gets done but I’m not sure, I didn’t wait for it to finish.
I’ll do more testing Friday night to see if an added task will work when there’s already a current task. If it works, awesome. If not, we will need to edit the wipe tasks I suppose, which means editing the 1.2.0 init.
-
@Wayne-Workman thank you. i hope it will work.
-
Bumping this thread… I’m planning on working on this tomorrow night.
-
@Wayne-Workman so? is solution?
-
@Nika Not yet. I didn’t get around to trying. But it can be done.
-
@Wayne-Workman can you show me how i can do it please ? i need this .
-
@Nika Just create a root crontab that checks the tasks table every minute. The crontab starts a script that checks the tasks table for tasks that have taskTypeID 18, 19 or 20 where taskStateID is 1, 2 or 3. If it sees that, it should insert an imaging task using the same detected taskHostID with the taskID properly incremented as well.
If that doesn’t work, then the init needs modified.
-
@Wayne-Workman thaks.