Skip to content
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

Conversation

AymericDu
Copy link
Member

SUMMARY

Allow to set incident date when rebuilding

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • xcute
SDS VERSION
openio 5.3.1.dev10

'(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. '
Copy link
Contributor

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)

@AymericDu AymericDu force-pushed the xcute-allow-to-set-incident-date-when-rebuilding branch from 0343824 to 6f8690a Compare March 30, 2020 12:41
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
Copy link
Contributor

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.

Copy link
Member Author

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                       |
+------------------------------------------+----------------------------------+

@AymericDu AymericDu force-pushed the xcute-allow-to-set-incident-date-when-rebuilding branch from 6f8690a to 61bbcaf Compare April 2, 2020 08:22
@open-io open-io locked and limited conversation to collaborators Apr 13, 2020
@open-io open-io unlocked this conversation Apr 13, 2020
@fvennetier fvennetier merged commit 121be67 into open-io:5.x Apr 14, 2020
@AymericDu AymericDu deleted the xcute-allow-to-set-incident-date-when-rebuilding branch April 14, 2020 08:41
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants