Issue installing on Ubuntu, the original "heartbeat" clustering tool package tries to install instead of the heartbeat beat.
4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linuxstretch/sidcat os-release
NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
apt install heartbeat should present installation of the original heartbeat (clustering tool) rather than the Elastic beat:apt-get install heartbeat
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
cluster-glue corosync crmsh iproute libcfg6 libcib4 libcmap4 libcorosync-common4 libcpg4 libcrmcluster4 libcrmcommon3 libcrmservice3 libesmtp6 libheartbeat2 libibverbs1 liblrm2 liblrmd1 libnet1 libopenhpi2 libopenipmi0 libpe-rules2 libpe-status10 libpengine10
libpils2 libplumb2 libplumbgpl2 libqb0 libquorum5 librdmacm1 libstatgrab10 libstonith1 libstonithd2 libtotem-pg5 libtransitioner2 libvotequorum7 openhpid pacemaker pacemaker-cli-utils pacemaker-common pacemaker-resource-agents python-yaml resource-agents
Suggested packages:
fence-agents
The following NEW packages will be installed:
cluster-glue corosync crmsh heartbeat iproute libcfg6 libcib4 libcmap4 libcorosync-common4 libcpg4 libcrmcluster4 libcrmcommon3 libcrmservice3 libesmtp6 libheartbeat2 libibverbs1 liblrm2 liblrmd1 libnet1 libopenhpi2 libopenipmi0 libpe-rules2 libpe-status10
libpengine10 libpils2 libplumb2 libplumbgpl2 libqb0 libquorum5 librdmacm1 libstatgrab10 libstonith1 libstonithd2 libtotem-pg5 libtransitioner2 libvotequorum7 openhpid pacemaker pacemaker-cli-utils pacemaker-common pacemaker-resource-agents python-yaml
resource-agents
0 to upgrade, 43 to newly install, 0 to remove and 0 not to upgrade.
Need to get 4,202 kB of archives.
After this operation, 19.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]
# apt-cache madison heartbeat
heartbeat | 1:3.0.6-2 | http://mirror.internode.on.net/pub/ubuntu/ubuntu xenial/main amd64 Packages
heartbeat | 5.2.2 | https://artifacts.elastic.co/packages/5.x/apt stable/main amd64 Packages
heartbeat | 5.2.1 | https://artifacts.elastic.co/packages/5.x/apt stable/main amd64 Packages
heartbeat | 5.2.0 | https://artifacts.elastic.co/packages/5.x/apt stable/main amd64 Packages
# apt install heartbeat=5.2.2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
heartbeat
0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
Need to get 8,583 kB of archives.
After this operation, 28.1 MB of additional disk space will be used.
Get:1 https://artifacts.elastic.co/packages/5.x/apt stable/main amd64 heartbeat amd64 5.2.2 [8,583 kB]
Fetched 8,583 kB in 42s (203 kB/s)
Selecting previously unselected package heartbeat.
(Reading database ... 322908 files and directories currently installed.)
Preparing to unpack .../heartbeat_5.2.2_amd64.deb ...
Unpacking heartbeat (5.2.2) ...
Processing triggers for systemd (229-4ubuntu16) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up heartbeat (5.2.2) ...
Processing triggers for systemd (229-4ubuntu16) ...
Processing triggers for ureadahead (0.100.0-19) …
# dpkg -l heartbeat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=============================================================-===================================-===================================-================================================================================================================================
ii heartbeat 5.2.2 amd64 Ping remote services for availability and log results to Elasticsearch or send to Logstash.
```# cat /etc/apt/sources.list
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial main restricted
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-updates main restricted
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial universe
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-updates universe
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial multiverse
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-updates multiverse
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-security main restricted
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-security universe
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-security multiverse
deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main
```
Additionally regular apt upgrade command would replace elastic heartbeat with the other clustering heartbeat tool, seen by apt as an upgradeable version to replace existing:
$ sudo apt list --upgradable
Listing... Done
heartbeat/xenial 1:3.0.6-2 amd64 [upgradable from: 5.2.2]
libc-bin/xenial-updates,xenial-security 2.23-0ubuntu7 amd64 [upgradable from: 2.23-0ubuntu6]
libc-dev-bin/xenial-updates,xenial-security 2.23-0ubuntu7 amd64 [upgradable from: 2.23-0ubuntu6]
libc6/xenial-updates,xenial-security 2.23-0ubuntu7 amd64 [upgradable from: 2.23-0ubuntu6]
libc6-dbg/xenial-updates,xenial-security 2.23-0ubuntu7 amd64 [upgradable from: 2.23-0ubuntu6]
libc6-dev/xenial-updates,xenial-security 2.23-0ubuntu7 amd64 [upgradable from: 2.23-0ubuntu6]
locales/xenial-updates,xenial-updates,xenial-security,xenial-security 2.23-0ubuntu7 all [upgradable from: 2.23-0ubuntu6]
multiarch-support/xenial-updates,xenial-security 2.23-0ubuntu7 amd64 [upgradable from: 2.23-0ubuntu6]
$ sudo apt upgrade
[sudo] password for peter:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
cluster-glue corosync crmsh iproute libcfg6 libcib4 libcmap4 libcorosync-common4 libcpg4 libcrmcluster4 libcrmcommon3 libcrmservice3 libesmtp6 libheartbeat2 libibverbs1 liblrm2 liblrmd1 libnet1 libopenhpi2 libopenipmi0 libpe-rules2 libpe-status10 libpengine10
libpils2 libplumb2 libplumbgpl2 libqb0 libquorum5 librdmacm1 libstatgrab10 libstonith1 libstonithd2 libtotem-pg5 libtransitioner2 libvotequorum7 openhpid pacemaker pacemaker-cli-utils pacemaker-common pacemaker-resource-agents python-yaml resource-agents
The following packages will be upgraded:
heartbeat libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev locales multiarch-support
8 to upgrade, 42 to newly install, 0 to remove and 0 not to upgrade.
Need to get 12.3 MB/16.5 MB of archives.
After this operation, 8,515 kB disk space will be freed.
Do you want to continue? [Y/n]
Marked it as held to prevent upgrade using:
apt-mark hold heartbeat
Oh boy :( I knew that name is a mistake.
We've discussed some potential options:
The last option currently seems the most appealing. We probably want to add the elastic- prefix to all beats, not only Heartbeat, to keep the packaging process consistent. Some potential issues that we need to investigate:
We plan to figure this out by 6.0.
Also in the meanwhile apt pinning can mitigate the issue until we release a definitive fix. by editing /etc/apt/preferences (or /etc/apt/preferences.d/heartbeat):
Package: heartbeat
Pin: origin artifacts.elastic.co
Pin-Priority: 700
You get our repository pinned, so our heartbeat package (and any new one we release) has priority over Debian/Ubuntu repo
root@a012cba5d379:/# apt-cache policy heartbeat
heartbeat:
Installed: (none)
Candidate: 5.3.0
Version table:
1:3.0.6-5 500
500 http://archive.ubuntu.com/ubuntu zesty/main amd64 Packages
5.3.0 700
500 https://artifacts.elastic.co/packages/5.x/apt stable/main amd64 Packages
So we'll need to update the docs so users have ways to get around this
issue until it's solved in future releases. I can update the docs with this
info if someone wants to review my PR?
On 29 Mar 2017 00:38, "Carlos Pérez-Aradros Herce" notifications@github.com
wrote:
Also in the meanwhile apt pinning can mitigate the issue until we release
a definitive fix. by editing /etc/apt/preferences (or
/etc/apt/preferences.d/heartbeat):Package: heartbeat
Pin: origin artifacts.elastic.co
Pin-Priority: 700You get our repository pinned, so our heartbeat package (and any new one
we release) has priority over Debian/Ubuntu reporoot@a012cba5d379:/# apt-cache policy heartbeat
heartbeat:
Installed: (none)
Candidate: 5.3.0
Version table:
1:3.0.6-5 500
500 http://archive.ubuntu.com/ubuntu zesty/main amd64 Packages
5.3.0 700
500 https://artifacts.elastic.co/packages/5.x/apt stable/main amd64 Packages—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/elastic/beats/issues/3765#issuecomment-289791339, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AB-ZO7OOlLF0ZFBQdubq7YSucH5M-s-Aks5rqRuBgaJpZM4MgOnn
.
@geekpete I can update the docs if you tell me what to add. Just offering because you'll need to conditionally code the info so that it doesn't appear in the docs for other Beats. We use a shared file with variables that resolve to the correct Beat name.
Thanks for the help, @dedemorton :)
The additional detail around pinning the repo with a higher priority provided by @exekias is the best/simplest solution to add to the Heartbeat docs. I can try to verify/test on Debian as well later today.
```
On Debian/Ubuntu, pin the repository before installing to ensure the correct Elastic Heartbeat package is installed
Edit: /etc/apt/preferences (or /etc/apt/preferences.d/heartbeat):
Package: heartbeat
Pin: origin artifacts.elastic.co
Pin-Priority: 700
```
or similar to that,etc.
Okay, after some initial hicup, the proposed (and I think correct) pinning works. Changing the package name still does make sense to allow co-installation of heartbeat cluster software and heartbeat Elastic Beat (although I think its unlikely that one would like to do that).
Heartbeatbeat?
Most helpful comment
Oh boy :( I knew that name is a mistake.