From owner-freebsd-elastic@freebsd.org Tue Mar 17 18:11:32 2020 Return-Path: Delivered-To: freebsd-elastic@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B002D26D939 for ; Tue, 17 Mar 2020 18:11:32 +0000 (UTC) (envelope-from SRS0=Y9hZ=5C=quip.cz=000.fbsd@elsa.codelab.cz) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48hh7m0B9fz4V5t for ; Tue, 17 Mar 2020 18:11:32 +0000 (UTC) (envelope-from SRS0=Y9hZ=5C=quip.cz=000.fbsd@elsa.codelab.cz) Received: by mailman.nyi.freebsd.org (Postfix) id F3FFE26D938; Tue, 17 Mar 2020 18:11:31 +0000 (UTC) Delivered-To: elastic@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3A6526D937 for ; Tue, 17 Mar 2020 18:11:31 +0000 (UTC) (envelope-from SRS0=Y9hZ=5C=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (elsa.codelab.cz [94.124.105.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48hh7k0pKwz4V2r for ; Tue, 17 Mar 2020 18:11:29 +0000 (UTC) (envelope-from SRS0=Y9hZ=5C=quip.cz=000.fbsd@elsa.codelab.cz) Received: from elsa.codelab.cz (localhost [127.0.0.1]) by elsa.codelab.cz (Postfix) with ESMTP id C587128422; Tue, 17 Mar 2020 19:11:26 +0100 (CET) Received: from illbsd.quip.test (ip-62-24-92-232.net.upcbroadband.cz [62.24.92.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by elsa.codelab.cz (Postfix) with ESMTPSA id B5F4228417; Tue, 17 Mar 2020 19:11:23 +0100 (CET) Subject: Re: Beats 7 To: =?UTF-8?Q?Peter_Ankerst=c3=a5l?= Cc: "elastic@freebsd.org" References: <97FB5F71-B110-4F31-9E62-C0EFCF2E0464@pean.org> <51a99528-d45e-95dc-a365-621c2966f545@quip.cz> <5bdda9b8-9e76-088b-4289-8c04dbb7acc1@quip.cz> From: Miroslav Lachman <000.fbsd@quip.cz> Message-ID: <0596a603-892f-60c2-7657-5137bbb24d05@quip.cz> Date: Tue, 17 Mar 2020 19:11:23 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48hh7k0pKwz4V2r X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of SRS0=Y9hZ=5C=quip.cz=000.fbsd@elsa.codelab.cz has no SPF policy when checking 94.124.105.4) smtp.mailfrom=SRS0=Y9hZ=5C=quip.cz=000.fbsd@elsa.codelab.cz X-Spamd-Result: default: False [4.04 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; IP_SCORE(0.84)[ip: (0.30), ipnet: 94.124.104.0/21(0.15), asn: 42000(3.64), country: CZ(0.09)]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[quip.cz]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(1.00)[1.000,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[4.105.124.94.list.dnswl.org : 127.0.10.0]; NEURAL_SPAM_LONG(1.00)[0.999,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[000.fbsd@quip.cz,SRS0=Y9hZ=5C=quip.cz=000.fbsd@elsa.codelab.cz]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:42000, ipnet:94.124.104.0/21, country:CZ]; FROM_NEQ_ENVFROM(0.00)[000.fbsd@quip.cz,SRS0=Y9hZ=5C=quip.cz=000.fbsd@elsa.codelab.cz]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-elastic@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Support of ElasticSearch-related ports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Mar 2020 18:11:32 -0000 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