FS#68763 - [influxdb] Update to influxdb 2.0.2
Attached to Project:
Community Packages
Opened by Damjan Georgievski (damjan) - Friday, 27 November 2020, 19:42 GMT
Last edited by Morten Linderud (Foxboron) - Saturday, 06 March 2021, 12:37 GMT
Opened by Damjan Georgievski (damjan) - Friday, 27 November 2020, 19:42 GMT
Last edited by Morten Linderud (Foxboron) - Saturday, 06 March 2021, 12:37 GMT
|
Details
Description: the influxdb 2.0 project had substantial
project changes, including the build process and repository
organization.
Now it has Chronograph and Kapacitor integrated, and an additional new query language "Flux". I've updated the PKGBUILD for the 2.x release (attached). Note: In my version I've also removed influxdb.tmpfiles and influxdb.sysusers, and added a influxdb.service that runs as a DynamicUser=yes service, with StateDirectory=influxdb (attached). If that's not desired, the package can be reverted to the current setup (I personally find dynamic user service better, more secure and easier to manage). ps. if it's more convenient, I can open a PR on github too. |
This task depends upon
Closed by Morten Linderud (Foxboron)
Saturday, 06 March 2021, 12:37 GMT
Reason for closing: Fixed
Additional comments about closing: Updated to 2.x release
Saturday, 06 March 2021, 12:37 GMT
Reason for closing: Fixed
Additional comments about closing: Updated to 2.x release
yes, I'm running it currently
indeed, I haven't fixed the deps (except replacing npm with yarn). thanks for the review, I'll post a second draft soon (have some chores to run currently).
The only thing I'm not sure of is `backup=('etc/influxdb/influxdb.conf')` - the file was present in the old package, but not in the new - should I leave it?
updated PKGBUILD attached
Maybe it is a good idea to set Environment="INFLUXD_CONFIG_PATH=/etc/influxdb" in the unit file and even include a configuration file with the options commented out.
This way you can easily set your tls-cert and other stuff from the usual location.
It's also worth noting that InfluxDB creates a new, version 2 compatible, config file from the old config file.
I upgraded with 'sudo -u influxdb influxd --bolt-path /var/lib/influxdb/influxd.bolt --engine-path /var/lib/influxdb/engine upgrade' which gave me /etc/influxdb/config.toml with options such as tls-cert, tls-key, bolt-path, engine-path etc.
I guess people that are upgrading will expect this config file to be used.
* Test suite is failing even after cloning the test data.
* -j1 is needed because of a racey build system. Everything takes a while to build.
Need to sit down and unwrangle parts of this upstream or pray a minor release suddenly fixed this.
I pushed a WIP pkgbuild
https://github.com/Foxboron/archlinux-pkgbuilds/blob/b0f4375264ce7ac0220f67f131e1466146040105/influxdb/PKGBUILD
https://github.com/influxdata/influxdb/releases/tag/v2.0.4
it fails to compile again :(
* force -j1 to stop parallel builds
* removed the bzr make dependency, it wasn't needed
do they not work for you?
I did get an email pointing out some issues.
- https://github.com/influxdata/influxdb/issues/16463
- https://github.com/influxdata/influxdb/issues/20294
- https://github.com/influxdata/influxdb/issues/20718
- https://github.com/influxdata/influxdb/labels/area%2Ftests
I'll just push with running `go test ./...` and leave UI testing for upstream if I can't get this to work soon'ish
Ahhh, I guess I copied that from the original PKGBUILD, didn't think to update it 🤦
I'll try get this shipped in day or two since it takes a little while to build.
I realized i forgot the config env variable change so I'll push a fixup with that and any other stuff that might crop up over the next days :)
1. systemctl stop influxdb.service
2. influxd --bolt-path /var/lib/private/influxdbv2/influxd.bolt --engine-path /var/lib/private/influxdbv2/engine --v2-config-path /etc/influxdb/config.toml upgrade
3. Move /var/lib/private/influxdb2 to /var/lib/private/influxdb
4. Edit /etc/influxdb/config.toml and change bolt-path and engine-path to start with /var/lib/influxdb
5. systemctl edit influxdb.service and add [Service] Environment=INFLUXD_CONFIG_PATH=/etc/influxdb
6. systemctl start influxdb.service
I'm not convinced that that's the best way to do the upgrade (or even a correct way!). Some guidance would have been nice: normally packages print instructions when manual intervention is required, but here everything silently stopped working, which is disappointing. The wiki is also out of date.
The INFLUXD_CONFIG_PATH was forgotten but will be added in a patch release soon'ish.
Sure, in an ideal world every user would google every package whose major version changed in an upgrade to see whether any manual intervention was required. Most won't. That's why an upgrade warning, and some easy-to-find instructions on how to upgrade, are nice things to provide, rather than every user wasting a chunk of their weekend trying to find the right magic incantation.
If you're confident that the steps I took are correct (they seem clunky, but whole DynamicUser thing makes running influxd as the influxdb user outside of the context of a service annoying), then I'll happily update the wiki.
That is because larger breakage between major releases doesn't happen a lot. Not because we do anything with them though. In this case it did however.
>If you're confident that the steps I took are correct (they seem clunky, but whole DynamicUser thing makes running influxd as the influxdb user outside of the context of a service annoying), then I'll happily update the wiki.
Yes, please do. You can omit the service editing since it will be fixed. But rest looks good and I'll update with any other issues if they get reported.
Thanks!
Anyway, thanks a lot for your work, it's much appreciated.
Samba breaking is nothing new and it's samba. Friends don't let friends use samba.
If people actually care they can send me an email and I'll happily drop it into `[community-testing]` before hitting `[community]`.
afaik you use telegraf for that