Percona Telemetry is enabled even after disabing via PERCONA_TELEMETRY_DISABLE=1
Description
AFFECTED CS IDs
Activity

Jean da Silva November 21, 2024 at 3:49 AM
Hi @surabhi.bhat ,
Thank you for double-checking that.
I wiped out any trace of the previous installation and installed the PXC with PERCONA TELEMETRY DISABLE=1 from scratch, and it didn't enable this time.
$> apt list --installed | grep percona
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
percona-release/unknown,unknown,now 1.0-29.generic all [installed]
$> sudo ls -larth /usr/local/percona*
ls: cannot access '/usr/local/percona*': No such file or directory
$> sudo PERCONA_TELEMETRY_DISABLE=1 apt install percona-xtradb-cluster -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
[…]
Setting up percona-xtradb-cluster (1:8.0.37-29-1.jammy) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
$> systemctl status percona-telemetry-agent
\u25cb percona-telemetry-agent.service
Loaded: masked (Reason: Unit percona-telemetry-agent.service is masked.)
Active: inactive (dead)
$> ls -laRth /usr/local/percona/
/usr/local/percona/:
total 12K
drwxr-xr-x 4 daemon percona-telemetry 4,0K nov 21 00:38 telemetry
drwxrwxr-x 3 root percona-telemetry 4,0K nov 21 00:38 .
drwxr-xr-x 11 root root 4,0K nov 21 00:38 ..
/usr/local/percona/telemetry:
total 16K
drwxr-xr-x 4 daemon percona-telemetry 4,0K nov 21 00:38 .
drwxrwsr-x 2 mysql percona-telemetry 4,0K nov 21 00:38 pxc
drwxrwxr-x 3 root percona-telemetry 4,0K nov 21 00:38 ..
drwsr-sr-x 2 daemon percona-telemetry 4,0K nov 21 00:38 history
/usr/local/percona/telemetry/pxc:
total 8,0K
drwxrwsr-x 2 mysql percona-telemetry 4,0K nov 21 00:38 .
drwxr-xr-x 4 daemon percona-telemetry 4,0K nov 21 00:38 ..
/usr/local/percona/telemetry/history:
total 8,0K
drwxr-xr-x 4 daemon percona-telemetry 4,0K nov 21 00:38 ..
drwsr-sr-x 2 daemon percona-telemetry 4,0K nov 21 00:38 .
Thank you!

