Skip to content

mgr/snap_schedule: restore yearly spec to lowercase y#56732

Merged
rishabh-d-dave merged 1 commit intoceph:mainfrom
mchangir:mgr-snap_schedule-restore-yearly-spec-from-Y-to-y
May 3, 2024
Merged

mgr/snap_schedule: restore yearly spec to lowercase y#56732
rishabh-d-dave merged 1 commit intoceph:mainfrom
mchangir:mgr-snap_schedule-restore-yearly-spec-from-Y-to-y

Conversation

@mchangir
Copy link
Contributor

@mchangir mchangir commented Apr 5, 2024

Fixes: https://tracker.ceph.com/issues/65350
Signed-off-by: Milind Changire mchangir@redhat.com

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@github-actions github-actions bot added the pybind label Apr 5, 2024
@mchangir mchangir force-pushed the mgr-snap_schedule-restore-yearly-spec-from-Y-to-y branch from 3f7cc0d to c2cf05b Compare April 5, 2024 15:37
@github-actions github-actions bot added cephfs Ceph File System tests labels Apr 5, 2024
@mchangir mchangir force-pushed the mgr-snap_schedule-restore-yearly-spec-from-Y-to-y branch from c2cf05b to 3cb7111 Compare April 5, 2024 15:43
@mchangir mchangir requested a review from a team as a code owner April 5, 2024 15:43
@mchangir mchangir force-pushed the mgr-snap_schedule-restore-yearly-spec-from-Y-to-y branch from 3cb7111 to 2685bc0 Compare April 5, 2024 15:44
Copy link
Member

@joscollin joscollin left a comment

Choose a reason for hiding this comment

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

Looks Good

@vshankar
Copy link
Contributor

@mchangir what happens to existing shedules (iff Y got used to set a schedule)?

@mchangir
Copy link
Contributor Author

@mchangir what happens to existing shedules (iff Y got used to set a schedule)?

haven't explicitly tested this aspect
but as long as the mgr isn't restarted, the timer would be set for 1 year and the retention would continue to collect snapshots

  • as soon as the mgr is started with the new bits to restore the yearly spec back to lowercase 'y', then the timer arming would fail since there would be no multiplier found for uppercase 'Y'
  • if uppercase 'Y' was the only retention spec, then the new bits which restores the yearly spec back to lowercase 'y' would result in no valid retention spec and all collected yearly snapshots would be purged

All of this also depends on the start time from which the year starts. With no explicit start time, the yearly snapshot would fall on Jan 01 00:00 of every year.

@vshankar
Copy link
Contributor

@mchangir what happens to existing shedules (iff Y got used to set a schedule)?

haven't explicitly tested this aspect but as long as the mgr isn't restarted, the timer would be set for 1 year and the retention would continue to collect snapshots

  • as soon as the mgr is started with the new bits to restore the yearly spec back to lowercase 'y', then the timer arming would fail since there would be no multiplier found for uppercase 'Y'
  • if uppercase 'Y' was the only retention spec, then the new bits which restores the yearly spec back to lowercase 'y' would result in no valid retention spec and all collected yearly snapshots would be purged

All of this also depends on the start time from which the year starts. With no explicit start time, the yearly snapshot would fall on Jan 01 00:00 of every year.

So, if the mgr is updated and a spec using Y exist in the DB, then that's not a valid spec, right?

@mchangir
Copy link
Contributor Author

So, if the mgr is updated and a spec using Y exist in the DB, then that's not a valid spec, right?

that's right

@rishabh-d-dave rishabh-d-dave added the wip-rishabh-testing Rishabh's testing label label Apr 12, 2024
@vshankar
Copy link
Contributor

So, if the mgr is updated and a spec using Y exist in the DB, then that's not a valid spec, right?

that's right

Did that change make it to a release? We have to do something about it if the change made it to a release.

@mchangir
Copy link
Contributor Author

So, if the mgr is updated and a spec using Y exist in the DB, then that's not a valid spec, right?

that's right

Did that change make it to a release? We have to do something about it if the change made it to a release.

yes, the change has made it to:

  • reef - 18.2.2
  • squid - 19.0.0

@mchangir
Copy link
Contributor Author

The change has been backported to quincy as well, but so far there's been no quincy release with the change.

@vshankar
Copy link
Contributor

So, if the mgr is updated and a spec using Y exist in the DB, then that's not a valid spec, right?

that's right

Did that change make it to a release? We have to do something about it if the change made it to a release.

yes, the change has made it to:

  • reef - 18.2.2
  • squid - 19.0.0

We can fix squid as it's still RC. We need a to get this fixed in reef.

@mchangir
Copy link
Contributor Author

So, if the mgr is updated and a spec using Y exist in the DB, then that's not a valid spec, right?

that's right

Did that change make it to a release? We have to do something about it if the change made it to a release.

yes, the change has made it to:

  • reef - 18.2.2
  • squid - 19.0.0

We can fix squid as it's still RC. We need a to get this fixed in reef.

IMO this PR along with relevant Release Notes to bring this to users' attention and requesting users to abstain from using 'Y' and instead reverting to use 'y' if it has been used in active retention spec would be sufficient.

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to change formatting for year here

# spec is empty or other than n,m,h,d,w,M,Y

and
raise ValueError('invalid schedule specified - period should be '
'non-zero positive value and multiplier should '
'be one of h,d,w,M,Y e.g. 1h or 4d etc.')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chrisphoffman thanks for catching this

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@neesingh-rh thanks .. this is fixed now

@mchangir mchangir force-pushed the mgr-snap_schedule-restore-yearly-spec-from-Y-to-y branch from 2685bc0 to e3fce09 Compare April 16, 2024 00:50
Copy link
Contributor

@rishabh-d-dave rishabh-d-dave left a comment

Choose a reason for hiding this comment

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

This PR branch has been merged in the testing branch now.

Introduced-by: ceph#53070
Fixes: https://tracker.ceph.com/issues/65350
Signed-off-by: Milind Changire <mchangir@redhat.com>
@mchangir mchangir force-pushed the mgr-snap_schedule-restore-yearly-spec-from-Y-to-y branch from e3fce09 to 7151415 Compare April 17, 2024 11:16
Copy link
Contributor

@rishabh-d-dave rishabh-d-dave left a comment

Choose a reason for hiding this comment

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

QA run was successful for this PR. QA run tooks some time due infra issues (specifically CentOS 9 issue) that were persistent in Sepia lab. Besides, there were new failues in the QA run, both related and unrelated to PRs on the testing branch.

However, since this PR has gone through change since it was merged in testing branch, it needs to be tested again.

I have collected few PRs and will start next QA in little time. @mchangir If current changes are final, shall I add this one to it right away?

@rishabh-d-dave rishabh-d-dave added wip-rishabh-testing2 and removed wip-rishabh-testing Rishabh's testing label labels Apr 26, 2024
@rishabh-d-dave
Copy link
Contributor

I've applied my other label, let me know if it shouldn't be put through testing.

rishabh-d-dave added a commit to rishabh-d-dave/ceph that referenced this pull request May 3, 2024
* refs/pull/56732/head:
	mgr/snap_schedule: restore yearly spec to lowercase y

Reviewed-by: Jos Collin <jcollin@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
Copy link
Contributor

@rishabh-d-dave rishabh-d-dave left a comment

Choose a reason for hiding this comment

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

QA run was successful - https://tracker.ceph.com/projects/cephfs/wiki/main#3-May-2024.

Testing took more time than expected because there were 25-30 new failures. Most of them caused by a PR in the testing branch but these were resolved on removing that PR.

@rishabh-d-dave
Copy link
Contributor

rishabh-d-dave commented May 3, 2024

make check result has been auto-deleted - https://jenkins.ceph.com/job/ceph-pull-requests/133444/. Relaunching make check job since merging is blocked without it.

@rishabh-d-dave
Copy link
Contributor

jenkins test make check

@rishabh-d-dave
Copy link
Contributor

Waiting for make check to finish so that I can proceed to merge.

@rishabh-d-dave
Copy link
Contributor

make check ran successfully - https://jenkins.ceph.com/job/ceph-pull-requests/134377/. Proceeding to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants