Skip to content

Commit

Permalink
Remove huaweicloud - revert #27607 (#35184)
Browse files Browse the repository at this point in the history
* 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 <kaiyan.sheng@elastic.co>
  • Loading branch information
mstinsky and kaiyan-sheng committed Feb 1, 2024
1 parent eae57f9 commit 07c559b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 197 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
*Affecting all Beats*

- Upgrade to Go 1.21.6. Removes support for Windows 8.1. See https://tip.golang.org/doc/go1.21#windows. {pull}37615[37615]
- add_cloud_metadata processor: `huawei` provider is now treated as `openstack`. Huawei cloud runs on OpenStack
platform, and when viewed from a metadata API standpoint, it is impossible to differentiate it from OpenStack. If you
know that your deployments run on Huawei Cloud exclusively, and you wish to have `cloud.provider` value as `huawei`,
you can achieve this by overwriting the value using an `add_fields` processor. {pull}35184[35184]

*Auditbeat*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ The following cloud providers are supported:
- Google Compute Engine (GCE)
- https://www.qcloud.com/?lang=en[Tencent Cloud] (QCloud)
- Alibaba Cloud (ECS)
- Huawei Cloud (ECS)
- Huawei Cloud (ECS)footnote:[`huawei` is an alias for `openstack`. Huawei cloud runs on OpenStack platform, and when
viewed from a metadata API standpoint, it is impossible to differentiate it from OpenStack. If you know that your
deployments run on Huawei Cloud exclusively, and you wish to have `cloud.provider` value as `huawei`, you can achieve
this by overwriting the value using an `add_fields` processor.]
- Azure Virtual Machine
- Openstack Nova
- Hetzner Cloud
Expand Down Expand Up @@ -53,10 +56,9 @@ List of names the `providers` setting supports:
- "digitalocean" for Digital Ocean (enabled by default).
- "aws", or "ec2" for Amazon Web Services (enabled by default).
- "gcp" for Google Copmute Enging (enabled by default).
- "openstack", or "nova" for Openstack Nova (enabled by default).
- "openstack", "nova", or "huawei" for Openstack Nova (enabled by default).
- "openstack-ssl", or "nova-ssl" for Openstack Nova when SSL metadata APIs are enabled (enabled by default).
- "tencent", or "qcloud" for Tencent Cloud (disabled by default).
- "huawei" for Huawei Cloud (enabled by default).
- "hetzner" for Hetzner Cloud (enabled by default).

The third optional configuration setting is `overwrite`. When `overwrite` is
Expand Down Expand Up @@ -128,20 +130,6 @@ _Tencent Cloud_
}
-------------------------------------------------------------------------------

_Huawei Cloud_

[source,json]
-------------------------------------------------------------------------------
{
"cloud": {
"availability_zone": "cn-east-2b",
"instance.id": "37da9890-8289-4c58-ba34-a8271c4a8216",
"provider": "huawei",
"region": "cn-east-2"
}
}
-------------------------------------------------------------------------------

_Alibaba Cloud_

This metadata is only available when VPC is selected as the network type of the
Expand Down
81 changes: 0 additions & 81 deletions libbeat/processors/add_cloud_metadata/provider_huawei_cloud.go

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion libbeat/processors/add_cloud_metadata/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ var cloudMetaProviders = map[string]provider{
"nova-ssl": openstackNovaSSLMetadataFetcher,
"qcloud": qcloudMetadataFetcher,
"tencent": qcloudMetadataFetcher,
"huawei": huaweiMetadataFetcher,
"huawei": openstackNovaMetadataFetcher,
"hetzner": hetznerMetadataFetcher,
}

Expand Down

0 comments on commit 07c559b

Please sign in to comment.