Project

General

Profile

Bug #25055

Fix disabled snapshot tasks

Added by Jeff Alperin almost 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
William Grzybowski
Category:
OS
Target version:
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Upgraded to R11-U1 last time server was run (a few days ago). Restarted server without turning on external SAS enclosure (so ts140tank volume cannot be imported). I often start the system this way, but new behavior since upgrade are the following messages that repeat every minute:

Jul 8 19:37:01 ts140 /autosnap.py: [tools.autosnap:258] Volume ts140tank not imported, skipping snapshot task #3
Jul 8 19:37:01 ts140 /autosnap.py: [tools.autosnap:258] Volume ts140tank not imported, skipping snapshot task #4

The times for the snapshots are 1:00 am to 1:30 for snapshot task 3 and 1:30 to 2:00 for task 4. So, the should not be executing.

Then I disabled both of those task, but the messages continued each minute. So, I rebooted the system. The messages continue every minute.

disabled periodic snapshots.png (214 KB) disabled periodic snapshots.png Joe Maloney, 08/28/2017 12:26 PM
12322

Associated revisions

Revision cfd2ee4c (diff)
Added by William Grzybowski almost 4 years ago

fix(snap): only skip snapshot task if its within matching time This will preventing filling the logs of skipped task (for not imported volumes) on times it should not even be snapshotting. Ticket: #25055

Revision 9dd4ba7e (diff)
Added by William Grzybowski almost 4 years ago

fix(gui): make sure current value of snapshot task is displayed Ticket: #25055

Revision e5d8564e (diff)
Added by William Grzybowski almost 4 years ago

fix(snap): only skip snapshot task if its within matching time This will preventing filling the logs of skipped task (for not imported volumes) on times it should not even be snapshotting. Ticket: #25055 (cherry picked from commit cfd2ee4cbe4aeb0cac56159f0b81f11c05970656)

Revision ee3e5a98 (diff)
Added by William Grzybowski almost 4 years ago

fix(gui): make sure current value of snapshot task is displayed Ticket: #25055 (cherry picked from commit 9dd4ba7e9a281cbd5f6beceeb42eb3288f6171ed)

Revision ea2c3865 (diff)
Added by William Grzybowski over 3 years ago

fix(snap): only skip snapshot task if its within matching time This will preventing filling the logs of skipped task (for not imported volumes) on times it should not even be snapshotting. Ticket: #25055

Revision 9f2ddba7 (diff)
Added by William Grzybowski over 3 years ago

fix(gui): make sure current value of snapshot task is displayed Ticket: #25055

History

#1 Updated by Dru Lavigne almost 4 years ago

  • Assignee changed from Release Council to William Grzybowski
  • Seen in changed from Unspecified to 11.0-U1

#2 Updated by William Grzybowski almost 4 years ago

  • Status changed from Unscreened to Closed: Cannot reproduce

I dont see how that is possible. That code is only reachable from snapshots tasks that are enabled.

I also cannot reproduce the issue. Is there anything else you can add for the reproduction case? Are you sure you have disabled all tasks?

#3 Updated by Jeff Alperin almost 4 years ago

There are a couple of aspects to this. Please try the following on FreeNAS 11-U1.

1. Import a volume that exists on an external SAS Expander (in my case ts140tank)
2. Create an enabled periodic snapshot task for that volume to be executed daily between 00:30:00 and 01:00:00 on every weekday.
3. Shutdown FreeNAS
4. Turn off the SAS box (so that the volume will not be available for re-import)
5. Boot (at a time after 01:00:00)
You should now see the following message repeated every minute:
Jul 10 17:52:01 ts140 /autosnap.py: [tools.autosnap:258] Volume ts140tank not imported, skipping snapshot task #1
Jul 10 17:53:01 ts140 /autosnap.py: [tools.autosnap:258] Volume ts140tank not imported, skipping snapshot task #1
Jul 10 17:54:01 ts140 /autosnap.py: [tools.autosnap:258] Volume ts140tank not imported, skipping snapshot task #1
I think this is an error. The snapshot task is enabled, but not until 00:30:00.
Moreover, this message did not occur in the base release of FreeNAS 11.0 (which I have booted dozens of times without ts140tank powered on).

6. Now, edit the periodic snapshot task, remove the enable checkmark, and hit OK
the messages will stop (as you said they would)
7. Observe the periodic snapshot again.
The Volume (at least on my system) will be changed even though it was not edited. I seems that the prior volume name is unavailable since it is not imported, and the snapshot task is therefore altered. This is clearly a second problem. You think you are disabling a task but are unwittingly altering the target volume. I don't know if this existed in 11.0 or is new with U1.

That second issue caused me to misunderstand which tasks I had edited when I previously reported and you could not reproduce.

#4 Updated by William Grzybowski almost 4 years ago

  • Status changed from Closed: Cannot reproduce to 15
  • Priority changed from No priority to Nice to have
  • Target version set to 11.0-U2

I was able to reproduce the first error and fixed that, however I was unable to reproduce/understand the second error.

What do you mean the Volume will be changed? You mean you have more than one volume and it will change to the other volume?

Thats sort of expect behavior I think, since the other volume cannot be poked to list its filesystems.

#5 Updated by Jeff Alperin almost 4 years ago

I have two volumes on that system, ts140vol (always imported) and ts14tank (sometimes imported) When ts140tank is unavailable and I edit the periodic snapshot the volume is changed to ts140vol. There seems to be no way to disable a periodic snapshot for a volume that is not imported without (inadvertantly) changing the volume. I think that the current value of a field should always be an entry in a drop-down list when editing. Another way to put it - the system should not force changing a field into which you have not inserted the cursor.

Thanks for following through on this.

#6 Updated by William Grzybowski almost 4 years ago

  • Status changed from 15 to Needs Developer Review

Ok, I have also committed a fix to behave like you expected it to.

#7 Updated by William Grzybowski almost 4 years ago

  • Assignee changed from William Grzybowski to Suraj Ravichandran

#8 Updated by Suraj Ravichandran almost 4 years ago

  • Status changed from Needs Developer Review to Reviewed by Developer
  • Assignee changed from Suraj Ravichandran to William Grzybowski
  • % Done changed from 0 to 100

Have approved the PR, but have not merged it.

#9 Updated by Jeff Alperin almost 4 years ago

Thank you, Gentlemen. Long live FreeNAS!

#10 Updated by Vaibhav Chauhan almost 4 years ago

  • Target version changed from 11.0-U2 to 11.0-U3

#11 Updated by Vaibhav Chauhan over 3 years ago

  • Status changed from Reviewed by Developer to 47

#12 Updated by Dru Lavigne over 3 years ago

  • Subject changed from System is attempting disabled snapshot to Fix disabled snapshot tasks

#13 Updated by Joe Maloney over 3 years ago

12322

Added a periodic snapshot task to run every 5 mins. Disabled the task. Verified that no additional snapshots were created after waiting for several 5 minute intervals.

#14 Updated by Vaibhav Chauhan over 3 years ago

  • Status changed from Ready For Release to Resolved

Also available in: Atom PDF