fluent-bit icon indicating copy to clipboard operation
fluent-bit copied to clipboard

Remove duplicate slash in systemd file

Open MindTooth opened this issue 2 years ago β€’ 25 comments

Fixes #6619.

As I'm sitting on macOS (M1). How to I create a package for me to test the changes? I've tried adding --platform linux/amd64 to packages/build.sh, but then the script failed.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing Before we can approve your change; please submit the following in a comment:

  • [ ] Example configuration file for the change
  • [ ] Debug log output from testing the change
  • [ ] Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

  • [ ] Run local packaging test showing all targets (including any new ones) build.
  • [ ] Set ok-package-test label to test for all targets (requires maintainer to do).

Documentation

  • [ ] Documentation required for this feature

Backporting

  • [ ] Backport to latest stable release.

Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

MindTooth avatar Mar 22 '23 12:03 MindTooth

As I'm sitting on macOS (M1). How to I create a package for me to test the changes? I've tried adding --platform linux/amd64 to packages/build.sh, but then the script failed.

Good question and one not hugely considered so far but there are some ways to inject extra params - that option is docker specific so would need to apply there plus you don't want it for the ARM64 builds. My suggestion would be just to build an ARM64 build, e.g. ./packaging/build.sh -d centos/7.arm64v8

I will trigger a build for all targets here which should give you the packages to download from the workflow run.

patrick-stephens avatar Mar 22 '23 12:03 patrick-stephens

Think I'm a bit new to this. πŸ˜… Where is the built packages? Server in question is Ubuntu 22.04.

MindTooth avatar Mar 22 '23 16:03 MindTooth

https://github.com/fluent/fluent-bit/actions/runs/4490278141?pr=7050 has downloadable packages for all targets.

patrick-stephens avatar Mar 23 '23 09:03 patrick-stephens

On AlmaLinux 9, it's now correct:

[Unit]
Description=Fluent Bit
Documentation=https://docs.fluentbit.io/manual/
Requires=network.target
After=network.target

[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/fluent-bit
EnvironmentFile=-/etc/default/fluent-bit
ExecStart=/opt/fluent-bit/bin/fluent-bit -c /etc/fluent-bit/fluent-bit.conf
Restart=always

[Install]
WantedBy=multi-user.target
$ /opt/fluent-bit/bin/fluent-bit --version
Fluent Bit v2.1.0 

However, the Debian/Ubuntu package is missing the systemd file entirely. πŸ€·πŸ»β€β™‚οΈ Downloading the upstream package from the repo contains the systemd file.

MindTooth avatar Mar 24 '23 10:03 MindTooth

@patrick-stephens should we include this one ?

NOTE: I still see this as a draft

edsiper avatar Apr 14 '23 02:04 edsiper

@patrick-stephens should we include this one ?

NOTE: I still see this as a draft

Still draft, yes. πŸ˜… As mentioned, the deb-packages are missing the systemd files and can’t verify that they are fixed. The one for RHEL does have the fix.

MindTooth avatar Apr 14 '23 06:04 MindTooth

@patrick-stephens should we include this one ? NOTE: I still see this as a draft

Still draft, yes. sweat_smile As mentioned, the deb-packages are missing the systemd files and can’t verify that they are fixed. The one for RHEL does have the fix.

Are they missing or just in another format? Might be easier just to install into a local container to see: https://github.com/fluent/fluent-bit/blob/7d25c796160bd1f2bba476194f24298db4a0b521/packaging/test-release-packages.sh#L78-L96

patrick-stephens avatar Apr 14 '23 08:04 patrick-stephens

Are they missing or just in another format? Might be easier just to install into a local container to see:

The map systemd is missing all together. Meaning doing dpkg -i package does not add files related to systemd. Download one of the Debian-based packages and see that it does not contain it.

# Ubuntu
$ find data
data
data/etc
data/etc/fluent-bit
data/etc/fluent-bit/plugins.conf
data/etc/fluent-bit/parsers.conf
data/etc/fluent-bit/fluent-bit.conf
data/lib
data/lib/fluent-bit
data/lib/fluent-bit/libfluent-bit.so
data/opt
data/opt/fluent-bit
data/opt/fluent-bit/bin
data/opt/fluent-bit/bin/fluent-bit

vs.

# CentOS 9
$ find data
data
data/usr
data/usr/lib
data/usr/lib/.build-id
data/usr/lib/.build-id/67
data/usr/lib/.build-id/67/d17b87e47117a788853b6e1a4d691b01a4e027
data/usr/lib/.build-id/5c
data/usr/lib/.build-id/5c/4bec6f63427b2d61326d99a40697b429119cc1
data/usr/lib/systemd
data/usr/lib/systemd/system
data/usr/lib/systemd/system/fluent-bit.service
data/lib64
data/lib64/fluent-bit
data/lib64/fluent-bit/libfluent-bit.so
data/etc
data/etc/fluent-bit
data/etc/fluent-bit/plugins.conf
data/etc/fluent-bit/parsers.conf
data/etc/fluent-bit/fluent-bit.conf
data/opt
data/opt/fluent-bit
data/opt/fluent-bit/bin
data/opt/fluent-bit/bin/fluent-bit

MindTooth avatar Apr 14 '23 09:04 MindTooth

Hmm I'm concerned this is a larger issue then with the master branch. Need to check what is happening in the nightly builds: https://github.com/fluent/fluent-bit/actions/runs/4696876862

patrick-stephens avatar Apr 14 '23 09:04 patrick-stephens

Thanks for the fix. I’ll do a rebase on Monday and ask for a new pipeline run.

MindTooth avatar Apr 15 '23 16:04 MindTooth

Thanks for the fix. I’ll do a rebase on Monday and ask for a new pipeline run.

Rebased.

MindTooth avatar Apr 17 '23 10:04 MindTooth

Thanks for the talk at KubeCon yesterday. πŸ‘πŸ»

I've just verified that the package contains the unit file and is able to be installed and started on Ubuntu 22.04. By design you need to manually enable the service?

MindTooth avatar Apr 20 '23 11:04 MindTooth

By design you need to manually enable the service?

I believe this is dependent on the target and should just be whatever it did before.

patrick-stephens avatar Apr 24 '23 10:04 patrick-stephens

Can I do something more to get this going again? If something is missing, I'll gladly provide if possible.

MindTooth avatar Jun 14 '23 07:06 MindTooth

@MindTooth can you rebase just to kick the unit tests again?

patrick-stephens avatar Jun 14 '23 09:06 patrick-stephens

@leonardo-albertovich any chance you can approve? From my perspective seems fine.

patrick-stephens avatar Jun 14 '23 09:06 patrick-stephens

107/120 Test #101: flb-it-log .................................***Failed   20.86 sec
Test cache_basic_timeout...                     
------------------------
[ FAILED ]
  log.c:16: Check (*interval >= timeout - 1) && *interval <= timeout... failed
    interval error. got=3 expect=4-5
  log.c:92: Check ret == 0... failed
    update_and_check_interval for TEST_RECORD_01 failed. i=9
  log.c:16: Check (*interval >= timeout - 1) && *interval <= timeout... failed
    interval error. got=3 expect=4-5
  log.c:98: Check ret == 0... failed
    update_and_check_interval for TEST_RECORD_02 failed. i=9
Test cache_one_slot...                          
[ OK ]
FAILED: 1 of 2 unit tests has failed.

I can't tell if this is related, but I don't think so. πŸ€·πŸ»β€β™‚οΈ

MindTooth avatar Jun 14 '23 10:06 MindTooth

107/120 Test #101: flb-it-log .................................***Failed   20.86 sec
Test cache_basic_timeout...                     
------------------------
[ FAILED ]
  log.c:16: Check (*interval >= timeout - 1) && *interval <= timeout... failed
    interval error. got=3 expect=4-5
  log.c:92: Check ret == 0... failed
    update_and_check_interval for TEST_RECORD_01 failed. i=9
  log.c:16: Check (*interval >= timeout - 1) && *interval <= timeout... failed
    interval error. got=3 expect=4-5
  log.c:98: Check ret == 0... failed
    update_and_check_interval for TEST_RECORD_02 failed. i=9
Test cache_one_slot...                          
[ OK ]
FAILED: 1 of 2 unit tests has failed.

I can't tell if this is related, but I don't think so. πŸ€·πŸ»β€β™‚οΈ

No, it's flaky macOS tests.

patrick-stephens avatar Jun 14 '23 12:06 patrick-stephens

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Sep 13 '23 01:09 github-actions[bot]

Bump.

MindTooth avatar Sep 13 '23 05:09 MindTooth

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Dec 13 '23 01:12 github-actions[bot]

I'll look into how the latest version act and to see if this still is a valid PR. Other than that, I'm not sure how to move this forward. Seems a bit quiet when it comes to accepting contributions. πŸ€·πŸ»β€β™‚οΈ

MindTooth avatar Dec 14 '23 11:12 MindTooth

This time I was able to build it myself and test inside an AlmaLinux 9 VM. The fix is still valid.

MindTooth avatar Dec 15 '23 16:12 MindTooth

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar May 12 '24 01:05 github-actions[bot]

What can I do to make this move forward?

MindTooth avatar May 12 '24 21:05 MindTooth

This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.

github-actions[bot] avatar Aug 12 '24 01:08 github-actions[bot]

I'm not using Fluent Bit, so I have no need to follow this up. Seeing as Stale Bot wants to close this, I can beat it to it. πŸ‘‹πŸ»

MindTooth avatar Aug 21 '24 12:08 MindTooth