Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heartbeat install issues on Ubuntu #3765

Closed
geekpete opened this issue Mar 17, 2017 · 9 comments
Closed

Heartbeat install issues on Ubuntu #3765

geekpete opened this issue Mar 17, 2017 · 9 comments

Comments

@geekpete
Copy link
Member

Issue installing on Ubuntu, the original "heartbeat" clustering tool package tries to install instead of the heartbeat beat.

  • Version: 5.2.2
  • Operating System:
    • uname -a: 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
    • cat /etc/debian_version: stretch/sid
cat 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-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]
  • as a workaround I've successfully used this instead:
    • First use the apt madison command to see what versions of a specific package exist:
# 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
  • which strangely doesn’t list the ubuntu/default heartbeat app that tries to install if you just install heartbeat. Then install with specific version to cherrypick the one you want:
# 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) …
  • then you can confirm it's installed with:
# 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.
  • Including my /etc/apt/sources.list as well, in case some local Aussie ISP (internode) repo is different to the standard Ubuntu ones, or in case some additional repo I've added provides this other heartbeat package,etc:
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial main restricted
# deb-src http://au.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-updates main restricted
# deb-src http://au.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial universe
# deb-src http://au.archive.ubuntu.com/ubuntu/ xenial universe
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-updates universe
# deb-src http://au.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial multiverse
# deb-src http://au.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-updates multiverse
# deb-src http://au.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src http://au.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu xenial partner
# deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-security main restricted
# deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-security universe
# deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ xenial-security multiverse
# deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main
# deb-src http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main
# deb-src http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main
# deb-src http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu trusty main
@geekpete
Copy link
Member Author

geekpete commented Mar 22, 2017

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

@tsg tsg added the bug label Mar 22, 2017
@tsg
Copy link
Contributor

tsg commented Mar 22, 2017

Oh boy :( I knew that name is a mistake.

@tsg
Copy link
Contributor

tsg commented Mar 28, 2017

We've discussed some potential options:

  • Rename our Heartbeat to something else (e.g. Upbeat or Uptimebeat)
  • Reimplement the original heartbeat HA functionality in Heartbeat and supersede it (just kidding :))
  • Rename the DEB and RPM files to something like elastic-heartbeat-....deb.

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:

  • This might affect the unified build process
  • The dash might be problematic to use in the package names / file names
  • We'd need to smoothly upgrade from one version of the other (i.e. use Replaces: on Debian, etc.)
  • We should consider if we want the elastic-heartbeat name in all DEB/RPM names or only in the ones that we put in the repositories. Similarly, we could name the package elastic-heartbeat but keep the filename as heartbeat...deb.

We plan to figure this out by 6.0.

@exekias
Copy link
Contributor

exekias commented Mar 28, 2017

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

@geekpete
Copy link
Member Author

geekpete commented Mar 28, 2017 via email

@dedemorton
Copy link
Contributor

@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.

@geekpete
Copy link
Member Author

geekpete commented Mar 28, 2017

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.

@martin21
Copy link

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).

@geekpete
Copy link
Member Author

Heartbeatbeat?

@tsg tsg mentioned this issue Jul 3, 2017
2 tasks
tsg pushed a commit to tsg/beats that referenced this issue Jul 4, 2017
Due to a naming conflict on Debian (see elastic#3765), we rename the name of the
RPM and DEB packages to be `heartbeat-elastic`. The artifacts that we offer for
download are still named `heartbeat`, only the package names in the repositories
will be `heartbeat-elastic`.

The init scripts and the service files are renamed, as well as the PID files
and setting files (e.g. `/etc/default/heartbeat-elastic`). The binaries, config
files, etc are not, so the changes are minimal.

Fixes elastic#3765.
exekias pushed a commit that referenced this issue Jul 4, 2017
* Rename heartbeat packages

Due to a naming conflict on Debian (see #3765), we rename the name of the
RPM and DEB packages to be `heartbeat-elastic`. The artifacts that we offer for
download are still named `heartbeat`, only the package names in the repositories
will be `heartbeat-elastic`.

The init scripts and the service files are renamed, as well as the PID files
and setting files (e.g. `/etc/default/heartbeat-elastic`). The binaries, config
files, etc are not, so the changes are minimal.

Fixes #3765.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants