Date: Tue, 17 Mar 2020 19:11:23 +0100 From: Miroslav Lachman <000.fbsd@quip.cz> To: =?UTF-8?Q?Peter_Ankerst=c3=a5l?= <peter@pean.org> Cc: "elastic@freebsd.org" <elastic@FreeBSD.org> Subject: Re: Beats 7 Message-ID: <0596a603-892f-60c2-7657-5137bbb24d05@quip.cz> In-Reply-To: <B626BD25-CD87-4573-90B2-28AF2CD3A6D8@pean.org> References: <97FB5F71-B110-4F31-9E62-C0EFCF2E0464@pean.org> <51a99528-d45e-95dc-a365-621c2966f545@quip.cz> <BB664694-C051-4F06-ADC6-22CC127D8481@pean.org> <5bdda9b8-9e76-088b-4289-8c04dbb7acc1@quip.cz> <B626BD25-CD87-4573-90B2-28AF2CD3A6D8@pean.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Ankerstål wrote on 2020/03/17 15:01: >>> Oh, there it is. >>> I tested it and there seems to be some problem with the post install: >>> Installing beats7-7.6.1... >>> pkg-static: Fail to create hardlink: /var/db/beats/filebeat/kibana/7/dashboard/.pkgtemp.Filebeat-Kafka-overview.json.67sFQiaemu2r:Cross-device link >>> cp: /usr/local/etc/heartbeat.yml.sample: No such file or directory >>> cp: /usr/local/etc/metricbeat.yml.sample: No such file or directory >>> pkg-static: POST-INSTALL script failed >>> *** Error code 70 >> >> It's a strange error. What is your filesystem layout (partitions)? It seems the install is trying to hardlink file to a different partitions. >> > store/usr/ports 13.9G 1.13T 7.45G /usr/ports > store/usr/ports/distfiles 1.57G 1.13T 1.57G /usr/ports/distfiles > store/usr/ports/packages 28.8M 1.13T 28.5M /usr/ports/packages Those are not important, the important are /var and /usr partitions and their subpartitions. See below. [...] > I also tried to build a package and that seemed to work without any errors, but when I try to install that package it fails with: > # pkg install beats7-7.6.1.txz > Updating FreeBSD repository catalogue... > FreeBSD repository is up to date. > All repositories are up to date. > Checking integrity... done (0 conflicting) > The following 1 package(s) will be affected (of 0 checked): > > New packages to be INSTALLED: > beats7: 7.6.1 > > Number of packages to be installed: 1 > > The process will require 123 MiB more space. > > Proceed with this action? [y/N]: y > [1/1] Installing beats7-7.6.1... > Extracting beats7-7.6.1: 93% > pkg: Fail to create hardlink: /var/db/beats/filebeat/kibana/7/dashboard/.pkgtemp.Filebeat-Kafka-overview.json.iYNtuaUyNBLf:Cross-device link > Extracting beats7-7.6.1: 100% The problem here with "Fail to create hardlink" / "Cross-device link" is that you have /var and /usr as separate partitions while my testing jail is all on one filesystem. This (7.6.1) version of beats are installing Filebeat-Kafka-overview.json in to /usr/local and then trying to hard link it to /var/db/beats. And it failed for obvious reason. (root@testjail) beats7/# make install ===> Installing for beats7-7.6.1 ===> Checking if beats7 is already installed ===> Registering installation for beats7-7.6.1 [testjail.codelab.cz] Installing beats7-7.6.1... (root@testjail) beats7/# pkg info -l beats7-7.6.1 | grep Filebeat-Kafka /usr/local/share/beats/filebeat/module/kafka/_meta/kibana/7/dashboard/Filebeat-Kafka-overview.json /var/db/beats/filebeat/kibana/7/dashboard/Filebeat-Kafka-overview.json (root@testjail) beats7/# ls -lio /usr/local/share/beats/filebeat/module/kafka/_meta/kibana/7/dashboard/Filebeat-Kafka-overview.json /var/db/beats/filebeat/kibana/7/dashboard/Filebeat-Kafka-overview.json 325792 -rw-r--r-- 2 root wheel uarch 18378 Feb 28 18:43 /usr/local/share/beats/filebeat/module/kafka/_meta/kibana/7/dashboard/Filebeat-Kafka-overview.json 325792 -rw-r--r-- 2 root wheel uarch 18378 Feb 28 18:43 /var/db/beats/filebeat/kibana/7/dashboard/Filebeat-Kafka-overview.json Both files have the same inode number - are hardlinked. I don't know why the install process is trying to use hardlink instead of copy / two independent files. This file existed only in /var/db/beats in 6.8 version but 7.6 have it twice in two locations. Also I don't know if it is upstream bug in beats or local in FreeBSD port. It seems it is the staging problem. Built file has inode number 18378 (root@testjail) beats7/# ll -iol /var/ports/usr/ports/headtest/sysutils/beats7/work/beats-7.6.1/filebeat/module/kafka/_meta/kibana/7/dashboard/Filebeat-Kafka-overview.json 295412 -rw-r--r-- 3 root wheel uarch 18378 Feb 28 18:43 /var/ports/usr/ports/headtest/sysutils/beats7/work/beats-7.6.1/filebeat/module/kafka/_meta/kibana/7/dashboard/Filebeat-Kafka-overview.json And two target files in a stage dir have the same inode number 18378 too (root@testjail) beats7/# ll -li `find /var/ports/usr/ports/headtest/sysutils/beats7/work/stage/ -name "Filebeat-Kafka-overview.json"` 295412 -rw-r--r-- 3 root wheel 18378 Feb 28 18:43 /var/ports/usr/ports/headtest/sysutils/beats7/work/stage/usr/local/share/beats/filebeat/module/kafka/_meta/kibana/7/dashboard/Filebeat-Kafka-overview.json 295412 -rw-r--r-- 3 root wheel 18378 Feb 28 18:43 /var/ports/usr/ports/headtest/sysutils/beats7/work/stage/var/db/beats/filebeat/kibana/7/dashboard/Filebeat-Kafka-overview.json I don't know how to workaround this. Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0596a603-892f-60c2-7657-5137bbb24d05>