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

innotop/percona-toolkit pull installtion leaves p5-DBD-mysql client broken. #22

Open
stevenwilliamson opened this issue Aug 14, 2015 · 4 comments

Comments

@stevenwilliamson
Copy link

Steps to reproduce:

[root@test1 ~]# pkgin in mysql-server-5.5.38
[root@test1 ~]# pkgin in innotop

This results in output:

downloading packages...
p5-Term-ReadKey-2.30nb7.tgz                                                                                                                                                                                                                                   100%   27KB  27.5KB/s  27.5KB/s   00:00
p5-DBI-1.631nb1.tgz                                                                                                                                                                                                                                           100%  765KB 764.9KB/s 764.9KB/s   00:01
p5-DBD-percona56-cluster-4.027nb1.tgz                                                                                                                                                                                                                         100%  228KB 228.4KB/s 228.4KB/s   00:00
innotop-1.9.1nb1.tgz                                                                                                                                                                                                                                          100%  147KB 147.1KB/s 147.1KB/s   00:01
installing packages...
installing p5-Term-ReadKey-2.30nb7...
installing p5-DBI-1.631nb1...
installing p5-DBD-percona56-cluster-4.027nb1...
installing innotop-1.9.1nb1...
pkg_install warnings: 0, errors: 2
pkg_install error log can be found in /var/db/pkgin/pkg_install-err.log
reading local summary...
processing local summary...
updating database: 100%
marking innotop-1.9.1nb1 as non auto-removable

And then trying to run innotop

ocalhost PROCESSLIST_NO_IS: install_driver(mysql) failed: Can't load '/opt/local/lib/perl5/vendor_perl/5.20.0/x86_64-solaris-thread-multi-64/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: perl: fatal: libmysqlclient.so.18: open failed: No such file or directory at /opt/local/lib/perl5/5.20.0/x86_64-solaris-thread-multi-64/DynaLoader.pm line 193.
 at (eval 519) line 3.
Compilation failed in require at (eval 519) line 3.
Perhaps a required shared library or dll isn't installed where expected
 at /opt/local/bin/innotop line 7592.

The Issue

The same issue is present in percona-toolkit. The issue is the regexp dependency they both share https://github.com/joyent/pkgsrc-joyent/blob/master/innotop/Makefile#L15

If no p5-DBD has been installed pkgsrc always attempt to satisfy that dep by installing percona-cluster-DBD. This in turn also attempt to install percona-cluster-server which then fails due to conflicts with the already installed mysql-server.

pkgin log file

---Aug 14 00:12:27: installing libevent-2.0.21nb3...
---Aug 14 00:12:27: installing editline-3.1.20130712nb1...
---Aug 14 00:12:27: installing perl-5.20.0nb2...
---Aug 14 00:12:28: installing mysql-client-5.1.72nb3...
---Aug 14 00:12:29: installing mysql-server-5.1.72nb1...
---Aug 14 00:13:49: installing p5-Term-ReadKey-2.30nb7...
---Aug 14 00:13:49: installing p5-DBI-1.631nb1...
---Aug 14 00:13:49: installing p5-DBD-percona56-cluster-4.027nb1...
pkg_add: Package `percona-cluster-5.6.21nb3' conflicts with `{mysql,percona}*-{client,server}-[0-9]*', and `mysql-client-5.1.72nb3' is installed.
pkg_add: Can't install dependency percona-cluster>=5.6.15<5.7, continuing
pkg_add: Package `percona-cluster-5.6.21nb3' conflicts with `{mysql,percona}*-{client,server}-[0-9]*', and `mysql-client-5.1.72nb3' is installed.
pkg_add: Can't install dependency percona-cluster>=5.6.15, continuing
---Aug 14 00:13:51: installing innotop-1.9.1nb1...

Im not sure what the fix should be here, but it is suboptimal at the moment. The issue is there isn't enough information present at package install time for pkgsrc to pick the correct p5-DBD package to fulfil the dependency. As the correct package can only be determined by inspecting what is already installed.

Having deps evaluated at runtime supporting some kind of conditional could be a solution:

if "mysql-server" installed; p5-dep = p5-dep-variant1
if "percona-server" install; p5-dep = p5-dep-variant2

This might not be the best solution and would require a lot of effort on the face of it.

@mamash
Copy link
Contributor

mamash commented Aug 14, 2015

The current workaround is to prefer one of the p5-DBD-* packages by preinstalling e.g. p5-DBD-mysql56. The only other way around I can think of is to build innotop prefixed for each flavor (e.g. mysql56-innotop or innotop-mysql56).

@stevenwilliamson
Copy link
Author

Yes this is the work around I am currently using with the logic held in a puppet module to ensure the correct p5-DBD is installed before innotop/percona-toolkit. Gory if/else here in case it's useful to anyone else https://gist.github.com/stevenwilliamson/c10bc2125c573b1c6058

(Slightly different issue but related) The deps are little surprising though, i would not envisage that by default on a fresh system if I installed just innotop

pkgin in innotop

It would result in pulling in the full percona-cluster server, when it's perfectly acceptable to install just innotop and p5-DBD-mysql. innotop/percona-toolkit will connect to remote MySQL instances.

p5-DBD-{variants} should only require a mysql client library and not depend on a full server install?

@mamash
Copy link
Contributor

mamash commented Aug 14, 2015

The cluster packages are monolithic. And the regexp is evaluated in a mere alphabetic manner I'm afraid, i.e. the Percona cluster is regarded as the "most recent.

F.

    1. 2015 v 13:12, Steven Williamson [email protected]:

Yes this is the work around I am currently using with the logic held in a puppet module to ensure the correct p5-DBD is installed before innotop/percona-toolkit. Gory if/else here in case it's useful to anyone else https://gist.github.com/stevenwilliamson/c10bc2125c573b1c6058

(Slightly different issue but related) The deps are little surprising though, i would not envisage that by default on a fresh system if I installed just innotop

pkgin in innotop
It would result in pulling in the full percona-cluster server, when it's perfectly acceptable to install just innotop and p5-DBD-mysql. innotop/percona-toolkit will connect to remote MySQL instances.

p5-DBD-{variants} should only require a mysql client library and not depend on a full server install?


Reply to this email directly or view it on GitHub.

@mamash
Copy link
Contributor

mamash commented Aug 14, 2015 via email

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

No branches or pull requests

2 participants