-
Notifications
You must be signed in to change notification settings - Fork 292
CA-290471: fix wrong token timeout in XenCenter #3611
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
Merged
edwintorok
merged 2 commits into
xapi-project:feature/REQ477/master
from
edwintorok:private/edvint/CA-290471
May 31, 2018
Merged
CA-290471: fix wrong token timeout in XenCenter #3611
edwintorok
merged 2 commits into
xapi-project:feature/REQ477/master
from
edwintorok:private/edvint/CA-290471
May 31, 2018
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use same units in the object and in the API. The timeout set by XenCenter 20000s, which is wrong, it should've been 20s (which is what you get from the CLI). XenCenter creates an object and then reads the field to find out the default, because the SDK doesn't expose the defaults for parameters. So we should really use the same units for API parameters and internal object fields. Especially that this field is not used by XAPI at all, it is only there so that the admin can inspect what values were used to create the cluster. Changing this field will not change the actual timeouts used by the cluster, because the timeout values cannot be changed at runtime. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
5e86264
to
0db0d49
Compare
minishrink
approved these changes
May 29, 2018
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.
Looks good.
ocaml/idl/datamodel_cluster.ml
Outdated
; field ~qualifier:StaticRO ~lifecycle:[ | ||
Prototyped, rel_kolkata, "the unit is milliseconds"; | ||
Changed, rel_lima, "the unit is now seconds" | ||
] |
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.
You could create a value for this specific lifecycle instead of passing it twice
edwintorok
added a commit
that referenced
this pull request
Jun 7, 2018
* CA-290471: fix wrong token timeout in XenCenter Use same units in the object and in the API. The timeout set by XenCenter 20000s, which is wrong, it should've been 20s (which is what you get from the CLI). XenCenter creates an object and then reads the field to find out the default, because the SDK doesn't expose the defaults for parameters. So we should really use the same units for API parameters and internal object fields. Especially that this field is not used by XAPI at all, it is only there so that the admin can inspect what values were used to create the cluster. Changing this field will not change the actual timeouts used by the cluster, because the timeout values cannot be changed at runtime. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
rwdrich
pushed a commit
to rwdrich/xen-api
that referenced
this pull request
Aug 23, 2018
* CA-290471: fix wrong token timeout in XenCenter Use same units in the object and in the API. The timeout set by XenCenter 20000s, which is wrong, it should've been 20s (which is what you get from the CLI). XenCenter creates an object and then reads the field to find out the default, because the SDK doesn't expose the defaults for parameters. So we should really use the same units for API parameters and internal object fields. Especially that this field is not used by XAPI at all, it is only there so that the admin can inspect what values were used to create the cluster. Changing this field will not change the actual timeouts used by the cluster, because the timeout values cannot be changed at runtime. Signed-off-by: Edwin Török <edvin.torok@citrix.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use same units for object default value and parameter default value, see commit message for explanation.
Tested by installing latest feature branch build, replacing xapi, and it has correctly updated the field in the database. The next time we build an SDK and rebuild XenCenter then XenCenter should get the correct value as well.