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

docs(recurring job): behavior changed #678

Merged
merged 2 commits into from
Apr 19, 2023

Conversation

mantissahz
Copy link
Contributor

Update important-notes for v1.3.3, v1.4.2 and v1.5.0.

Ref: longhorn/longhorn#4898

@mantissahz mantissahz self-assigned this Mar 21, 2023
@mantissahz mantissahz marked this pull request as draft March 21, 2023 02:02
@mantissahz mantissahz marked this pull request as ready for review March 21, 2023 02:52
@mantissahz
Copy link
Contributor Author

cc @c3y1huang @innobead

Copy link
Member

@innobead innobead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mantissahz Please correct the doc as per the suggestions.

I did not make all the suggested changes, so you need to recheck this PR and fix them all.

@@ -14,3 +14,4 @@ Please see [here](https://github.com/longhorn/longhorn/releases/tag/v{{< current
4. There are two important fixes that will prevent rarely potential data corruption during replica rebuilding, and also improve write performance via the specific filesystem block size.
- [4354](https://github.com/longhorn/longhorn/issues/4354): Introduce Data Alignment Correction for existing volumes if the filesystem block size is less than 4096.
- [4594](https://github.com/longhorn/longhorn/issues/4594): Use the specific block size for the filesystem to avoid unnecessary Ready-Modify-Write operations between volume head and snapshots.
5. After the upgrade, the behavior of recurring job task types `Snapshot` and `Backup` will be changed to check the number of old snapshots first. If the number of old snapshots exceeds the retain count, older snapshots will be cleaned up first before taking a new snapshot. And introduce two new recurring job task types `Snapshot Force Create` and `Backup Force Create` and the new task type `Snapshot Force Create` will behave the same as the original behavior of the task type `Snapshot` as well as task types `Backup Force Create` and `Backup`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
5. After the upgrade, the behavior of recurring job task types `Snapshot` and `Backup` will be changed to check the number of old snapshots first. If the number of old snapshots exceeds the retain count, older snapshots will be cleaned up first before taking a new snapshot. And introduce two new recurring job task types `Snapshot Force Create` and `Backup Force Create` and the new task type `Snapshot Force Create` will behave the same as the original behavior of the task type `Snapshot` as well as task types `Backup Force Create` and `Backup`.
5. After the upgrade, the behavior of the recurring job types `Snapshot` and `Backup` will attempt to delete old snapshots first if they exceed the retained count before creating a new snapshot. Additionally, two new recurring job types have been introduced, `Snapshot Force Create` and `Backup Force Create`. They retain the original behavior of taking a snapshot or backup first before deleting outdated snapshots.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified. Thanks

@@ -65,8 +65,10 @@ The following parameters should be specified for each recurring job selector:
- `name`: Name of the recurring job. Do not use duplicate names. And the length of `name` should be no more than 40 characters.

- `task`: Type of the job. Longhorn supports the following:
- `backup`: periodically create snapshots then do backups
- `snapshot`: periodically create snapshots
- `backup`: periodically create snapshots then do backups except for old snapshots cleanup failed before creating new snapshots
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `backup`: periodically create snapshots then do backups except for old snapshots cleanup failed before creating new snapshots
- `backup`: periodically create snapshots then do backups after cleaning up outdated snapshots

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified for all related files. Thanks

- `snapshot`: periodically create snapshots
- `backup`: periodically create snapshots then do backups except for old snapshots cleanup failed before creating new snapshots
- `backup-force-create`: periodically create snapshots the do backups even if old snapshots cleanup failed
- `snapshot`: periodically create snapshots except for old snapshots cleanup failed before creating new snapshots
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `snapshot`: periodically create snapshots except for old snapshots cleanup failed before creating new snapshots
- `snapshot`: periodically create snapshots after cleaning up outdated snapshots

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified for all related files. Thanks

- `backup`: periodically create snapshots then do backups except for old snapshots cleanup failed before creating new snapshots
- `backup-force-create`: periodically create snapshots the do backups even if old snapshots cleanup failed
- `snapshot`: periodically create snapshots except for old snapshots cleanup failed before creating new snapshots
- `snapshot-force-create`: periodically create snapshots even if old snapshots cleanup failed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `snapshot-force-create`: periodically create snapshots even if old snapshots cleanup failed
- `snapshot-force-create`: periodically create snapshots

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified for all related files. Thanks

@@ -14,6 +14,8 @@ Please ensure your Kubernetes cluster is at least v1.21 before upgrading to Long
### Recurring Jobs
After the upgrade, the recurring job settings of volumes will be migrated to new recurring job resources, and the `RecurringJobs` field in the volume spec will be deprecated. [[doc](https://longhorn.io/docs/{{< current-version >}}/deploy/upgrade/#4-automatically-migrate-recurring-jobs)]

And the behavior of recurring job task types `Snapshot` and `Backup` will be changed to check the number of old snapshots first. If the number of old snapshots exceeds the retain count, older snapshots will be cleaned up first before taking a new snapshot. And introduce two new recurring job task types `Snapshot Force Create` and `Backup Force Create` and the new task type `Snapshot Force Create` will behave the same as the original behavior of the task type `Snapshot` as well as task types `Backup Force Create` and `Backup`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
And the behavior of recurring job task types `Snapshot` and `Backup` will be changed to check the number of old snapshots first. If the number of old snapshots exceeds the retain count, older snapshots will be cleaned up first before taking a new snapshot. And introduce two new recurring job task types `Snapshot Force Create` and `Backup Force Create` and the new task type `Snapshot Force Create` will behave the same as the original behavior of the task type `Snapshot` as well as task types `Backup Force Create` and `Backup`.
The behavior of the recurring job types `Snapshot` and `Backup` will attempt to delete old snapshots first if they exceed the retained count before creating a new snapshot. Additionally, two new recurring job types have been introduced, `Snapshot Force Create` and `Backup Force Create`. They retain the original behavior of taking a snapshot or backup first before deleting outdated snapshots.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified. Thanks

@@ -14,6 +14,8 @@ Please ensure your Kubernetes cluster is at least v1.21 before upgrading to Long
### Recurring Jobs
After the upgrade, the recurring job settings of volumes will be migrated to new recurring job resources, and the `RecurringJobs` field in the volume spec will be deprecated. [[doc](https://longhorn.io/docs/{{< current-version >}}/deploy/upgrade/#4-automatically-migrate-recurring-jobs)]

And the behavior of recurring job task types `Snapshot` and `Backup` will be changed to check the number of old snapshots first. If the number of old snapshots exceeds the retain count, older snapshots will be cleaned up first before taking a new snapshot. And introduce two new recurring job task types `Snapshot Force Create` and `Backup Force Create` and the new task type `Snapshot Force Create` will behave the same as the original behavior of the task type `Snapshot` as well as task types `Backup Force Create` and `Backup`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
And the behavior of recurring job task types `Snapshot` and `Backup` will be changed to check the number of old snapshots first. If the number of old snapshots exceeds the retain count, older snapshots will be cleaned up first before taking a new snapshot. And introduce two new recurring job task types `Snapshot Force Create` and `Backup Force Create` and the new task type `Snapshot Force Create` will behave the same as the original behavior of the task type `Snapshot` as well as task types `Backup Force Create` and `Backup`.
The behavior of the recurring job types `Snapshot` and `Backup` will attempt to delete old snapshots first if they exceed the retained count before creating a new snapshot. Additionally, two new recurring job types have been introduced, `Snapshot Force Create` and `Backup Force Create`. They retain the original behavior of taking a snapshot or backup first before deleting outdated snapshots.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modified. Thanks

Update `important-notes` for v1.3.3, v1.4.2 and v1.5.0.

Ref: 4898

Signed-off-by: James Lu <james.lu@suse.com>
Two new task types `snapshot-force-create` and `backup-force-create`

Ref: 4898

Signed-off-by: James Lu <james.lu@suse.com>
Copy link
Member

@innobead innobead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@innobead innobead merged commit 6004994 into longhorn:master Apr 19, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants