vStone / puppet-percona

EOL: Please use puppetlabs mysql.
Other
4 stars 9 forks source link

Percona 5.6 at Debian 7 #17

Open LPby opened 10 years ago

LPby commented 10 years ago

Hello!

I've installed modules:

/etc/puppet/modules
├── puppetlabs-apt (v1.4.2)
├── puppetlabs-stdlib (v4.1.0)
└── vStone-percona (v1.3.1)

created manifest:

node puppet-client {
apt::source { 'percona':
  location          => 'http://repo.percona.com/apt',
  release           => 'wheezy',
  repos             => 'main',
  key               => '1C4CBDCDCD2EFD2A',
  key_server        => 'keys.gnupg.net',
}

class { 'apt': }

class { 'percona':
    server => true,
    percona_version => '5.6',
}

Class['apt'] ->
Class['percona']
}

And got error:

# puppet agent -t 
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/mysql_facts.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/meminbytes.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Caching catalog for puppet-client.local
Info: Applying configuration version '1396942503'
Notice: /Stage[main]/Main/Node[puppet-client]/Apt::Source[percona]/Apt::Key[Add key: 1C4CBDCDCD2EFD2A from Apt::Source percona]/Exec[d862c9101408438167b0ad0d2b8622a9f35e344c]/returns: executed successfully
Notice: /Stage[main]/Main/Node[puppet-client]/Apt::Source[percona]/File[percona.list]/ensure: created
Info: /Stage[main]/Main/Node[puppet-client]/Apt::Source[percona]/File[percona.list]: Scheduling refresh of Exec[apt_update]
Notice: /Stage[main]/Apt::Update/Exec[apt_update]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Percona::Install/Package[percona-server-common-5.6]/ensure: ensure changed 'purged' to 'present'
Notice: /Stage[main]/Percona::Install/Package[percona-server-client-5.6]/ensure: ensure changed 'purged' to 'present'
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install percona-server-server-5.6' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libaio1
Suggested packages:
  tinyca
The following NEW packages will be installed:
  libaio1 percona-server-server-5.6
0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.
Need to get 19.4 MB of archives.
After this operation, 70.9 MB of additional disk space will be used.
Get:1 http://ftp.by.debian.org/debian/ wheezy/main libaio1 amd64 0.3.109-3 [9150 B]
Get:2 http://repo.percona.com/apt/ wheezy/main percona-server-server-5.6 amd64 5.6.16-64.2-569.wheezy [19.4 MB]
Preconfiguring packages ...
Fetched 19.4 MB in 41s (469 kB/s)
Selecting previously unselected package libaio1:amd64.
(Reading database ... 33902 files and directories currently installed.)
Unpacking libaio1:amd64 (from .../libaio1_0.3.109-3_amd64.deb) ...
Selecting previously unselected package percona-server-server-5.6.
Unpacking percona-server-server-5.6 (from .../percona-server-server-5.6_5.6.16-64.2-569.wheezy_amd64.deb) ...
Processing triggers for man-db ...
Setting up libaio1:amd64 (0.3.109-3) ...
Setting up percona-server-server-5.6 (5.6.16-64.2-569.wheezy) ...
Stopping MySQL (Percona Server): mysqld.

 * Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
 * Run the following commands to create these functions:

    mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
    mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
    mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"

 * See http://www.percona.com/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details

Starting MySQL (Percona Server) database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing percona-server-server-5.6 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 percona-server-server-5.6
E: Sub-process /usr/bin/dpkg returned an error code (1)

Error: /Stage[main]/Percona::Install/Package[percona-server-server-5.6]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install percona-server-server-5.6' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  libaio1
Suggested packages:
  tinyca
The following NEW packages will be installed:
  libaio1 percona-server-server-5.6
0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.
Need to get 19.4 MB of archives.
After this operation, 70.9 MB of additional disk space will be used.
Get:1 http://ftp.by.debian.org/debian/ wheezy/main libaio1 amd64 0.3.109-3 [9150 B]
Get:2 http://repo.percona.com/apt/ wheezy/main percona-server-server-5.6 amd64 5.6.16-64.2-569.wheezy [19.4 MB]
Preconfiguring packages ...
Fetched 19.4 MB in 41s (469 kB/s)
Selecting previously unselected package libaio1:amd64.
(Reading database ... 33902 files and directories currently installed.)
Unpacking libaio1:amd64 (from .../libaio1_0.3.109-3_amd64.deb) ...
Selecting previously unselected package percona-server-server-5.6.
Unpacking percona-server-server-5.6 (from .../percona-server-server-5.6_5.6.16-64.2-569.wheezy_amd64.deb) ...
Processing triggers for man-db ...
Setting up libaio1:amd64 (0.3.109-3) ...
Setting up percona-server-server-5.6 (5.6.16-64.2-569.wheezy) ...
Stopping MySQL (Percona Server): mysqld.

 * Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.
 * Run the following commands to create these functions:

    mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"
    mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"
    mysql -e "CREATE FUNCTION murmur_hash RETURNS INTEGER SONAME 'libmurmur_udf.so'"

 * See http://www.percona.com/doc/percona-server/5.6/management/udf_percona_toolkit.html for more details

Starting MySQL (Percona Server) database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing percona-server-server-5.6 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 percona-server-server-5.6
E: Sub-process /usr/bin/dpkg returned an error code (1)

Notice: /Stage[main]/Percona::Config::Server/File[/etc/mysql]: Dependency Package[percona-server-server-5.6] has failures: true
Warning: /Stage[main]/Percona::Config::Server/File[/etc/mysql]: Skipping because of failed dependencies
Notice: /Stage[main]/Percona::Config::Server/File[/var/log/percona]: Dependency Package[percona-server-server-5.6] has failures: true
Warning: /Stage[main]/Percona::Config::Server/File[/var/log/percona]: Skipping because of failed dependencies
Notice: /Stage[main]/Percona::Config::Server/File[/etc/mysql/my.cnf]: Dependency Package[percona-server-server-5.6] has failures: true
Warning: /Stage[main]/Percona::Config::Server/File[/etc/mysql/my.cnf]: Skipping because of failed dependencies
Notice: /Stage[main]/Percona::Config::Server/File[/etc/mysql/conf.d]: Dependency Package[percona-server-server-5.6] has failures: true
Warning: /Stage[main]/Percona::Config::Server/File[/etc/mysql/conf.d]: Skipping because of failed dependencies
Notice: /Stage[main]/Percona::Service/Service[mysql]: Dependency Package[percona-server-server-5.6] has failures: true
Warning: /Stage[main]/Percona::Service/Service[mysql]: Skipping because of failed dependencies
Notice: Finished catalog run in 112.74 seconds

The same situation when I try install percona server without modules via "package", "exec" and even through script. What am I doing wrong?

vStone commented 10 years ago

Perhaps try dpkg-reconfigure percona-server-server-5.6

vStone commented 10 years ago

@LPby: I tried your manifest and it runs fine here. Does your machine by any chance already have a mysql version and/or libraries installed before putting percona on there? This has been known to cause issues.

LPby commented 10 years ago

I can't run dpkg-reconfigure until mysql installed.

root@puppet-client:~# aptitude search mysql | grep ^i
root@puppet-client:~# ls /etc/my*
ls: cannot access /etc/my*: No such file or directory
root@puppet-client:~# ls /var/lib/mysql
ls: cannot access /var/lib/mysql: No such file or directory
root@puppet-client:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 7.4 (wheezy)
Release:    7.4
Codename:   wheezy
LPby commented 10 years ago

After percona installation via puppet failed, the pachage percona-server-server-5.6 is at not configured state. I can run dpkg-reconfigure percona-server-server-5.6 manually and solve the problem. But the point is to automate installation.

vStone commented 10 years ago

I've seen this behavior before with percona packages. Mostly its a libmysqlclient* which is already installed that is conflicting.

LPby commented 10 years ago

I've cleaned all mysql components before:

root@puppet-client:~# aptitude search mysql | grep libmysqlclient
p   libmysqlclient-dev              - MySQL database development files      
v   libmysqlclient15-dev            -                                          
p   libmysqlclient18                - MySQL database client library       
SoldierCorp commented 9 years ago

I have issues using Percona 5.6 with CentOS 7, the installation cannot be completed because this dependency cannot be found Percona-SQL-Shared-Compat.

Any ideas please?