surabhi.bhat November 4, 2024 at 12:28 PMEdited
Hi @Jean da Silva ,
Setting the environment variable PERCONA_TELEMETRY_DISABLE=1
in the command sudo PERCONA_TELEMETRY_DISABLE=1 apt install percona-xtradb-cluster
disables only the installation-time telemetry.
The percona-telemetry-agent
package is installed as a part of continuous telemetry and the package is installed as a dependency during the installation of percona-xtradb-cluster and other products. The only way to disable continuous telemetry is to disable the telemetry agent service - https://docs.percona.com/percona-xtradb-cluster/8.0/telemetry.html#disable-the-telemetry-agent .
The file /usr/local/percona/telemetry_uuid
is generated during installation-time telemetry. I verified disabling the installation-time telemetry during the installation of percona-xtradb-cluster using the command PERCONA_TELEMETRY_DISABLE=1 apt install percona-xtradb-cluster
and no telemetry_uuid file was generated. Looks like the telemetry_uuid file in your system is from an older installation. Could you please remove the old telemetry_uuid file and then try installing PXC with PERCONA_TELEMETRY_DISABLE=1
?
Thank you.
How to reproduce:
Install PXC with telemetry disabled; for this test, it was used PXC 8.0.37-29-1(latest release) on Ubuntu 22.04:
sudo PERCONA_TELEMETRY_DISABLE=1 apt install percona-xtradb-cluster
Watch the installation process:
Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: debsums libaio1 libdbd-mysql-perl libdbi-perl libdpkg-perl libev4 libfile-fcntllock-perl libfile-fnmatch-perl libmecab2 libmysqlclient21 mysql-common percona-telemetry-agent percona-xtradb-cluster-client percona-xtradb-cluster-common percona-xtradb-cluster-server qpress socat stunnel4 Suggested packages: libmldbm-perl libnet-daemon-perl libsql-statement-perl debian-keyring gcc | c-compiler binutils bzr tinyca pv logcheck-database The following NEW packages will be installed: debsums libaio1 libdbd-mysql-perl libdbi-perl libdpkg-perl libev4 libfile-fcntllock-perl libfile-fnmatch-perl libmecab2 libmysqlclient21 mysql-common percona-telemetry-agent percona-xtradb-cluster percona-xtradb-cluster-client percona-xtradb-cluster-common percona-xtradb-cluster-server qpress socat stunnel4 0 upgraded, 19 newly installed, 0 to remove and 12 not upgraded. Need to get 161 MB of archives. After this operation, 523 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://br.archive.ubuntu.com/ubuntu jammy/universe amd64 stunnel4 amd64 3:5.63-1build1 [215 kB] Get:2 http://br.archive.ubuntu.com/ubuntu jammy-updates/main amd64 libdpkg-perl all 1.21.1ubuntu2.3 [237 kB] Get:3 http://br.archive.ubuntu.com/ubuntu jammy/universe amd64 libfile-fnmatch-perl amd64 0.02-2build8 [10,5 kB] Get:4 http://br.archive.ubuntu.com/ubuntu jammy/universe amd64 debsums all 3.0.2 [36,3 kB] […]
It automatically lists and, therefore, installs the
percona-telemetry-agent
package.After completion, if we check, we can see it was installed and enabled:
$ systemctl status percona-telemetry-agent.service \u25cf percona-telemetry-agent.service - percona-telemetry-agent Loaded: loaded (/lib/systemd/system/percona-telemetry-agent.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2024-10-29 16:38:00 -03; 2min 25s ago Main PID: 5469 (sh) Tasks: 8 (limit: 4600) Memory: 5.0M CPU: 8ms CGroup: /system.slice/percona-telemetry-agent.service \u251c\u25005469 /bin/sh -c "/usr/bin/percona-telemetry-agent >> /var/log/percona/telemetry-agent/telemetry-agent.log 2>> /var/log/percona/telemetry-agent/telemetry-agent-error.log" \u2514\u25005470 /usr/bin/percona-telemetry-agent out 29 16:38:00 ubuntu2204-2 systemd[1]: Started percona-telemetry-agent.
$ sudo cat /var/log/percona/telemetry-agent/telemetry-agent.log {"level":"info","ts":"2024-10-29T16:38:00.228-0300","logger":"telemetry-agent","caller":"telemetry-agent/main.go:246","msg":"values from config:","config":{"Telemetry":{"RootPath":"/usr/local/percona/telemetry","PSMetricsPath":"/usr/local/percona/telemetry/ps","PSMDBMongodMetricsPath":"/usr/local/percona/telemetry/psmdb","PSMDBMongosMetricsPath":"/usr/local/percona/telemetry/psmdbs","PXCMetricsPath":"/usr/local/percona/telemetry/pxc","PGMetricsPath":"/usr/local/percona/telemetry/pg","HistoryPath":"/usr/local/percona/telemetry/history","CheckInterval":86400,"HistoryKeepInterval":604800},"Platform":{"ResendTimeout":60,"URL":"https://check.percona.com/v1/telemetry/GenericReport"},"Log":{"Verbose":false,"DevMode":false},"Version":false}} {"level":"info","ts":"2024-10-29T16:38:00.228-0300","logger":"telemetry-agent","caller":"telemetry-agent/main.go:260","msg":"Percona Telemetry Agent started"} {"level":"info","ts":"2024-10-29T16:38:00.228-0300","logger":"telemetry-agent","caller":"telemetry-agent/main.go:266","msg":"sleeping for 86400 seconds before first iteration"}
$ cat /usr/local/percona/telemetry_uuid instanceId:2ec5722f-b5dc-4cd4-93ba-d0505acba997 PRODUCT_FAMILY_PS:1 PRODUCT_FAMILY_PXC:1
Expected behavior:
With the intention of
PERCONA_TELEMETRY_DISABLE=1
no related package or further telemetry agent should be installed/enabled.