-
Notifications
You must be signed in to change notification settings - Fork 39
Add 'lago ovirt stop/start' #485
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
Conversation
2115710 to
0785a6a
Compare
| ) | ||
| elif host_obj.status == sdk4.types.HostStatus.INSTALL_FAILED: | ||
| raise RuntimeError('Host %s installation failed' % h.name) | ||
| elif host_obj.status == sdk4.types.HostStatus.NON_RESPONSIVE: |
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.
Why did you remove this check ?
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.
Because it failed the run, but after a few seconds the host reported 'UP' in the engine.
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.
So maybe add "allowed_exception" in "testlib.assert_true_within" ?
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.
Its not an exception :/ For the good and bad:
In [3]: from ovirtsdk4 import types
In [4]: type(types.HostStatus)
Out[4]: enum.EnumMeta
In [5]: type(types.HostStatus.NON_RESPONSIVE)
Out[5]: <enum 'HostStatus'>
There is some refactoring we can do here, with #483 or without, but I think we can do it later.
0785a6a to
87374dd
Compare
|
Erhm, while testing this I stumbled with this exception from the SDK: But the VM was actually stopped successfully on the engine side. While looking at the Ansible module earlier, I saw: def get_entity(service):
"""
Ignore SDK Error in case of getting an entity from service.
"""
entity = None
try:
entity = service.get()
except sdk.Error:
# We can get here 404, we should ignore it, in case
# of removing entity for example.
pass
return entity@machacekondra - Any idea if this is an expected behaviour? Maybe the nested call is the issue? ( |
|
This is some backend error, not Python SDK. Feel free to open an bug on it. |
87374dd to
8d9888a
Compare
1. Add 'start_all_vms' method. 2. Add 'lago ovirt start/stop'
8d9888a to
3b136c9
Compare
|
@machacekondra - I see, thanks. I removed the start L2 VMs from @gbenhaim - this is ready on my side. |
|
ci merge please |
Fixes: #463
Per what it is supposed to do - it seems to be working.
I tested it against OST 'basic_suite_master', after triggering
lago ovirt startthe iSCSI storage domain failed to start. On a second round(lago ovirt stop && lago ovirt start), one of the hosts became none-operational and was unable to connect to the storage domain(other host was fine, and the iSCSI domain came back to life too).