Skip to content

Commit 0de6045

Browse files
authored
[deployments] Mark Fluentd support as deprecated (#6339)
* [deployments] Mark Fluentd support as deprecated * fix ansible lint: Line too long * salt: Fix formatting of sls file with dep warning * puppet: Move deprecation warning to only log when install_fluentd is enabled * salt: Move deprecation warning to fluentd sls file * puppet: debug: disable strict mode when fluentd enabled * puppet: python booleans must be capitalized * puppet: Disable strict mode for custom vars on Windows * puppet: remove systemctl restart reference from windows testing * salt: use double quotes for deprecation string * salt: escape . in URL * puppet: Remove puppet service reload, unnecessary in testing * salt: set message in variable * salt: fix formatting of how to log * salt: remove header * Update CHANGELOG.md * Update deployments/ansible/CHANGELOG.md * Update deployments/chef/CHANGELOG.md * Update deployments/puppet/CHANGELOG.md * Add more references to the deprecation documentation
1 parent 3d42382 commit 0de6045

File tree

13 files changed

+54
-4
lines changed

13 files changed

+54
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ and the [opentelemetry-collector-contrib v0.128.0](https://github.com/open-telem
2121

2222
### 🚩 Deprecations 🚩
2323

24+
- (Splunk) `deployments`: Fluentd support has been deprecated in all mass deployments and will be removed in a future release.
25+
Please refer to [deprecation documentation](./docs/deprecations/fluentd-support.md) for more information ([#6339](https://github.com/signalfx/splunk-otel-collector/pull/6339))
2426
- (Splunk) `Windows installer script`: Fluentd support has been deprecated and will be removed in a future release. ([#6362](https://github.com/signalfx/splunk-otel-collector/pull/6362))
2527
Please refer to [deprecation documentation](https://github.com/signalfx/splunk-otel-collector/blob/main/docs/deprecations/fluentd-support.md) for more information.
2628
- (Contrib) `receiver/hostmetrics`: Mark `hostmetrics.process.onWindowsUseNewGetProcesses` feature gate as stable ([#32947](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/32947)

deployments/ansible/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
### 🚩 Deprecations 🚩
4+
5+
- Fluentd support has been deprecated and will be removed in a future release.
6+
Please refer to [deprecation documentation](../../docs/deprecations/fluentd-support.md) for more information ([#6339](https://github.com/signalfx/splunk-otel-collector/pull/6339))
7+
38
## ansible-v0.32.0
49

510
### 💡 Enhancements 💡

deployments/ansible/roles/collector/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ which allows setting up a proxy to download the collector binaries.
173173

174174
### Fluentd
175175

176+
> **_NOTE:_** Fluentd support has been deprecated and will be removed in a future release.
177+
> Please refer to [deprecation documentation](../../../../docs/deprecations/fluentd-support.md) for more information.
178+
176179
- `install_fluentd`: Whether to install/manage fluentd and dependencies for log
177180
collection. The dependencies include [capng_c](
178181
https://github.com/fluent-plugins-nursery/capng_c) for enabling

deployments/ansible/roles/collector/tasks/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
- name: Set Vars based on ansible_os_family
1515
ansible.builtin.import_tasks: vars.yml
1616

17+
- name: Log deprecation warning when Fluentd is enabled
18+
debug:
19+
msg: |
20+
[DEPRECATION WARNING] Fluentd support has been deprecated and will be removed in a future release.
21+
Please refer to documentation on how to replace usage:
22+
https://github.com/signalfx/splunk-otel-collector/blob/main/docs/deprecations/fluentd-support.md
23+
when: install_fluentd
24+
1725
- name: Linux deployment
1826
ansible.builtin.import_tasks: linux_install.yml
1927
when: ansible_os_family != "Windows"

deployments/chef/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
### 🚩 Deprecations 🚩
4+
5+
- Fluentd support has been deprecated and will be removed in a future release.
6+
Please refer to [deprecation documentation](../../docs/deprecations/fluentd-support.md) for more information ([#6339](https://github.com/signalfx/splunk-otel-collector/pull/6339))
7+
38
## chef-v0.17.0
49

510
- Bug fix: Fix bug that caused custom variables to not be set when running on Windows

deployments/chef/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,9 @@ required `splunk_access_token` attribute and some optional attributes:
154154

155155
### Fluentd
156156

157+
> **_NOTE:_** Fluentd support has been deprecated and will be removed in a future release.
158+
> Please refer to [deprecation documentation](../../docs/deprecations/fluentd-support.md) for more information.
159+
157160
- `with_fluentd`: Whether to install/manage Fluentd and dependencies for log
158161
collection. On Linux, the dependencies include [capng_c](
159162
https://github.com/fluent-plugins-nursery/capng_c) for enabling

deployments/chef/recipes/default.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
end
4242

4343
if node['splunk_otel_collector']['with_fluentd'].to_s.downcase == 'true'
44+
Chef::Log.deprecation('Fluentd support has been deprecated and will be removed in a future release. Please refer to documentation on how to replace usage: https://github.com/signalfx/splunk-otel-collector/blob/main/docs/deprecations/fluentd-support.md')
4445
include_recipe 'splunk_otel_collector::fluentd_win_install'
4546
end
4647
elsif platform_family?('debian', 'rhel', 'amazon', 'suse')

deployments/puppet/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
## Unreleased
44

5+
### 🚩 Deprecations 🚩
6+
7+
- Fluentd support has been deprecated and will be removed in a future release.
8+
Please refer to [deprecation documentation](../../docs/deprecations/fluentd-support.md) for more information ([#6339](https://github.com/signalfx/splunk-otel-collector/pull/6339))
9+
510
### 💡 Enhancements 💡
611

712
- Add support for the `collector_command_line_args` option to

deployments/puppet/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ This class accepts the following parameters:
7878

7979
### Fluentd
8080

81+
> **_NOTE:_** Fluentd support has been deprecated and will be removed in a future release.
82+
> Please refer to [deprecation documentation](../../docs/deprecations/fluentd-support.md) for more information.
83+
8184
| Name | Description | Default value |
8285
|:-------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------|
8386
| `with_fluentd` | Whether to install/manage fluentd and dependencies for log collection. **Note**: On Linux, the dependencies include [capng_c](https://github.com/fluent-plugins-nursery/capng_c) for enabling [Linux capabilities](https://docs.fluentd.org/deployment/linux-capability), [fluent-plugin-systemd](https://github.com/fluent-plugin-systemd/fluent-plugin-systemd) for systemd journal log collection, and the [required libraries/development tools](https://github.com/signalfx/splunk-otel-collector/blob/main/docs/getting-started/linux-installer.md#fluentd-configuration). | `false` |

deployments/puppet/manifests/init.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@
218218
}
219219

220220
if $install_fluentd {
221+
deprecation('with_fluentd', 'Fluentd support has been deprecated and will be removed in a future release. Please refer to documentation on how to replace usage: https://github.com/signalfx/splunk-otel-collector/blob/main/docs/deprecations/fluentd-support.md')
222+
221223
case $facts['os']['family'] {
222224
'debian': {
223225
package { ['build-essential', 'libcap-ng0', 'libcap-ng-dev', 'pkg-config']:

deployments/salt/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ splunk-otel-collector:
115115

116116
### Fluentd
117117

118+
> **_NOTE:_** Fluentd support has been deprecated and will be removed in a future release.
119+
> Please refer to [deprecation documentation](../../docs/deprecations/fluentd-support.md) for more information.
120+
118121
- `install_fluentd`: Whether to install/manage fluentd and dependencies for log
119122
collection. The dependencies include [capng_c](
120123
https://github.com/fluent-plugins-nursery/capng_c) for enabling

deployments/salt/splunk-otel-collector/fluentd.sls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% set message = 'Fluentd support has been deprecated and will be removed in a future release. Please refer to documentation on how to replace usage: https://github.com/signalfx/splunk-otel-collector/blob/main/docs/deprecations/fluentd-support.md' %}
2+
{%- do salt["log.warning"](message) -%}
3+
14
{% set splunk_fluentd_config = salt['pillar.get']('splunk-otel-collector:splunk_fluentd_config', '/etc/otel/collector/fluentd/fluent.conf') %}
25

36
{% set fluentd_repo_base = salt['pillar.get']('splunk-otel-collector:fluentd_repo_base', 'https://packages.treasuredata.com') %}

packaging/tests/deployments/puppet/puppet_test.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,16 @@
7474
}
7575

7676

77-
def run_puppet_apply(container, config):
77+
def run_puppet_apply(container, config, strict_mode=True):
7878
with tempfile.NamedTemporaryFile(mode="w+") as fd:
7979
print(config)
8080
fd.write(config)
8181
fd.flush()
8282
copy_file_into_container(container, fd.name, "/root/test.pp")
8383

84+
if not strict_mode:
85+
assert container.exec_run("puppet config set strict warning --section main").exit_code == 0
86+
8487
code, output = container.exec_run("puppet apply --detailed-exitcodes /root/test.pp")
8588
print(output.decode("utf-8"))
8689

@@ -216,7 +219,8 @@ def test_puppet_with_custom_vars(distro, puppet_release):
216219
api_url = "https://fake-splunk-api.com"
217220
ingest_url = "https://fake-splunk-ingest.com"
218221
config = CUSTOM_VARS_CONFIG.substitute(api_url=api_url, ingest_url=ingest_url, version="0.126.0")
219-
run_puppet_apply(container, config)
222+
# TODO: When Fluentd is removed and `with_fluentd` is false, the strict_mode option can be removed.
223+
run_puppet_apply(container, config, strict_mode=False)
220224
verify_package_version(container, "splunk-otel-collector", "0.126.0")
221225
verify_env_file(container, api_url, ingest_url, "fake-hec-token")
222226
verify_config_file(container, SPLUNK_ENV_PATH, "SPLUNK_LISTEN_INTERFACE", "0.0.0.0")
@@ -455,7 +459,7 @@ def test_puppet_with_custom_instrumentation(distro, puppet_release, version, wit
455459

456460
WIN_COLLECTOR_VERSION = os.environ.get("WIN_COLLECTOR_VERSION", "123.456.789") # Windows require a pre-defined version, use an inexistent version to force a test failure
457461

458-
def run_win_puppet_setup(puppet_release):
462+
def run_win_puppet_setup(puppet_release, strict_mode=True):
459463
assert has_choco(), "choco not installed!"
460464
if puppet_release == "latest":
461465
run_win_command(f"choco upgrade -y -f puppet-agent")
@@ -470,6 +474,8 @@ def run_win_puppet_setup(puppet_release):
470474
run_win_command("puppet module install puppetlabs-powershell")
471475
run_win_command("puppet module install puppetlabs-registry")
472476

477+
if not strict_mode:
478+
run_win_command("puppet config set strict warning --section main")
473479

474480
def run_win_puppet_agent(config):
475481
with tempfile.TemporaryDirectory() as tmpdir:
@@ -516,7 +522,8 @@ class {{ splunk_otel_collector:
516522
@pytest.mark.windows
517523
@pytest.mark.skipif(sys.platform != "win32", reason="only runs on windows")
518524
def test_win_puppet_custom_vars():
519-
run_win_puppet_setup(WIN_PUPPET_RELEASE)
525+
# TODO: Remove strict_mode option when fluentd is disabled or removed
526+
run_win_puppet_setup(WIN_PUPPET_RELEASE, strict_mode=False)
520527

521528
api_url = "https://fake-splunk-api.com"
522529
ingest_url = "https://fake-splunk-ingest.com"

0 commit comments

Comments
 (0)