netdata / netdata

Architected for speed. Automated for easy. Monitoring and troubleshooting, transformed!
https://www.netdata.cloud
GNU General Public License v3.0
70.4k stars 5.85k forks source link

[Bug]: Apt on Debian shows incorrect architectures for some packages in netdata repository #16685

Open mattico opened 8 months ago

mattico commented 8 months ago

Bug description

Some of the netdata packages show up in apt with incorrect architectures (i386, armhf, arm64):

Output from `apt search netdata` demonstrating the issue ``` $ apt search netdata Sorting... Done Full Text Search... Done netdata/unknown 1.44.1 i386 real-time charts for system monitoring netdata-apache2/oldstable 1.29.3-4 all real-time performance monitoring (apache integration) netdata-core/oldstable 1.29.3-4 amd64 real-time performance monitoring (core) netdata-dbgsym/unknown 1.44.1 armhf debug symbols for netdata netdata-ebpf-code-legacy/unknown,now 1.44.1 amd64 [installed,automatic] Compiled eBPF legacy code for the Netdata eBPF plugin netdata-plugin-apps/unknown 1.44.1 i386 The per-application metrics collection plugin for the Netdata Agent netdata-plugin-apps-dbgsym/unknown 1.44.1 i386 debug symbols for netdata-plugin-apps netdata-plugin-chartsd/unknown,now 1.44.1 all [installed,automatic] The charts.d metrics collection plugin for the Netdata Agent netdata-plugin-cups/unknown 1.44.1 i386 The CUPS metrics collection plugin for the Netdata Agent netdata-plugin-cups-dbgsym/unknown 1.44.1 i386 debug symbols for netdata-plugin-cups netdata-plugin-debugfs/unknown 1.44.1 i386 The debugfs metrics collector for the Netdata Agent netdata-plugin-debugfs-dbgsym/unknown 1.44.1 armhf debug symbols for netdata-plugin-debugfs netdata-plugin-ebpf/unknown,now 1.44.1 amd64 [installed,automatic] The eBPF metrics collection plugin for the Netdata Agent netdata-plugin-ebpf-dbgsym/unknown 1.44.1 amd64 debug symbols for netdata-plugin-ebpf netdata-plugin-freeipmi/unknown 1.44.1 armhf The FreeIPMI metrics collection plugin for the Netdata Agent netdata-plugin-freeipmi-dbgsym/unknown 1.44.1 arm64 debug symbols for netdata-plugin-freeipmi netdata-plugin-go/unknown 1.44.1 arm64 The go.d metrics collection plugin for the Netdata Agent netdata-plugin-logs-management/unknown 1.44.1 arm64 The logs-management plugin for the Netdata Agent netdata-plugin-logs-management-dbgsym/unknown 1.44.1 armhf debug symbols for netdata-plugin-logs-management netdata-plugin-nfacct/unknown 1.44.1 i386 The NFACCT metrics collection plugin for the Netdata Agent netdata-plugin-nfacct-dbgsym/unknown 1.44.1 i386 debug symbols for netdata-plugin-nfacct netdata-plugin-perf/unknown 1.44.1 arm64 The perf metrics collector for the Netdata Agent netdata-plugin-perf-dbgsym/unknown 1.44.1 i386 debug symbols for netdata-plugin-perf netdata-plugin-pythond/unknown,now 1.44.1 all [installed,automatic] The python.d metrics collection plugin for the Netdata Agent netdata-plugin-slabinfo/unknown 1.44.1 arm64 The slabinfo metrics collector for the Netdata Agent netdata-plugin-slabinfo-dbgsym/unknown 1.44.1 armhf debug symbols for netdata-plugin-slabinfo netdata-plugin-systemd-journal/unknown,now 1.44.1 amd64 [installed,automatic] The systemd-journal collector for the Netdata Agent netdata-plugin-systemd-journal-dbgsym/unknown 1.44.1 i386 debug symbols for netdata-plugin-systemd-journal netdata-plugins-bash/oldstable 1.29.3-4 all real-time performance monitoring (bash plugins) netdata-plugins-nodejs/oldstable 1.29.3-4 all real-time performance monitoring (nodejs plugins) netdata-plugins-python/oldstable 1.29.3-4 all real-time performance monitoring (python plugins) netdata-repo/unknown,unknown,now 2-2 all [installed] Configuration for the official Netdata Stable package repository. netdata-repo-edge/unknown,unknown 2-2 all Configuration for the official Netdata Edge package repository. netdata-web/oldstable 1.29.3-4 all real-time performance monitoring (web) ```

This is confusing because it hides the fact that netdata is actually installed, just with the amd64 architecture:

$ sudo apt install netdata
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
netdata is already the newest version (1.44.1).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

It doesn't appear to actually cause incorrect-architecture packages to be installed. I don't have this issue with other 3rd party repositories which contain multiple architectures on these machines (Tailscale, Docker, Microsoft). I've observed this issue on 3 separate Debian 11 machines. Perhaps this is an issue with my apt configuration, or a bug in apt, but it seems likely there's something wrong with your repository configuration since it only affects your packages.

Expected behavior

I expect apt search to show amd64 (and all) packages on an amd64 machine.

Steps to reproduce

  1. Install netdata with the kickstart.sh script on Debian 11
  2. apt search netdata
  3. Observe the incorrect package architectures in the apt search output.

Installation method

kickstart.sh

System info

Linux casa2 6.1.0-0.deb11.13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1~bpo11+1 (2023-10-08) x86_64 GNU/Linux
/etc/os-release:PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
/etc/os-release:NAME="Debian GNU/Linux"
/etc/os-release:VERSION_ID="11"
/etc/os-release:VERSION="11 (bullseye)"
/etc/os-release:VERSION_CODENAME=bullseye
/etc/os-release:ID=debian

Netdata build info

Packaging:
    Netdata Version ____________________________________________ : v1.44.1
    Installation Type __________________________________________ : binpkg-deb
    Package Architecture _______________________________________ : x86_64
    Package Distro _____________________________________________ :  
    Configure Options __________________________________________ :  '--build=x86_64-linux-gnu' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--disable-option-checking' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--prefix=/usr' '--sysconfdir=/etc' '--localstatedir=/var' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--with-user=netdata' '--with-math' '--with-zlib' '--with-webdir=/var/lib/netdata/www' '--disable-dependency-tracking' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -ffile-prefix-map=/usr/src/netdata=. -fstack-protector-strong -Wformat -Werror=format-security' 'LDFLAGS=-Wl,-z,relro' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -ffile-prefix-map=/usr/src/netdata=. -fstack-protector-strong -Wformat -Werror=format-security'
Default Directories:
    User Configurations ________________________________________ : /etc/netdata
    Stock Configurations _______________________________________ : /usr/lib/netdata/conf.d
    Ephemeral Databases (metrics data, metadata) _______________ : /var/cache/netdata
    Permanent Databases ________________________________________ : /var/lib/netdata
    Plugins ____________________________________________________ : /usr/libexec/netdata/plugins.d
    Static Web Files ___________________________________________ : /var/lib/netdata/www
    Log Files __________________________________________________ : /var/log/netdata
    Lock Files _________________________________________________ : /var/lib/netdata/lock
    Home _______________________________________________________ : /var/lib/netdata
Operating System:
    Kernel _____________________________________________________ : Linux
    Kernel Version _____________________________________________ : 6.1.0-0.deb11.13-amd64
    Operating System ___________________________________________ : Debian GNU/Linux
    Operating System ID ________________________________________ : debian
    Operating System ID Like ___________________________________ : unknown
    Operating System Version ___________________________________ : 11 (bullseye)
    Operating System Version ID ________________________________ : none
    Detection __________________________________________________ : /etc/os-release
Hardware:
    CPU Cores __________________________________________________ : 64
    CPU Frequency ______________________________________________ : 3737000000
    RAM Bytes __________________________________________________ : 270083887104
    Disk Capacity ______________________________________________ : 2720592838656
    CPU Architecture ___________________________________________ : x86_64
    Virtualization Technology __________________________________ : none
    Virtualization Detection ___________________________________ : systemd-detect-virt
Container:
    Container __________________________________________________ : none
    Container Detection ________________________________________ : systemd-detect-virt
    Container Orchestrator _____________________________________ : none
    Container Operating System _________________________________ : none
    Container Operating System ID ______________________________ : none
    Container Operating System ID Like _________________________ : none
    Container Operating System Version _________________________ : none
    Container Operating System Version ID ______________________ : none
    Container Operating System Detection _______________________ : none
Features:
    Built For __________________________________________________ : Linux
    Netdata Cloud ______________________________________________ : YES
    Health (trigger alerts and send notifications) _____________ : YES
    Streaming (stream metrics to parent Netdata servers) _______ : YES
    Back-filling (of higher database tiers) ____________________ : YES
    Replication (fill the gaps of parent Netdata servers) ______ : YES
    Streaming and Replication Compression ______________________ : YES (zstd lz4 gzip)
    Contexts (index all active and archived metrics) ___________ : YES
    Tiering (multiple dbs with different metrics resolution) ___ : YES (5)
    Machine Learning ___________________________________________ : YES
Database Engines:
    dbengine ___________________________________________________ : YES
    alloc ______________________________________________________ : YES
    ram ________________________________________________________ : YES
    map ________________________________________________________ : YES
    save _______________________________________________________ : YES
    none _______________________________________________________ : YES
Connectivity Capabilities:
    ACLK (Agent-Cloud Link: MQTT over WebSockets over TLS) _____ : YES
    static (Netdata internal web server) _______________________ : YES
    h2o (web server) ___________________________________________ : YES
    WebRTC (experimental) ______________________________________ : NO
    Native HTTPS (TLS Support) _________________________________ : YES
    TLS Host Verification ______________________________________ : YES
Libraries:
    LZ4 (extremely fast lossless compression algorithm) ________ : YES
    ZSTD (fast, lossless compression algorithm) ________________ : YES
    zlib (lossless data-compression library) ___________________ : YES
    Judy (high-performance dynamic arrays and hashtables) ______ : YES (bundled)
    dlib (robust machine learning toolkit) _____________________ : YES (bundled)
    protobuf (platform-neutral data serialization protocol) ____ : YES (system)
    OpenSSL (cryptography) _____________________________________ : YES
    libdatachannel (stand-alone WebRTC data channels) __________ : NO
    JSON-C (lightweight JSON manipulation) _____________________ : YES
    libcap (Linux capabilities system operations) ______________ : NO
    libcrypto (cryptographic functions) ________________________ : YES
    libm (mathematical functions) ______________________________ : YES
    jemalloc ___________________________________________________ : NO
    TCMalloc ___________________________________________________ : NO
Plugins:
    apps (monitor processes) ___________________________________ : YES
    cgroups (monitor containers and VMs) _______________________ : YES
    cgroup-network (associate interfaces to CGROUPS) ___________ : YES
    proc (monitor Linux systems) _______________________________ : YES
    tc (monitor Linux network QoS) _____________________________ : YES
    diskspace (monitor Linux mount points) _____________________ : YES
    freebsd (monitor FreeBSD systems) __________________________ : NO
    macos (monitor MacOS systems) ______________________________ : NO
    statsd (collect custom application metrics) ________________ : YES
    timex (check system clock synchronization) _________________ : YES
    idlejitter (check system latency and jitter) _______________ : YES
    bash (support shell data collection jobs - charts.d) _______ : YES
    debugfs (kernel debugging metrics) _________________________ : YES
    cups (monitor printers and print jobs) _____________________ : YES
    ebpf (monitor system calls) ________________________________ : YES
    freeipmi (monitor enterprise server H/W) ___________________ : YES
    nfacct (gather netfilter accounting) _______________________ : YES
    perf (collect kernel performance events) ___________________ : YES
    slabinfo (monitor kernel object caching) ___________________ : YES
    Xen ________________________________________________________ : NO
    Xen VBD Error Tracking _____________________________________ : NO
    Logs Management ____________________________________________ : YES
Exporters:
    AWS Kinesis ________________________________________________ : NO
    GCP PubSub _________________________________________________ : NO
    MongoDB ____________________________________________________ : YES
    Prometheus (OpenMetrics) Exporter __________________________ : YES
    Prometheus Remote Write ____________________________________ : YES
    Graphite ___________________________________________________ : YES
    Graphite HTTP / HTTPS ______________________________________ : YES
    JSON _______________________________________________________ : YES
    JSON HTTP / HTTPS __________________________________________ : YES
    OpenTSDB ___________________________________________________ : YES
    OpenTSDB HTTP / HTTPS ______________________________________ : YES
    All Metrics API ____________________________________________ : YES
    Shell (use metrics in shell scripts) _______________________ : YES
Debug/Developer Features:
    Trace All Netdata Allocations (with charts) ________________ : NO
    Developer Mode (more runtime checks, slower) _______________ : NO

Additional info

amd64 is the only architecture enabled on the machines:

$ dpkg --print-architecture
amd64
$ dpkg --print-foreign-architectures 
$ 
putnam commented 5 months ago

The Release file also doesn't include the Suite directive, so apt shows netdata-sourced repo packages as "unknown" rather than bookworm/buster/etc. Looks pretty weird in the shell and feels like it's broken.