-
Notifications
You must be signed in to change notification settings - Fork 11
Add parameters and some errors to support HyperSwap and multi-site #20
base: develop
Are you sure you want to change the base?
Conversation
|
pyxcli/errors.py, line 718 at r1 (raw file):
Why did you remove the StorageObjectIsNotInDomain exception? exception? |
|
pyxcli/mirroring/recovery_manager.py, line 283 at r1 (raw file):
Instead of writing the same 10 lines twice, I suggest setting the existing kwargs, and after it - conditionally - add the new argument |
|
pyxcli/errors.py, line 715 at r1 (raw file):
This is a VERY long list of exceptions. I bet many of them do not even exist on the storage, and probably most of them are not needed. You can ask core/architecture guys for clarifications on what is needed (e.g. Daniel Aizer) . |
alonm
left a comment
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.
Reviewed 4 of 4 files at r1.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @xcnix)
|
pyxcli/errors.py, line 718 at r1 (raw file): Previously, alonm wrote…
Good catch, please don't delete existing errors. |
|
pyxcli/mirroring/recovery_manager.py, line 283 at r1 (raw file): Previously, alonm wrote…
+1 |
|
Thanks for the suggestion, I updated the code, please help to review again. |
Hi Alon, I deleted some events which might not be used now and future, please help to review the change, Thanks. |
|
pyxcli/errors.py, line 795 at r2 (raw file):
StorageObjectIsNotInDomain appears twice. |
|
pyxcli/mirroring/cg_recovery_manager.py, line 108 at r2 (raw file):
It looks like you are breaking backwards compatibility with this change. I would take a different approach by setting a default value of None. Then below, I would check, if the value is not None, I would add it to kwargs, instead of adding it and then removing it if the value is "no". Please fix accordingly. |
|
pyxcli/mirroring/recovery_manager.py, line 307 at r2 (raw file):
Please see my comment above, only add to kwargs if the value is not None. |
ranhrl
left a comment
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.
Reviewed 2 of 2 files at r2.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @alonm and @xcnix)
pyxcli/mirroring/recovery_manager.py, line 295 at r2 (raw file):
'schedule': schedule, 'remote_schedule': remote_schedule, 'part_of_multisite': part_of_multisite
Instead of adding it and then removing it,
|
pyxcli/mirroring/recovery_manager.py, line 295 at r2 (raw file): Previously, ranhrl (Ran Harel) wrote…
+1. Nice catch |
Thanks, This is a much better method. I think original code will take out it if this value if None. |
Thanks, already deleted dup class |
ranhrl
left a comment
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.
Reviewed 4 of 4 files at r3.
Reviewable status: all files reviewed, 7 unresolved discussions (waiting on @alonm, @ranhrl, and @xcnix)
ranhrl
left a comment
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.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @alonm and @xcnix)
|
pyxcli/mirroring/recovery_manager.py, line 295 at r3 (raw file):
did you check that this works with older storage systems that did not have this parameter? I think it will break... |
| h, p, ssl) | ||
|
|
||
| @classmethod | ||
| def connect(cls, hostname, port, timeout=5.0): |
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.
Did the network get slower these days? You need a very good reason to change this.
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.
@alonm, for HyperSwap/multisite creation and deletion scenario, commands take more than 5 seconds to respond. sometimes it takes 30s.
Can we change timeout to a configurable value, so third party module can change this value on demands ?
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.
This is an optional parameter. The third-party module can specify this value on demand - so there is no reason to change this.
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.
@alonm, XIV cinder driver use this method to initialize xcli connection
try: LOG.debug('connect_multiendpoint_ssl with: %s', address) xcli = client.XCLIClient.connect_multiendpoint_ssl( user, clear_pass, address, ca_certs=path)
but this method does not support timeout parameter
def connect_multiendpoint_ssl(cls, user, password, endpoints, auto_discover=True, ca_certs=None, validate=None):
|
pyxcli/mirroring/recovery_manager.py, line 295 at r3 (raw file): Previously, alonm wrote…
Did you check this with old storage systems? It is better to set the rpo value only if it's needed, instead of setting it to null. |
|
pyxcli/transports.py, line 157 at r5 (raw file):
I'm afraid I wasn't clear on my previous comment. You should not increase the timeout - unless you have a VERY good reason to do so. If you have such a reason, please provide it. |
alonm
left a comment
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.
Reviewed 2 of 2 files at r2.
Reviewable status: 3 of 5 files reviewed, 3 unresolved discussions (waiting on @ranhrl and @xcnix)
ranhrl
left a comment
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.
Reviewed 2 of 2 files at r6.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @alonm and @xcnix)
pyxcli/transports.py, line 157 at r5 (raw file):
Previously, alonm wrote…
I'm afraid I wasn't clear on my previous comment. You should not increase the timeout - unless you have a VERY good reason to do so. If you have such a reason, please provide it.
+1
|
|
pyxcli/errors.py, line 1433 at r6 (raw file):
please add comment |
|
pyxcli/transports.py, line 157 at r5 (raw file): Previously, ranhrl (Ran Harel) wrote…
+1 |
|
No need to add multisite support? |
Multisite support is required. |
PowerVC team and China team have test new timeout value for several months. |
Add parameters (part_of_multisite) and some error codes(completion code during Creation of HyperSwap and multi-site volumes)
This change is