-
Notifications
You must be signed in to change notification settings - Fork 91
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
roles: hosted_engine_setup: Add after_add_host hook #181
Conversation
Didn't verify yet. |
@didib, The code looks good to me, but I didn't understand why we need to add another place for running hooks if the workaround from https://bugzilla.redhat.com/show_bug.cgi?id=1893385#c0 works. |
The workaround is not a full solution - after you apply it, you still have to eventually setup the networks as needed and mark them required. And during this, they are not required. With current patch, the user has an option to automatically handle failures after trying to add the host, presumably (I didn't try yet) by assigning relevant NICs to the required networks and trying to activate, therefore never marking them as non-required. I intend to also add another "wait for lockfile" (similar to he_pause_host, but perhaps mandatory, we'll see), to also allow manually fixing, for people that prefer that.
Sure. |
I don't like github. It seems like the only way for me to mark this PR as not-ready-for-merge is to change it to a draft. In gerrit I can '-1'. Here, if I try to add a comment and mark "Request Changes", a popup says "Pull request authors can't request changes on their own pull request". Searching for this text in google finds very few other people that care. Github simply managed to dumb-down everyone to not expect more, it seems. |
Maybe you can just add |
I've created a WIP label for such patches, let's agree that not maintainer will merge a patch with WIP label. Is it OK for everyone? |
OK for me. |
1 similar comment
OK for me. |
It seems that only people with write access to the repo can assign labels: (And no, the answer isn't "OK, so we'll give you write access". IMO). |
Martin, is there some easy way how to have a bot watching for certain string in comments and setting labels accordingly? Something similar to ManageIQ bot https://github.com/ManageIQ/miq_bot where they can use below comment to add a label
|
Allow running custom playbooks after trying to add the host to the engine. Bug-Url: https://bugzilla.redhat.com/1893385
cut -d' ' also works, but both emacs and vi syntax-highlight this wrongly, and IMO it's less common. See also e.g.: https://stackoverflow.com/questions/10818443/short-long-options-with
…ing events If we failed due to a missing required network, this will be logged as a warning, not error. Collect that as well. Bug-Url: https://bugzilla.redhat.com/1893385
a4f7363
to
10dc597
Compare
ci test please |
037bd9f
to
da4bcc2
Compare
Verified both manual (let it fail adding, prompt, add via web ui and rm lock file) and automatic (using the example hook). |
ci please test |
E.g., this broke: { "code": 10812, "custom_id": -1, "data_center": { "href": "/ovirt-engine/api/datacenters/71466c1a-29ab-11eb-858c-00163e2ccc71", "id": "71466c1a-29ab-11eb-858c-00163e2ccc71", "name": "Default" }, "description": "Data Center Default compatibility version is 4.3, which is lower than latest available version 4.5. Please upgrade your Data Center to latest version to successfu lly finish upgrade of your setup.", "flood_rate": 0, "href": "/ovirt-engine/api/events/160", "id": "160", "index": 160, "origin": "oVirt", "severity": "alert", "time": "2020-11-23 16:20:14.437000+02:00" }, With: The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'host' Because it's an event about a Data Center, so has no 'host'. Similarly, this failed with no 'id': { "code": 986, "correlation_id": "35d151aa", "custom_id": -1, "data_center": { "href": "/ovirt-engine/api/datacenters/71466c1a-29ab-11eb-858c-00163e2ccc71", "id": "71466c1a-29ab-11eb-858c-00163e2ccc71", "name": "Default" }, "description": "Data Center is being initialized, please wait for initialization to complete.", "flood_rate": 0, "host": { "name": "Unavailable" }, "href": "/ovirt-engine/api/events/46", "id": "46", "index": 46, "origin": "oVirt", "severity": "warning", "time": "2020-11-18 16:54:54.407000+02:00", "user": { "name": "SYSTEM" } },
availible -> available
da4bcc2
to
2d8a88f
Compare
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.
LGTM
Anything else? I think it's ready for merge. I don't mind squashing and/or splitting to separate PRs and opening bugs for some things, if you want (e.g. fixing error/warning collection). |
Allow running custom playbooks after trying to add the host to the
engine.
Bug-Url: https://bugzilla.redhat.com/1893385