-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Remove huaweicloud - revert #27607 #35184
Conversation
The huaweicloud is just openstack therefore revert #27607 to fix detection of all public and private openstack installations.
💚 CLA has been signed |
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
@elastic/obs-cloud-monitoring I believe this processor belongs to your team. Could someone take a look at it? @mstinsky I see you haven't signed the Contributor Agreement yet. Could you follow the instructions on the link and sign it? |
@belimawr thats strange I signed the license agreement last week when I opened this PR. Do I need to do anything that it registers here correctly? |
Thanks @mstinsky for your contribution. Is there a way to fix the issue instead of removing huaweicloud support? This would be a breaking change for users who are using this add_cloud_metadata processor for huaweicloud. |
@kaiyan-sheng I am an operator of an openstack cloud and not using any huaweicloud service. As such I have no idea of the internal working of the huaweicloud other then that the huaweicloud is using openstack. |
I was thinking about this issue a bit more and have another arguement to remove huaweicloud from beats @kaiyan-sheng. There are a lot of other public available clouds that use openstack under the hood like OVH, Open Telekom Cloud, Cleura, VEXXHOST and many more. |
This pull request is now in conflicts. Could you fix it? 🙏
|
Like @mstinsky highlighted, the implementation is literally checking if it is running inside of openstack and then labeling it as being huawei. That is clearly insufficient to identity Huawei. It needs to have additional selection criteria (like checking another API that is huawei specific) OR huawei should be disabled by default OR removed entirely. (My least favorite fix is to disable it by default because the implementation would still be broken. We would have to disallow enabling openstack and huawei detection at the same time.) beats/libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go Lines 49 to 50 in 90cd631
|
@andrewkroh whats the plan here? Do we move forward with removing huaweicloud? |
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.
It would be a breaking change to remove huawei
as a configuration value for providers
. Existing users that have huawei
explicitly in their config should continue working. Perhaps we could internally treat huawei
an alias for openstack
. If both openstack
and huawei
are configured, then the implementation would need to ensure that only one provider actually gets instantiated .
In the docs I think it should probably state that
huawei
is an alias foropenstack
. Hauwei Cloud operates on OpenStack. Thecloud.provider
will be reported asopenstack
.
In the release notes (see CHANGELOG.next.asciidoc
) we would want to put an entry into the breaking changes section.
- add_cloud_metadata - The
huawei
provider is now treated asopenstack
. Huawei Cloud runs on OpenStack, and from a metadata API perspective it is indistinguishable from OpenStack. If you know that your deployments only run on Huawei Cloud and you want thecloud.provider
value to continue reporting ashuawei
, then you could overwrite the value using a processor (e.g.add_fields:{"when.equals.cloud.provider":"openstack","target":"cloud","fields":{"provider":"huawei"}}}
). {issue}31022[31022] {pull}35184[35184]
Also fwiw, I am not the codeowner on this processor so the final approval will be in someone else's hands.
Can we get any feedback here from a codeowner on how to proceed with this issue? |
@elastic/obs-cloud-monitoring WDYT about the approach I laid out in my previous comment for removing the huawei provider? |
@andrewkroh I think treating huawei as an alias and removing it should work at least for the short term. We are trying to prioritize the work of fixing the add_cloud_metadata processor but no clue if we will even find a solution for huawei vs OpenStack tbh. |
@andrewkroh WDYT about instead of completely removing Something like this:
|
That could work (not commenting on the patch), the processor would need to enforce a restriction that |
I am neither a go developer nor do I have good knowledge about the filebeat codebase. Also I would like to bring up my argument from #35184 (comment) once more. |
@mstinsky @andrewkroh Thank you both for the comments! I agree with your argument about having special case for huawei can be problematic in the future. Let's make huawei an alias for OpenStack and keep it as a provider option, so we are not breaking anyone then! |
@kaiyan-sheng would you be willing to provide a patch for that? |
❕ Build Aborted
Expand to view the summary
Build stats
Steps errorsExpand to view the steps failures
|
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsExpand to view the GitHub comments
To re-run your PR in the CI, just comment with:
|
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsExpand to view the GitHub comments
To re-run your PR in the CI, just comment with:
|
* Remove huaweicloud - revert #27607 The huaweicloud is just openstack therefore revert #27607 to fix detection of all public and private openstack installations. * make huawei an alias for openstack * change doc * Update CHANGELOG.next.asciidoc --------- Co-authored-by: kaiyan-sheng <[email protected]> (cherry picked from commit 07c559b) # Conflicts: # libbeat/processors/add_cloud_metadata/docs/add_cloud_metadata.asciidoc # libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go # libbeat/processors/add_cloud_metadata/provider_huawei_cloud_test.go # libbeat/processors/add_cloud_metadata/providers.go
* Remove huaweicloud - revert #27607 The huaweicloud is just openstack therefore revert #27607 to fix detection of all public and private openstack installations. * make huawei an alias for openstack * change doc * Update CHANGELOG.next.asciidoc --------- Co-authored-by: kaiyan-sheng <[email protected]> (cherry picked from commit 07c559b)
* Remove huaweicloud - revert #27607 (#35184) * Remove huaweicloud - revert #27607 The huaweicloud is just openstack therefore revert #27607 to fix detection of all public and private openstack installations. * make huawei an alias for openstack * change doc * Update CHANGELOG.next.asciidoc --------- Co-authored-by: kaiyan-sheng <[email protected]> (cherry picked from commit 07c559b) * Update CHANGELOG.next.asciidoc * fix footnote --------- Co-authored-by: Maximilian Stinsky <[email protected]> Co-authored-by: kaiyan-sheng <[email protected]>
* Remove huaweicloud - revert #27607 (#35184) * Remove huaweicloud - revert #27607 The huaweicloud is just openstack therefore revert #27607 to fix detection of all public and private openstack installations. * make huawei an alias for openstack * change doc * Update CHANGELOG.next.asciidoc --------- Co-authored-by: kaiyan-sheng <[email protected]> (cherry picked from commit 07c559b) # Conflicts: # libbeat/processors/add_cloud_metadata/docs/add_cloud_metadata.asciidoc # libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go # libbeat/processors/add_cloud_metadata/provider_huawei_cloud_test.go # libbeat/processors/add_cloud_metadata/providers.go * Update CHANGELOG.next.asciidoc * Update add_cloud_metadata.asciidoc * Update providers.go * fix doc * fix lint --------- Co-authored-by: Maximilian Stinsky <[email protected]> Co-authored-by: kaiyan-sheng <[email protected]>
* Remove huaweicloud - revert elastic#27607 The huaweicloud is just openstack therefore revert elastic#27607 to fix detection of all public and private openstack installations. * make huawei an alias for openstack * change doc * Update CHANGELOG.next.asciidoc --------- Co-authored-by: kaiyan-sheng <[email protected]>
What does this PR do?
This PR removes the huaweicloud from beats. The huaweicloud is just a openstack installation so since PR #27607 got merged all public and private openstack clouds can get detected as huaweicloud.
All the following lines from the huawei part are plain openstack [1] and are avaiable by every openstack metadata agent.
[1] https://github.com/elastic/beats/blob/main/libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go#L49-L50
Why is it important?
As described above all openstack clouds may get detected as a huaweicloud.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues