fluent / fluent-package-builder

td-agent (Fluentd) Building and Packaging System
Apache License 2.0
22 stars 23 forks source link

github: check downgrade to v4 #591

Closed kenhys closed 7 months ago

kenhys commented 9 months ago

github: check downgrade to v4

To downgrade correctly you must:

* Remove fluent-package in beforehand.
* Manually migrate buffer or logs
* Re-install td-agent v4.

NOTE: on debian/ubuntu, need to disable td-agent.service alias
beforehand because:
  * It conflict with v4 td-agent.service
  * If you didn't disable it, it causes broken symlink from td-agent.service to /lib/systemd/system/fluentd.service.
daipom commented 9 months ago

Thanks! We need to add this new test here to run it in CI.

https://github.com/fluent/fluent-package-builder/blob/b4b7017c09d78f2c404db62612733b40f69668a6/fluent-package/yum/systemd-test/test.sh#L21-L25

https://github.com/fluent/fluent-package-builder/blob/b4b7017c09d78f2c404db62612733b40f69668a6/fluent-package/apt/systemd-test/test.sh#L26-L30

kenhys commented 9 months ago

checking failure on local vm.

kenhys commented 9 months ago

Technically package downgrade will work but, not same as before. Thus, uninstall v5 && re install v4 is the recommended action to do now.

daipom commented 7 months ago

Thanks! I'm concerned about the following points. I didn't think this step was necessary. I'm checking the behavior.

* Disable td-agent.service alias beforehand.

  * It conflict with v4 td-agent.service
  * If you didn't disable it, it causes broken symlink from td-agent.service to /lib/systemd/system/fluentd.service.
daipom commented 7 months ago

In my local env Rocky Linux 8, I don't need to manually remove the td-agent.service alias. It is automatically removed when uninstalling fluent-package.

I'm testing https://github.com/daipom/fluent-package-builder/commit/3471b31e036f420e0ed3cd4ff0f9eaf914d2e744 on my fork:

daipom commented 7 months ago

In my local env Rocky Linux 8, I don't need to manually remove the td-agent.service alias. It is automatically removed when uninstalling fluent-package.

I'm testing daipom@3471b31 on my fork:

* rpm: https://github.com/daipom/fluent-package-builder/actions/runs/7164750480

* apt: https://github.com/daipom/fluent-package-builder/actions/runs/7164750483

Let me sort out the necessary steps for downgrading while looking at these results.

daipom commented 7 months ago

To downgrade correctly you must:

* Disable td-agent.service alias beforehand.

  * It conflict with v4 td-agent.service
  * If you didn't disable it, it causes broken symlink from td-agent.service to /lib/systemd/system/fluentd.service.

* Purge v5 apt-line in fluent-lts-apt-source or fluent-apt-source.

In my conclusion, these are required only for deb. For rpm, we don't need these steps because symlinks are automatically removed when uninstalling.