-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Allow to set incident date when rebuilding #2011
Allow to set incident date when rebuilding #2011
Conversation
oio/cli/admin/xcute/rawx.py
Outdated
'(see "openio volume admin show").') | ||
parser.add_argument( | ||
'--set-specific-incident-date', type=int, | ||
help='Set a specific incident date to rebuild from this date. ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add (seconds since Epoch)
0343824
to
6f8690a
Compare
oio/xcute/jobs/blob_rebuilder.py
Outdated
cls.DEFAULT_DECLARE_INCIDENT_DATE): | ||
set_incident_date = int(time.time()) | ||
if set_incident_date is not None: | ||
sanitized_job_params['set_incident_date'] = set_incident_date |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we keep two parameters on top of having two flags? I don't really see any reason in favor of merging them, it may be confusing when you show a job, and it will certainly raises questions on the UI side as to why a parameter disappeared after the creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it will be clearer for the user.
$ openio-admin xcute rawx rebuild -c config.params.set_incident_date -c config.params.set_specific_incident_date 127.0.0.1:6010
+------------------------------------------+----------------------------------+
| Field | Value |
+------------------------------------------+----------------------------------+
| config.params.set_incident_date | False |
| config.params.set_specific_incident_date | None |
+------------------------------------------+----------------------------------+
$ openio-admin xcute rawx rebuild -c config.params.set_incident_date -c config.params.set_specific_incident_date 127.0.0.1:6010 --set-incident-date
+------------------------------------------+----------------------------------+
| Field | Value |
+------------------------------------------+----------------------------------+
| config.params.set_incident_date | True |
| config.params.set_specific_incident_date | 1585815292 |
+------------------------------------------+----------------------------------+
$ openio-admin xcute rawx rebuild -c config.params.set_incident_date -c config.params.set_specific_incident_date 127.0.0.1:6010 --set-specific-incident-date 1685815292
+------------------------------------------+----------------------------------+
| Field | Value |
+------------------------------------------+----------------------------------+
| config.params.set_incident_date | True |
| config.params.set_specific_incident_date | 1685815292 |
+------------------------------------------+----------------------------------+
$ openio-admin xcute rawx rebuild -c config.params.set_incident_date -c config.params.set_specific_incident_date 127.0.0.1:6010 --set-incident-date --set-specific-incident-date 1785815292
+------------------------------------------+----------------------------------+
| Field | Value |
+------------------------------------------+----------------------------------+
| config.params.set_incident_date | True |
| config.params.set_specific_incident_date | 1785815292 |
+------------------------------------------+----------------------------------+
6f8690a
to
61bbcaf
Compare
SUMMARY
Allow to set incident date when rebuilding
ISSUE TYPE
COMPONENT NAME
xcute
SDS VERSION