Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Orchestrator systemd depency #1112

Merged
merged 4 commits into from
Apr 8, 2020

Conversation

mcrauwel
Copy link
Contributor

@mcrauwel mcrauwel commented Apr 3, 2020

A Pull Request should be associated with an Issue.

We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
and potentially we'll be able to point development in a particular direction.

Related issue: #229

Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR

Description

Adds a dependency so Orchestrator is only started AFTER MySQL if they are both schedule to start to avoid this behaviour:

$ sudo systemctl status orchestrator
● orchestrator.service - orchestrator: MySQL replication management and visualization
   Loaded: loaded (/etc/systemd/system/orchestrator.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2020-04-03 09:30:05 UTC; 30s ago
     Docs: https://github.com/github/orchestrator
 Main PID: 957 (code=exited, status=1/FAILURE)

Apr 03 09:30:05 orchestrator-1 systemd[1]: Started orchestrator: MySQL replication management and visualization.
Apr 03 09:30:05 orchestrator-1 orchestrator[957]: 2020-04-03 09:30:05 ERROR dial tcp 127.0.0.1:3306: connect: connection refused
Apr 03 09:30:05 orchestrator-1 orchestrator[957]: 2020-04-03 09:30:05 FATAL dial tcp 127.0.0.1:3306: connect: connection refused
Apr 03 09:30:05 orchestrator-1 systemd[1]: orchestrator.service: main process exited, code=exited, status=1/FAILURE
Apr 03 09:30:05 orchestrator-1 systemd[1]: Unit orchestrator.service entered failed state.
Apr 03 09:30:05 orchestrator-1 systemd[1]: orchestrator.service failed.

Copy link
Collaborator

@shlomi-noach shlomi-noach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

orchestrator might run with a SQLite backend, in which case it shouldn't wait on a MySQL server. Even with MySQL backend, it doesn't strictly have to run on same host as MySQL. So unfortunately I cannot merge this.
Just as an idea, how about systemd restarting orchestrator after failure, in 1min intervals?

@mcrauwel
Copy link
Contributor Author

mcrauwel commented Apr 3, 2020

Hey @shlomi-noach,

This is why I used the After dependency and not the Wants or even Required.

From the systemd manual

Before=, After=

These two settings expect a space-separated list of unit names. They may be specified more than once, in which case dependencies for all listed names are created.

Those two settings configure ordering dependencies between units. If unit foo.service contains the setting Before=bar.service and both units are being started, bar.service's start-up is delayed until foo.service has finished starting up. After= is the inverse of Before=, i.e. while Before= ensures that the configured unit is started before the listed unit begins starting up, After= ensures the opposite, that the listed unit is fully started up before the configured unit is started.

So I understand this as, this dependency is only enforced whenever both services are scheduled for start...

Or do you think I'm interpreting it wrongly?

@mcrauwel
Copy link
Contributor Author

mcrauwel commented Apr 3, 2020

Testing output to confirm my assumptions over the config file

Installing latest orchestrator on an empty CentOS/7 vagrant machine

Loaded plugins: fastestmirror
orchestrator-3.1.4-1.x86_64.rpm                                                                                                                                                                                                                                                                                                                    | 9.8 MB  00:00:05
Examining /var/tmp/yum-root-utyQl6/orchestrator-3.1.4-1.x86_64.rpm: 1:orchestrator-3.1.4-1.x86_64
Marking /var/tmp/yum-root-utyQl6/orchestrator-3.1.4-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package orchestrator.x86_64 1:3.1.4-1 will be installed
--> Processing Dependency: jq >= 1.5 for package: 1:orchestrator-3.1.4-1.x86_64
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                                                                                                                                                                                                                                                                               |  30 kB  00:00:00
 * base: mirror.hostup.org
 * epel: epel.mirror.nucleus.be
 * extras: centos.cu.be
 * updates: mirror.hostup.org
epel                                                                                                                                                                                                                                                                                                                                               | 4.7 kB  00:00:00
[Unit]
(1/3): epel/x86_64/group_gz                                                                                                                                                                                                                                                                                                                        |  95 kB  00:00:00
(2/3): epel/x86_64/updateinfo                                                                                                                                                                                                                                                                                                                      | 1.0 MB  00:00:00
(3/3): epel/x86_64/primary_db                                                                                                                                                                                                                                                                                                                      | 6.8 MB  00:00:00
--> Running transaction check
---> Package jq.x86_64 0:1.6-1.el7 will be installed
--> Processing Dependency: libonig.so.2()(64bit) for package: jq-1.6-1.el7.x86_64
--> Running transaction check
---> Package oniguruma.x86_64 0:5.9.5-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================================================================================================================================================================================================================================================
 Package                                                                               Arch                                                                            Version                                                                                Repository                                                                                             Size
==========================================================================================================================================================================================================================================================================================================================================================================
Installing:
 orchestrator                                                                          x86_64                                                                          1:3.1.4-1                                                                              /orchestrator-3.1.4-1.x86_64                                                                           20 M
Installing for dependencies:
 jq                                                                                    x86_64                                                                          1.6-1.el7                                                                              epel                                                                                                  167 k
 oniguruma                                                                             x86_64                                                                          5.9.5-3.el7                                                                            epel                                                                                                  129 k

Transaction Summary
==========================================================================================================================================================================================================================================================================================================================================================================
Install  1 Package (+2 Dependent packages)

Total size: 21 M
Total download size: 296 k
Installed size: 21 M
Downloading packages:
warning: /var/cache/yum/x86_64/7/epel/packages/oniguruma-5.9.5-3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for oniguruma-5.9.5-3.el7.x86_64.rpm is not installed
(1/2): oniguruma-5.9.5-3.el7.x86_64.rpm                                                                                                                                                                                                                                                                                                            | 129 kB  00:00:00
(2/2): jq-1.6-1.el7.x86_64.rpm                                                                                                                                                                                                                                                                                                                     | 167 kB  00:00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                                                                                                                                                     553 kB/s | 296 kB  00:00:00
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) <epel@fedoraproject.org>"
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-11.noarch (@extras)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : oniguruma-5.9.5-3.el7.x86_64                                                                                                                                                                                                                                                                                                                           1/3
  Installing : jq-1.6-1.el7.x86_64                                                                                                                                                                                                                                                                                                                                    2/3
  Installing : 1:orchestrator-3.1.4-1.x86_64                                                                                                                                                                                                                                                                                                                          3/3
  Verifying  : jq-1.6-1.el7.x86_64                                                                                                                                                                                                                                                                                                                                    1/3
  Verifying  : 1:orchestrator-3.1.4-1.x86_64                                                                                                                                                                                                                                                                                                                          2/3
  Verifying  : oniguruma-5.9.5-3.el7.x86_64                                                                                                                                                                                                                                                                                                                           3/3

Installed:
  orchestrator.x86_64 1:3.1.4-1

Dependency Installed:
  jq.x86_64 0:1.6-1.el7                                                                                                                                                           oniguruma.x86_64 0:5.9.5-3.el7

Complete!

Editing the service file to include this patch

[root@localhost ~]# vi /etc/systemd/system/orchestrator.service
[root@localhost ~]# cat /etc/systemd/system/orchestrator.service
[Unit]
Description=orchestrator: MySQL replication management and visualization
Documentation=https://github.com/github/orchestrator
After=syslog.target network.target mysqld.service

[Service]
Type=simple
WorkingDirectory=/usr/local/orchestrator
ExecStart=/usr/local/orchestrator/orchestrator http
EnvironmentFile=-/etc/sysconfig/orchestrator
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

Verifying there is no MySQL service present:

[root@localhost ~]# systemctl status mysql
Unit mysql.service could not be found.
[root@localhost ~]# systemctl status mysqld
Unit mysqld.service could not be found.

Verifying Orchestrator status before testing

[root@localhost ~]# systemctl status orchestrator
● orchestrator.service - orchestrator: MySQL replication management and visualization
   Loaded: loaded (/etc/systemd/system/orchestrator.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: https://github.com/github/orchestrator

Reloading systemd to pick up my change

[root@localhost ~]# systemctl daemon-reload

Copying sample sqlite config and testing orchestrator

[root@localhost ~]# cp /usr/local/orchestrator/orchestrator-sample-sqlite.conf.json /etc/orchestrator.conf.json
[root@localhost ~]# systemctl start orchestrator.service
[root@localhost ~]# systemctl status orchestrator
● orchestrator.service - orchestrator: MySQL replication management and visualization
   Loaded: loaded (/etc/systemd/system/orchestrator.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2020-04-03 13:44:06 UTC; 3s ago
     Docs: https://github.com/github/orchestrator
 Main PID: 4629 (orchestrator)
   CGroup: /system.slice/orchestrator.service
           └─4629 /usr/local/orchestrator/orchestrator http

Apr 03 13:44:06 localhost.localdomain orchestrator[4629]: 2020-04-03 13:44:06 INFO Connecting to backend :3306: maxConnections: 128, maxIdleConns: 32
Apr 03 13:44:06 localhost.localdomain orchestrator[4629]: 2020-04-03 13:44:06 INFO Starting Discovery
Apr 03 13:44:06 localhost.localdomain orchestrator[4629]: 2020-04-03 13:44:06 INFO Registering endpoints
Apr 03 13:44:06 localhost.localdomain orchestrator[4629]: 2020-04-03 13:44:06 INFO continuous discovery: setting up
Apr 03 13:44:06 localhost.localdomain orchestrator[4629]: 2020-04-03 13:44:06 INFO Starting HTTP listener on :3000
Apr 03 13:44:06 localhost.localdomain orchestrator[4629]: 2020-04-03 13:44:06 INFO continuous discovery: starting
Apr 03 13:44:06 localhost.localdomain orchestrator[4629]: 2020-04-03 13:44:06 DEBUG Queue.startMonitoring(DEFAULT)
Apr 03 13:44:07 localhost.localdomain orchestrator[4629]: 2020-04-03 13:44:07 INFO Not elected as active node; active node: ; polling
Apr 03 13:44:08 localhost.localdomain orchestrator[4629]: 2020-04-03 13:44:08 INFO Not elected as active node; active node: ; polling
Apr 03 13:44:09 localhost.localdomain orchestrator[4629]: 2020-04-03 13:44:09 INFO Not elected as active node; active node: ; polling
[root@localhost ~]#

@shlomi-noach
Copy link
Collaborator

@mcrauwel thank you! Any thoughts on #229 (comment) ?

@mcrauwel
Copy link
Contributor Author

mcrauwel commented Apr 6, 2020

Adding link to my reply to the above mentioned comment.

If we agree on moving this PR forward, I will run some extra test to ensure full compatibility on deb based systems and to also support MariaDB as a backend service. I will update this PR as needed.

I will then also revert the documentation change that #1012 introduced as this will become obsolete.

Copy link
Collaborator

@shlomi-noach shlomi-noach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move forward

@mcrauwel
Copy link
Contributor Author

mcrauwel commented Apr 7, 2020

ubuntu test

root@ubuntu-xenial:~# wget https://github.com/openark/orchestrator/releases/download/v3.1.4/orchestrator_3.1.4_amd64.deb
--2020-04-07 18:11:08--  https://github.com/openark/orchestrator/releases/download/v3.1.4/orchestrator_3.1.4_amd64.deb
Resolving github.com (github.com)... 140.82.118.4
Connecting to github.com (github.com)|140.82.118.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/75190736/82dbd980-4057-11ea-9d96-8427726dd5ed?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200407%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200407T181109Z&X-Amz-Expires=300&X-Amz-Signature=b59a353d65116c3e95f65d6d059312d21e72a40abd74418276ca8024b420f55c&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dorchestrator_3.1.4_amd64.deb&response-content-type=application%2Foctet-stream [following]
--2020-04-07 18:11:08--  https://github-production-release-asset-2e65be.s3.amazonaws.com/75190736/82dbd980-4057-11ea-9d96-8427726dd5ed?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200407%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200407T181109Z&X-Amz-Expires=300&X-Amz-Signature=b59a353d65116c3e95f65d6d059312d21e72a40abd74418276ca8024b420f55c&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dorchestrator_3.1.4_amd64.deb&response-content-type=application%2Foctet-stream
Resolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.217.45.44
Connecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)|52.217.45.44|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10354160 (9.9M) [application/octet-stream]
Saving to: ‘orchestrator_3.1.4_amd64.deb’

orchestrator_3.1.4_amd64.deb                       100%[================================================================================================================>]   9.87M  10.5MB/s    in 0.9s

2020-04-07 18:11:10 (10.5 MB/s) - ‘orchestrator_3.1.4_amd64.deb’ saved [10354160/10354160]

installing orchestrator

root@ubuntu-xenial:~# dpkg -i orchestrator_3.1.4_amd64.deb
Selecting previously unselected package orchestrator.
(Reading database ... 54192 files and directories currently installed.)
Preparing to unpack orchestrator_3.1.4_amd64.deb ...
Unpacking orchestrator (1:3.1.4) ...
dpkg: dependency problems prevent configuration of orchestrator:
 orchestrator depends on jq (>= 1.5); however:
  Package jq is not installed.

dpkg: error processing package orchestrator (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 orchestrator
root@ubuntu-xenial:~# apt-get install jq
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package jq is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'jq' has no installation candidate
root@ubuntu-xenial:~# vi /etc/apt/
apt.conf.d/     preferences.d/  sources.list    sources.list.d/ trusted.gpg     trusted.gpg.d/
root@ubuntu-xenial:~# vi /etc/apt/sources.list
root@ubuntu-xenial:~# apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/main Sources [868 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main Sources [163 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/restricted Sources [4,808 B]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2,116 B]
Get:9 http://archive.ubuntu.com/ubuntu xenial/universe Sources [7,728 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [118 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [3,408 B]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [850 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial/multiverse Sources [179 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,532 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [321 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [489 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,354 kB]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [200 kB]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [5,728 B]
Get:20 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [2,708 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources [347 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Sources [2,536 B]
Get:25 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [269 kB]
Get:26 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Sources [8,748 B]
Get:27 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1,130 kB]
Get:28 http://archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [429 kB]
Get:29 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [7,616 B]
Get:30 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2,272 B]
Get:31 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [795 kB]
Get:32 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [333 kB]
Get:33 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.8 kB]
Get:34 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8,468 B]
Get:35 http://archive.ubuntu.com/ubuntu xenial-backports/main Sources [4,848 B]
Get:36 http://archive.ubuntu.com/ubuntu xenial-backports/universe Sources [7,120 B]
Get:37 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [7,280 B]
Get:38 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [4,456 B]
Get:39 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [8,064 B]
Get:40 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [4,328 B]
Fetched 26.8 MB in 3s (6,880 kB/s)
Reading package lists... Done
root@ubuntu-xenial:~# apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  jq libonig2
The following NEW packages will be installed:
  jq libonig2
0 upgraded, 2 newly installed, 0 to remove and 176 not upgraded.
1 not fully installed or removed.
Need to get 231 kB of archives.
After this operation, 797 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libonig2 amd64 5.9.6-1ubuntu0.1 [86.7 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 jq amd64 1.5+dfsg-1ubuntu0.1 [144 kB]
Fetched 231 kB in 0s (1,008 kB/s)
Selecting previously unselected package libonig2:amd64.
(Reading database ... 54295 files and directories currently installed.)
Preparing to unpack .../libonig2_5.9.6-1ubuntu0.1_amd64.deb ...
Unpacking libonig2:amd64 (5.9.6-1ubuntu0.1) ...
Selecting previously unselected package jq.
Preparing to unpack .../jq_1.5+dfsg-1ubuntu0.1_amd64.deb ...
Unpacking jq (1.5+dfsg-1ubuntu0.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libonig2:amd64 (5.9.6-1ubuntu0.1) ...
Setting up jq (1.5+dfsg-1ubuntu0.1) ...
Setting up orchestrator (1:3.1.4) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...

editing the service file

root@ubuntu-xenial:~# vi /etc/systemd/system/orchestrator.service
root@ubuntu-xenial:~# cat /etc/systemd/system/orchestrator.service
[Unit]
Description=orchestrator: MySQL replication management and visualization
Documentation=https://github.com/github/orchestrator
After=syslog.target network.target mysqld.service

[Service]
Type=simple
WorkingDirectory=/usr/local/orchestrator
ExecStart=/usr/local/orchestrator/orchestrator http
EnvironmentFile=-/etc/sysconfig/orchestrator
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

checking mysql service

root@ubuntu-xenial:~# systemctl status mysql
● mysql.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
root@ubuntu-xenial:~# systemctl status mysqld
● mysqld.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

starting orchestrator

root@ubuntu-xenial:~# cp /usr/local/orchestrator/
orchestrator                          orchestrator-sample.conf.json         orchestrator-sample-sqlite.conf.json  resources/
root@ubuntu-xenial:~# cp /usr/local/orchestrator/orchestrator-sample-sqlite.conf.json /etc/orchestrator.conf.json
root@ubuntu-xenial:~# systemctl daemon-reload
root@ubuntu-xenial:~# systemctl start orchestrator
root@ubuntu-xenial:~# systemctl status orchestrator
● orchestrator.service - orchestrator: MySQL replication management and visualization
   Loaded: loaded (/etc/systemd/system/orchestrator.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-04-07 18:13:58 UTC; 6s ago
     Docs: https://github.com/github/orchestrator
 Main PID: 2321 (orchestrator)
    Tasks: 10
   Memory: 7.4M
      CPU: 77ms
   CGroup: /system.slice/orchestrator.service
           └─2321 /usr/local/orchestrator/orchestrator http

Apr 07 18:13:59 ubuntu-xenial orchestrator[2321]: 2020-04-07 18:13:59 INFO Starting Discovery
Apr 07 18:13:59 ubuntu-xenial orchestrator[2321]: 2020-04-07 18:13:59 INFO Registering endpoints
Apr 07 18:13:59 ubuntu-xenial orchestrator[2321]: 2020-04-07 18:13:59 INFO continuous discovery: setting up
Apr 07 18:13:59 ubuntu-xenial orchestrator[2321]: 2020-04-07 18:13:59 INFO continuous discovery: starting
Apr 07 18:13:59 ubuntu-xenial orchestrator[2321]: 2020-04-07 18:13:59 DEBUG Queue.startMonitoring(DEFAULT)
Apr 07 18:13:59 ubuntu-xenial orchestrator[2321]: 2020-04-07 18:13:59 INFO Starting HTTP listener on :3000
Apr 07 18:14:00 ubuntu-xenial orchestrator[2321]: 2020-04-07 18:14:00 INFO Not elected as active node; active node: ; polling
Apr 07 18:14:01 ubuntu-xenial orchestrator[2321]: 2020-04-07 18:14:01 INFO Not elected as active node; active node: ; polling
Apr 07 18:14:02 ubuntu-xenial orchestrator[2321]: 2020-04-07 18:14:02 INFO Not elected as active node; active node: ; polling
Apr 07 18:14:03 ubuntu-xenial orchestrator[2321]: 2020-04-07 18:14:03 INFO Not elected as active node; active node: ; polling
root@ubuntu-xenial:~#

testing mysql service

root@ubuntu-xenial:~# wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb
--2020-04-07 18:16:36--  https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb
Resolving dev.mysql.com (dev.mysql.com)... 137.254.60.11
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://repo.mysql.com//mysql-apt-config_0.8.15-1_all.deb [following]
--2020-04-07 18:16:37--  https://repo.mysql.com//mysql-apt-config_0.8.15-1_all.deb
Resolving repo.mysql.com (repo.mysql.com)... 2.22.69.13
Connecting to repo.mysql.com (repo.mysql.com)|2.22.69.13|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 35532 (35K) [application/x-debian-package]
Saving to: ‘mysql-apt-config_0.8.15-1_all.deb’

mysql-apt-config_0.8.15-1_all.deb                  100%[================================================================================================================>]  34.70K  --.-KB/s    in 0.04s

2020-04-07 18:16:37 (989 KB/s) - ‘mysql-apt-config_0.8.15-1_all.deb’ saved [35532/35532]

root@ubuntu-xenial:~# dpkg -i myq
dpkg: error processing archive myq (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 myq
root@ubuntu-xenial:~# dpkg -i mysql-apt-config_0.8.15-1_all.deb
Selecting previously unselected package mysql-apt-config.
(Reading database ... 54307 files and directories currently installed.)
Preparing to unpack mysql-apt-config_0.8.15-1_all.deb ...
Unpacking mysql-apt-config (0.8.15-1) ...
Setting up mysql-apt-config (0.8.15-1) ...
OK
root@ubuntu-xenial:~# apt-get update
Get:1 http://repo.mysql.com/apt/ubuntu xenial InRelease [21.6 kB]
Get:2 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 Sources [970 B]
Get:3 http://repo.mysql.com/apt/ubuntu xenial/mysql-apt-config amd64 Packages [563 B]
Get:4 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 Packages [5,658 B]
Get:5 http://repo.mysql.com/apt/ubuntu xenial/mysql-tools amd64 Packages [4,206 B]
Hit:6 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main Sources [347 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [269 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [1,129 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [796 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [333 kB]
Fetched 3,232 kB in 2s (1,489 kB/s)
Reading package lists... Done
root@ubuntu-xenial:~# apt-get install mysql-community-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libaio1 libmecab2 mysql-client mysql-common mysql-community-client
The following NEW packages will be installed:
  libaio1 libmecab2 mysql-client mysql-common mysql-community-client mysql-community-server
0 upgraded, 6 newly installed, 0 to remove and 176 not upgraded.
Need to get 43.6 MB of archives.
After this operation, 298 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libaio1 amd64 0.3.110-2 [6,356 B]
Get:2 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libmecab2 amd64 0.996-1.2ubuntu1 [264 kB]
Get:3 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 mysql-common amd64 5.7.29-1ubuntu16.04 [76.2 kB]
Get:4 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 mysql-community-client amd64 5.7.29-1ubuntu16.04 [10.9 MB]
Get:5 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 mysql-client amd64 5.7.29-1ubuntu16.04 [72.7 kB]
Get:6 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 mysql-community-server amd64 5.7.29-1ubuntu16.04 [32.2 MB]
Fetched 43.6 MB in 3s (12.8 MB/s)
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 54312 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.7.29-1ubuntu16.04_amd64.deb ...
Unpacking mysql-common (5.7.29-1ubuntu16.04) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../libaio1_0.3.110-2_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-2) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack .../mysql-community-client_5.7.29-1ubuntu16.04_amd64.deb ...
Unpacking mysql-community-client (5.7.29-1ubuntu16.04) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../mysql-client_5.7.29-1ubuntu16.04_amd64.deb ...
Unpacking mysql-client (5.7.29-1ubuntu16.04) ...
Selecting previously unselected package libmecab2.
Preparing to unpack .../libmecab2_0.996-1.2ubuntu1_amd64.deb ...
Unpacking libmecab2 (0.996-1.2ubuntu1) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack .../mysql-community-server_5.7.29-1ubuntu16.04_amd64.deb ...
Unpacking mysql-community-server (5.7.29-1ubuntu16.04) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.10) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up mysql-common (5.7.29-1ubuntu16.04) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up libaio1:amd64 (0.3.110-2) ...
Setting up mysql-community-client (5.7.29-1ubuntu16.04) ...
Setting up mysql-client (5.7.29-1ubuntu16.04) ...
Setting up libmecab2 (0.996-1.2ubuntu1) ...
Setting up mysql-community-server (5.7.29-1ubuntu16.04) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.10) ...
Processing triggers for ureadahead (0.100.0-19) ...
root@ubuntu-xenial:~# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.29 MySQL Community Server (GPL)
{

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE orchestrator;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER orchestrator@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> ALTER USER orchestrator@localhost IDENTIFIED BY 'orchestrator';;
Query OK, 0 rows affected (0.00 sec)

ERROR:
No query specified

mysql> GRANT ALL ON orchestrator.* TO orchestrator@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> ^DBye
root@ubuntu-xenial:~# cp /usr/local/orchestrator/
orchestrator                          orchestrator-sample-sqlite.conf.json  orchestrator.sqlite3-shm              resources/
orchestrator-sample.conf.json         orchestrator.sqlite3                  orchestrator.sqlite3-wal
root@ubuntu-xenial:~# cp /usr/local/orchestrator/orchestrator-sample.conf.json /etc/orchestrator.conf.json
root@ubuntu-xenial:~# systemctl stop orchestrator
root@ubuntu-xenial:~# systemctl status mysqld
● mysqld.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
root@ubuntu-xenial:~# systemctl status mysql
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-04-07 18:17:47 UTC; 2min 17s ago
 Main PID: 3702 (mysqld)
   CGroup: /system.slice/mysql.service
           └─3702 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid

Apr 07 18:17:47 ubuntu-xenial systemd[1]: Starting MySQL Community Server...
Apr 07 18:17:47 ubuntu-xenial systemd[1]: Started MySQL Community Server.
root@ubuntu-xenial:~# vi /etc/orchestrator.conf.json
root@ubuntu-xenial:~# systemctl start orchestrator
root@ubuntu-xenial:~# systemctl status orchestrator
● orchestrator.service - orchestrator: MySQL replication management and visualization
   Loaded: loaded (/etc/systemd/system/orchestrator.service; disabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-04-07 18:21:00 UTC; 11s ago
     Docs: https://github.com/github/orchestrator
 Main PID: 3839 (orchestrator)
    Tasks: 10
   Memory: 9.1M
      CPU: 53ms
   CGroup: /system.slice/orchestrator.service
           └─3839 /usr/local/orchestrator/orchestrator http

Apr 07 18:21:03 ubuntu-xenial orchestrator[3839]: 2020-04-07 18:21:03 INFO continuous discovery: starting
Apr 07 18:21:03 ubuntu-xenial orchestrator[3839]: 2020-04-07 18:21:03 INFO Starting HTTP listener on :3000
Apr 07 18:21:03 ubuntu-xenial orchestrator[3839]: 2020-04-07 18:21:03 DEBUG Queue.startMonitoring(DEFAULT)
Apr 07 18:21:04 ubuntu-xenial orchestrator[3839]: 2020-04-07 18:21:04 INFO Not elected as active node; active node: ; polling
Apr 07 18:21:05 ubuntu-xenial orchestrator[3839]: 2020-04-07 18:21:05 INFO Not elected as active node; active node: ; polling
Apr 07 18:21:06 ubuntu-xenial orchestrator[3839]: 2020-04-07 18:21:06 INFO Not elected as active node; active node: ; polling
Apr 07 18:21:08 ubuntu-xenial orchestrator[3839]: 2020-04-07 18:21:08 DEBUG Waiting for 15 seconds to pass before running failure detection/recovery
Apr 07 18:21:09 ubuntu-xenial orchestrator[3839]: 2020-04-07 18:21:09 DEBUG Waiting for 15 seconds to pass before running failure detection/recovery
Apr 07 18:21:10 ubuntu-xenial orchestrator[3839]: 2020-04-07 18:21:10 DEBUG Waiting for 15 seconds to pass before running failure detection/recovery
Apr 07 18:21:11 ubuntu-xenial orchestrator[3839]: 2020-04-07 18:21:11 DEBUG Waiting for 15 seconds to pass before running failure detection/recovery
root@ubuntu-xenial:~# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.7.29 MySQL Community Server (GPL)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> SHOW PROCESSLIST;
+----+--------------+-----------------+--------------+---------+------+----------+------------------+
| Id | User         | Host            | db           | Command | Time | State    | Info             |
+----+--------------+-----------------+--------------+---------+------+----------+------------------+
|  3 | orchestrator | localhost:44500 | NULL         | Sleep   |   20 |          | NULL             |
|  4 | orchestrator | localhost:44502 | orchestrator | Sleep   |    0 |          | NULL             |
|  5 | orchestrator | localhost:44504 | orchestrator | Sleep   |    0 |          | NULL             |
|  6 | orchestrator | localhost:44508 | orchestrator | Sleep   |    0 |          | NULL             |
|  7 | orchestrator | localhost:44506 | orchestrator | Sleep   |    0 |          | NULL             |
|  8 | orchestrator | localhost:44516 | orchestrator | Sleep   |    0 |          | NULL             |
|  9 | orchestrator | localhost:44514 | orchestrator | Sleep   |    0 |          | NULL             |
| 10 | orchestrator | localhost:44512 | orchestrator | Sleep   |    0 |          | NULL             |
| 11 | orchestrator | localhost:44518 | orchestrator | Sleep   |    0 |          | NULL             |
| 12 | orchestrator | localhost:44510 | orchestrator | Sleep   |    0 |          | NULL             |
| 13 | root         | localhost       | NULL         | Query   |    0 | starting | SHOW PROCESSLIST |
| 14 | orchestrator | localhost:44520 | orchestrator | Sleep   |    0 |          | NULL             |
+----+--------------+-----------------+--------------+---------+------+----------+------------------+
12 rows in set (0.00 sec)

mysql> ^DBye
root@ubuntu-xenial:~# logout

@mcrauwel
Copy link
Contributor Author

mcrauwel commented Apr 7, 2020

MariaDB test

root@ubuntu-xenial:~# curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
[info] Repository file successfully written to /etc/apt/sources.list.d/mariadb.list
[info] Adding trusted package signing keys...
[info] Running apt-get update...
[info] Done adding trusted package signing keys
root@ubuntu-xenial:~# apt-get install mariadb-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  galera-4 libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl
  libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3 libmysqlclient20 libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client-10.4 mariadb-client-core-10.4 mariadb-common
  mariadb-server-10.4 mariadb-server-core-10.4 mysql-common socat
Suggested packages:
  libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx mariadb-test tinyca
The following NEW packages will be installed:
  galera-4 libaio1 libcgi-fast-perl libcgi-pm-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl
  libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libmariadb3 libmysqlclient20 libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client-10.4 mariadb-client-core-10.4 mariadb-common
  mariadb-server mariadb-server-10.4 mariadb-server-core-10.4 mysql-common socat
0 upgraded, 28 newly installed, 0 to remove and 176 not upgraded.
Need to get 24.1 MB of archives.
After this operation, 197 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libdbi-perl amd64 1.634-1build1 [743 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/main amd64 libaio1 amd64 0.3.110-2 [6,356 B]
Get:8 http://archive.ubuntu.com/ubuntu xenial/universe amd64 socat amd64 1.7.3.1-1 [321 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-tagset-perl all 3.20-2 [13.5 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial/main amd64 liburi-perl all 1.71-1 [76.9 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-parser-perl amd64 3.72-1 [86.1 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial/main amd64 libcgi-pm-perl all 4.26-1 [185 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial/main amd64 libfcgi-perl amd64 0.77-1build1 [32.3 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial/main amd64 libcgi-fast-perl all 1:2.10-1 [10.2 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmysqlclient20 amd64 5.7.29-0ubuntu0.16.04.1 [683 kB]
Get:2 https://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu xenial/main amd64 mysql-common all 1:10.4.12+maria~xenial [5,450 B]
Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libdbd-mysql-perl amd64 4.033-1ubuntu0.1 [84.3 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial/main amd64 libencode-locale-perl all 1.05-1 [12.3 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial/main amd64 libhtml-template-perl all 2.95-2 [60.4 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial/main amd64 libtimedate-perl all 2.3000-2 [37.5 kB]
Get:3 https://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu xenial/main amd64 mariadb-common all 1:10.4.12+maria~xenial [3,452 B]
Get:24 http://archive.ubuntu.com/ubuntu xenial/main amd64 libhttp-date-perl all 6.02-1 [10.4 kB]
Get:25 http://archive.ubuntu.com/ubuntu xenial/main amd64 libio-html-perl all 1.001-1 [14.9 kB]
Get:26 http://archive.ubuntu.com/ubuntu xenial/main amd64 liblwp-mediatypes-perl all 6.02-1 [21.7 kB]
Get:27 http://archive.ubuntu.com/ubuntu xenial/main amd64 libhttp-message-perl all 6.11-1 [74.3 kB]
Get:28 http://archive.ubuntu.com/ubuntu xenial/universe amd64 libterm-readkey-perl amd64 2.33-1build1 [27.2 kB]
Get:4 https://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu xenial/main amd64 galera-4 amd64 26.4.3-xenial [8,901 kB]
Get:5 https://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu xenial/main amd64 libmariadb3 amd64 1:10.4.12+maria~xenial [147 kB]
Get:6 https://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu xenial/main amd64 mariadb-client-core-10.4 amd64 1:10.4.12+maria~xenial [769 kB]
Get:9 https://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu xenial/main amd64 mariadb-client-10.4 amd64 1:10.4.12+maria~xenial [1,164 kB]
Get:11 https://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu xenial/main amd64 mariadb-server-core-10.4 amd64 1:10.4.12+maria~xenial [6,285 kB]
Get:14 https://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu xenial/main amd64 mariadb-server-10.4 amd64 1:10.4.12+maria~xenial [4,333 kB]
Get:16 https://downloads.mariadb.com/MariaDB/mariadb-10.4/repo/ubuntu xenial/main amd64 mariadb-server all 1:10.4.12+maria~xenial [3,094 B]
Fetched 24.1 MB in 2s (10.5 MB/s)
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 54192 files and directories currently installed.)
Preparing to unpack .../mysql-common_1%3a10.4.12+maria~xenial_all.deb ...
Unpacking mysql-common (1:10.4.12+maria~xenial) ...
Selecting previously unselected package mariadb-common.
Preparing to unpack .../mariadb-common_1%3a10.4.12+maria~xenial_all.deb ...
Unpacking mariadb-common (1:10.4.12+maria~xenial) ...
Selecting previously unselected package galera-4.
Preparing to unpack .../galera-4_26.4.3-xenial_amd64.deb ...
Unpacking galera-4 (26.4.3-xenial) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.634-1build1_amd64.deb ...
Unpacking libdbi-perl (1.634-1build1) ...
Selecting previously unselected package libmariadb3:amd64.
Preparing to unpack .../libmariadb3_1%3a10.4.12+maria~xenial_amd64.deb ...
Unpacking libmariadb3:amd64 (1:10.4.12+maria~xenial) ...
Selecting previously unselected package mariadb-client-core-10.4.
Preparing to unpack .../mariadb-client-core-10.4_1%3a10.4.12+maria~xenial_amd64.deb ...
Unpacking mariadb-client-core-10.4 (1:10.4.12+maria~xenial) ...
Selecting previously unselected package mariadb-client-10.4.
Preparing to unpack .../mariadb-client-10.4_1%3a10.4.12+maria~xenial_amd64.deb ...
Unpacking mariadb-client-10.4 (1:10.4.12+maria~xenial) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../libaio1_0.3.110-2_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-2) ...
Selecting previously unselected package mariadb-server-core-10.4.
Preparing to unpack .../mariadb-server-core-10.4_1%3a10.4.12+maria~xenial_amd64.deb ...
Unpacking mariadb-server-core-10.4 (1:10.4.12+maria~xenial) ...
Selecting previously unselected package socat.
Preparing to unpack .../socat_1.7.3.1-1_amd64.deb ...
Unpacking socat (1.7.3.1-1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up mysql-common (1:10.4.12+maria~xenial) ...
Setting up mariadb-common (1:10.4.12+maria~xenial) ...
Selecting previously unselected package mariadb-server-10.4.
(Reading database ... 54592 files and directories currently installed.)
Preparing to unpack .../mariadb-server-10.4_1%3a10.4.12+maria~xenial_amd64.deb ...
Unpacking mariadb-server-10.4 (1:10.4.12+maria~xenial) ...
Selecting previously unselected package libhtml-tagset-perl.
Preparing to unpack .../libhtml-tagset-perl_3.20-2_all.deb ...
Unpacking libhtml-tagset-perl (3.20-2) ...
Selecting previously unselected package liburi-perl.
Preparing to unpack .../liburi-perl_1.71-1_all.deb ...
Unpacking liburi-perl (1.71-1) ...
Selecting previously unselected package libhtml-parser-perl.
Preparing to unpack .../libhtml-parser-perl_3.72-1_amd64.deb ...
Unpacking libhtml-parser-perl (3.72-1) ...
Selecting previously unselected package libcgi-pm-perl.
Preparing to unpack .../libcgi-pm-perl_4.26-1_all.deb ...
Unpacking libcgi-pm-perl (4.26-1) ...
Selecting previously unselected package libfcgi-perl.
Preparing to unpack .../libfcgi-perl_0.77-1build1_amd64.deb ...
Unpacking libfcgi-perl (0.77-1build1) ...
Selecting previously unselected package libcgi-fast-perl.
Preparing to unpack .../libcgi-fast-perl_1%3a2.10-1_all.deb ...
Unpacking libcgi-fast-perl (1:2.10-1) ...
Selecting previously unselected package libmysqlclient20:amd64.
Preparing to unpack .../libmysqlclient20_5.7.29-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.29-0ubuntu0.16.04.1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.033-1ubuntu0.1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.033-1ubuntu0.1) ...
Selecting previously unselected package libencode-locale-perl.
Preparing to unpack .../libencode-locale-perl_1.05-1_all.deb ...
Unpacking libencode-locale-perl (1.05-1) ...
Selecting previously unselected package libhtml-template-perl.
Preparing to unpack .../libhtml-template-perl_2.95-2_all.deb ...
Unpacking libhtml-template-perl (2.95-2) ...
Selecting previously unselected package libtimedate-perl.
Preparing to unpack .../libtimedate-perl_2.3000-2_all.deb ...
Unpacking libtimedate-perl (2.3000-2) ...
Selecting previously unselected package libhttp-date-perl.
Preparing to unpack .../libhttp-date-perl_6.02-1_all.deb ...
Unpacking libhttp-date-perl (6.02-1) ...
Selecting previously unselected package libio-html-perl.
Preparing to unpack .../libio-html-perl_1.001-1_all.deb ...
Unpacking libio-html-perl (1.001-1) ...
Selecting previously unselected package liblwp-mediatypes-perl.
Preparing to unpack .../liblwp-mediatypes-perl_6.02-1_all.deb ...
Unpacking liblwp-mediatypes-perl (6.02-1) ...
Selecting previously unselected package libhttp-message-perl.
Preparing to unpack .../libhttp-message-perl_6.11-1_all.deb ...
Unpacking libhttp-message-perl (6.11-1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.33-1build1_amd64.deb ...
Unpacking libterm-readkey-perl (2.33-1build1) ...
Selecting previously unselected package mariadb-server.
Preparing to unpack .../mariadb-server_1%3a10.4.12+maria~xenial_all.deb ...
Unpacking mariadb-server (1:10.4.12+maria~xenial) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up galera-4 (26.4.3-xenial) ...
Setting up libdbi-perl (1.634-1build1) ...
Setting up libmariadb3:amd64 (1:10.4.12+maria~xenial) ...
Setting up mariadb-client-core-10.4 (1:10.4.12+maria~xenial) ...
Setting up mariadb-client-10.4 (1:10.4.12+maria~xenial) ...
Setting up libaio1:amd64 (0.3.110-2) ...
Setting up mariadb-server-core-10.4 (1:10.4.12+maria~xenial) ...
Setting up socat (1.7.3.1-1) ...
Setting up mariadb-server-10.4 (1:10.4.12+maria~xenial) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
Setting up libhtml-tagset-perl (3.20-2) ...
Setting up liburi-perl (1.71-1) ...
Setting up libhtml-parser-perl (3.72-1) ...
Setting up libcgi-pm-perl (4.26-1) ...
Setting up libfcgi-perl (0.77-1build1) ...
Setting up libcgi-fast-perl (1:2.10-1) ...
Setting up libmysqlclient20:amd64 (5.7.29-0ubuntu0.16.04.1) ...
Setting up libdbd-mysql-perl (4.033-1ubuntu0.1) ...
Setting up libencode-locale-perl (1.05-1) ...
Setting up libhtml-template-perl (2.95-2) ...
Setting up libtimedate-perl (2.3000-2) ...
Setting up libhttp-date-perl (6.02-1) ...
Setting up libio-html-perl (1.001-1) ...
Setting up liblwp-mediatypes-perl (6.02-1) ...
Setting up libhttp-message-perl (6.11-1) ...
Setting up libterm-readkey-perl (2.33-1build1) ...
Setting up mariadb-server (1:10.4.12+maria~xenial) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
root@ubuntu-xenial:~# systemctl status mysql.service
● mariadb.service - MariaDB 10.4.12 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Tue 2020-04-07 18:29:47 UTC; 9s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 4182 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─4182 /usr/sbin/mysqld

Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Plugin 'FEEDBACK' is disabled.
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] InnoDB: Buffer pool(s) load completed at 200407 18:29:47
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Server socket created on IP: '127.0.0.1'.
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Reading of all Master_info entries succeeded
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Added new Master_info '' to hash table
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] /usr/sbin/mysqld: ready for connections.
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: Version: '10.4.12-MariaDB-1:10.4.12+maria~xenial-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
Apr 07 18:29:47 ubuntu-xenial systemd[1]: Started MariaDB 10.4.12 database server.
Apr 07 18:29:47 ubuntu-xenial systemd[1]: Started MariaDB 10.4.12 database server.
root@ubuntu-xenial:~# systemctl status ma
machine.slice                mail-transport-agent.target  mariadb.service
root@ubuntu-xenial:~# systemctl status mariadb.service
● mariadb.service - MariaDB 10.4.12 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Tue 2020-04-07 18:29:47 UTC; 23s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 4182 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─4182 /usr/sbin/mysqld

Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Plugin 'FEEDBACK' is disabled.
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] InnoDB: Buffer pool(s) load completed at 200407 18:29:47
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Server socket created on IP: '127.0.0.1'.
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Reading of all Master_info entries succeeded
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Added new Master_info '' to hash table
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] /usr/sbin/mysqld: ready for connections.
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: Version: '10.4.12-MariaDB-1:10.4.12+maria~xenial-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
Apr 07 18:29:47 ubuntu-xenial systemd[1]: Started MariaDB 10.4.12 database server.
Apr 07 18:29:47 ubuntu-xenial systemd[1]: Started MariaDB 10.4.12 database server.
root@ubuntu-xenial:~# systemctl status mysqld.service
● mariadb.service - MariaDB 10.4.12 database server
   Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: active (running) since Tue 2020-04-07 18:29:47 UTC; 52s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 4182 (mysqld)
   Status: "Taking your SQL requests now..."
   CGroup: /system.slice/mariadb.service
           └─4182 /usr/sbin/mysqld

Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Plugin 'FEEDBACK' is disabled.
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] InnoDB: Buffer pool(s) load completed at 200407 18:29:47
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Server socket created on IP: '127.0.0.1'.
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Reading of all Master_info entries succeeded
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] Added new Master_info '' to hash table
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: 2020-04-07 18:29:47 0 [Note] /usr/sbin/mysqld: ready for connections.
Apr 07 18:29:47 ubuntu-xenial mysqld[4182]: Version: '10.4.12-MariaDB-1:10.4.12+maria~xenial-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
Apr 07 18:29:47 ubuntu-xenial systemd[1]: Started MariaDB 10.4.12 database server.
Apr 07 18:29:47 ubuntu-xenial systemd[1]: Started MariaDB 10.4.12 database server.
root@ubuntu-xenial:~#

@mcrauwel
Copy link
Contributor Author

mcrauwel commented Apr 7, 2020

Conclusion:

  • On yum based systems, the mysql service is named mysqld.service
  • On apt based systems, the mysql service is named mysql.service

MariaDB responds to mysqld.service, mysql.service and mariadb.service.

@mcrauwel
Copy link
Contributor Author

mcrauwel commented Apr 7, 2020

this change should cover all bases @shlomi-noach

@shlomi-noach
Copy link
Collaborator

Closes #229

@shlomi-noach shlomi-noach merged commit b4c4d5a into openark:master Apr 8, 2020
@mcrauwel mcrauwel deleted the system-dependency-check branch April 8, 2020 12:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants