Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 466706 - dev-db/mariadb-5.5.29 - add "galera" (or other named) useflag
Summary: dev-db/mariadb-5.5.29 - add "galera" (or other named) useflag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Gentoo Linux MySQL bugs team
URL:
Whiteboard:
Keywords: InOverlay
: 476868 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-21 17:16 UTC by Denis Kaganovich
Modified: 2014-08-01 22:24 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mariadb-galera-useflag.patch (mariadb-galera-useflag.patch,795 bytes, patch)
2013-04-21 17:20 UTC, Denis Kaganovich
Details | Diff
galera-23.2.4.ebuild (galera-23.2.4.ebuild,935 bytes, text/plain)
2013-06-17 08:10 UTC, Thomas Oettli
Details
metadata.xml (metadata.xml,234 bytes, text/xml)
2013-06-17 08:11 UTC, Thomas Oettli
Details
galera-23.2.4-unused-result-error.patch (galera-23.2.4-unused-result-error.patch,523 bytes, patch)
2013-06-17 08:11 UTC, Thomas Oettli
Details | Diff
garbd.confd (garbd.confd,443 bytes, text/plain)
2013-06-17 08:12 UTC, Thomas Oettli
Details
garbd.initd (garbd.initd,1.36 KB, text/plain)
2013-06-17 08:12 UTC, Thomas Oettli
Details
garbd.confd (garbd.confd,466 bytes, text/plain)
2013-08-21 14:07 UTC, Thomas Oettli
Details
garbd.initd (garbd.initd,1.29 KB, text/plain)
2013-08-21 14:08 UTC, Thomas Oettli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Kaganovich 2013-04-21 17:16:43 UTC
I suggest to simple add mariadb-galera into same version ebuilds (now - 5.5.29) as USE flag. Next attaching working ebuild patch.


Reproducible: Always
Comment 1 Denis Kaganovich 2013-04-21 17:20:48 UTC
Created attachment 346222 [details, diff]
mariadb-galera-useflag.patch

IMHO this way is most minimalistic. But, fast check looks like patchlevel is near 5.5.30 (unsure).
Comment 2 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2013-05-01 02:10:38 UTC
dev-db/mariadb-galera was added to the mysql overlay.
Comment 3 Thomas Oettli 2013-06-17 08:08:48 UTC
The mariadb-galera package seems to work, I was able to install it on my system without any problems.

But to run a Galera Cluster, the Galera Replicator is mandatory.
I created an ebuild (dev-libs/galera), which installs the Galera Replicator and the Galera Arbitrator, if the "garb" useflag is activated.

Could you please add this ebuild to the mysql overlay and to the offical portage later on?
Comment 4 Thomas Oettli 2013-06-17 08:10:37 UTC
Created attachment 351178 [details]
galera-23.2.4.ebuild
Comment 5 Thomas Oettli 2013-06-17 08:11:11 UTC
Created attachment 351180 [details]
metadata.xml
Comment 6 Thomas Oettli 2013-06-17 08:11:44 UTC
Created attachment 351182 [details, diff]
galera-23.2.4-unused-result-error.patch
Comment 7 Thomas Oettli 2013-06-17 08:12:16 UTC
Created attachment 351184 [details]
garbd.confd
Comment 8 Thomas Oettli 2013-06-17 08:12:40 UTC
Created attachment 351186 [details]
garbd.initd
Comment 9 Brian Evans (RETIRED) gentoo-dev 2013-06-17 12:39:19 UTC
sys-cluster/galera was added to the overlay a few days ago.

Thanks for the contribution.
There may be some improvements to be made from your ebuild as a reference.
Comment 10 Thomas Oettli 2013-06-18 06:43:41 UTC
Thanks for your answer, didn't see that it was in the overlay already.

The ebuild it self looks good to me, I just think that my rewritten version of the init script is a little bit better than the original one. It is smaller and gentoo specific.

Right now, the init script is the only thing which prevents me from using the ebuild from the overlay.

What do you think about that?
Comment 11 Jeroen Roovers (RETIRED) gentoo-dev 2013-07-15 10:53:12 UTC
*** Bug 476868 has been marked as a duplicate of this bug. ***
Comment 12 Thomas Oettli 2013-08-21 10:00:39 UTC
Please give me a feedback about my rewritten version of the init script.
It would be great to use this version instead of the original one.
Please add it to the overlay.
Comment 13 Brian Evans (RETIRED) gentoo-dev 2013-08-21 12:30:19 UTC
(In reply to Thomas Oettli from comment #12)
> Please give me a feedback about my rewritten version of the init script.
> It would be great to use this version instead of the original one.
> Please add it to the overlay.

I don't see major differences that would keep the one in the overlay from working.  
Can you please explain why yours is better?
Comment 14 Thomas Oettli 2013-08-21 14:01:12 UTC
(In reply to Brian Evans from comment #13)
> (In reply to Thomas Oettli from comment #12)
> > Please give me a feedback about my rewritten version of the init script.
> > It would be great to use this version instead of the original one.
> > Please add it to the overlay.
> 
> I don't see major differences that would keep the one in the overlay from
> working.  
> Can you please explain why yours is better?

The difference is that my start script runs the daemon with the user/group garb. This daemon really doesn't need root privileges.
Of course, the user/group garb should be created by the ebuild.

Further, my init script handles the nodes specified in GALERA_NODES perfectly, there are no visible error messages from netcat (e.g. if there are only hostnames specified in GALERA_NODES (no ports), or if all nodes are offline).

And at last, if I start the daemon with my init script, rc-status shows it as running and not as crashed.
I improved my version of the init script so the location of the pidfile is configurable, I will upload it immediately.


Today, I changed to the galera ebuild from the overlay and found a small issue in the ebuild.

The following to lines are not correct:
   newconfd "${FILESDIR}/garbd.cnf" garbd
   newinitd "${FILESDIR}/garbd.sh" garbd

The problem is that the files in the files directory are called garb.cnf and garb.sh instead of garbd.cnf and garbd.sh ;-)

I hope that we will be able to get the best possible result if we combine your work and mine.
Comment 15 Thomas Oettli 2013-08-21 14:07:18 UTC
Created attachment 356592 [details]
garbd.confd
Comment 16 Thomas Oettli 2013-08-21 14:08:08 UTC
Created attachment 356594 [details]
garbd.initd
Comment 17 Brian Evans (RETIRED) gentoo-dev 2013-08-21 17:28:44 UTC
Changes posted in the overlay as a revbump.

Please test.
Comment 18 Thomas Oettli 2013-08-27 11:07:51 UTC
(In reply to Brian Evans from comment #17)
> Changes posted in the overlay as a revbump.
> 
> Please test.

Tested the new versions of the ebuild and the init script, everything looks fine for me. Thanks alot ;-)
Comment 19 Steve Yin 2013-10-14 10:06:49 UTC
just want to make it simple, I'm not a gentoo developer, but the galera support is already done in mysql-v2.eclass, 

then in ebuild, I think it might be simple to do this: add a galera use flag, if galera is set, then change the PN to mariadb-galera. then eclass will take care everything.

please check /usr/portage/eclass/mysql-v2.eclass, it also have the support for percona-server.

But I really don't understand why these feature already exists in eclass but not in ebuild.
Comment 20 Brian Evans (RETIRED) gentoo-dev 2013-10-14 12:26:05 UTC
(In reply to Steve Yin from comment #19)
> just want to make it simple, I'm not a gentoo developer, but the galera
> support is already done in mysql-v2.eclass, 
> 
> then in ebuild, I think it might be simple to do this: add a galera use
> flag, if galera is set, then change the PN to mariadb-galera. then eclass
> will take care everything.
> 
> please check /usr/portage/eclass/mysql-v2.eclass, it also have the support
> for percona-server.
> 
> But I really don't understand why these feature already exists in eclass but
> not in ebuild.

The ebuilds exist in the official mysql overlay.

The team is wondering how popular the galera option is to include it in the tree or leave it in the overlay for now.
Comment 21 Leho Kraav (:macmaN @lkraav) 2013-10-14 12:48:37 UTC
Well, including in tree would lessen my workload for sure :) so here's one interested party.

But overall, I'm not sure how to determine the popularity.
Comment 22 Steve Yin 2013-10-14 14:02:52 UTC
well, I don't think this should be determined by the popularity.. As the only open-sources multi-master replication solution for mysql/mariadb, it should be the standard feature provided by portage, as for postgresql, we have pgpool to do that.

I think this is a must have feature. and should not be determined by the needs of popularity.
Comment 23 Thomas Oettli 2013-10-17 14:10:56 UTC
(In reply to Steve Yin from comment #22)
> well, I don't think this should be determined by the popularity.. As the
> only open-sources multi-master replication solution for mysql/mariadb, it
> should be the standard feature provided by portage, as for postgresql, we
> have pgpool to do that.
> 
> I think this is a must have feature. and should not be determined by the
> needs of popularity.

I totally agree with you.
It should be the standard in portage, because it's the only solution to cluster mariadb.

Personally, I use a MariaDB-Galera-Cluster on my private servers and on some productive systems in my company.
Comment 24 Josh G 2013-11-13 13:47:35 UTC
>The team is wondering how popular the galera option is to include it 
> in the tree or leave it in the overlay for now.

+1 vote for it being in the tree
Comment 25 Leho Kraav (:macmaN @lkraav) 2014-03-18 00:46:42 UTC
How come the dev-db/mariadb-galera-5.5.35 ebuild still doesn't install a systemd unit?
Comment 26 Leho Kraav (:macmaN @lkraav) 2014-03-18 00:49:13 UTC
Sometimes it takes writing a silly comment to remember dev-db/mysql-init-scripts
Comment 27 Robin Kauffman 2014-04-17 19:00:52 UTC
Is there a forthcoming bump of mariadb-galera to 10.0.{7,10} in the MySQL overlay?
Comment 28 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-04-25 00:26:17 UTC
(In reply to Robin Kauffman from comment #27)
> Is there a forthcoming bump of mariadb-galera to 10.0.{7,10} in the MySQL
> overlay?

http://git.overlays.gentoo.org/gitweb/?p=proj/mysql.git;a=commit;h=cceab9b8e72b1a23e76e812406b3210c3fe19f88

done
Comment 29 Brian Evans (RETIRED) gentoo-dev 2014-07-30 17:36:24 UTC
dev-db/mariadb-galera and sys-cluster/galera are now in the main tree
Comment 30 Bertrand Jacquin 2014-07-30 18:46:22 UTC
(In reply to Brian Evans from comment #29)
> dev-db/mariadb-galera and sys-cluster/galera are now in the main tree

Thank you Brian. Why do we have a distinction between dev-db/mariadb-galera and dev-db/mariadb ? Why not a USE flag ?
Comment 31 Brian Evans (RETIRED) gentoo-dev 2014-07-30 19:22:36 UTC
(In reply to Bertrand Jacquin from comment #30)
> (In reply to Brian Evans from comment #29)
> > dev-db/mariadb-galera and sys-cluster/galera are now in the main tree
> 
> Thank you Brian. Why do we have a distinction between dev-db/mariadb-galera
> and dev-db/mariadb ? Why not a USE flag ?

1) They have different release schedules.  That is difficult if not impossible to manage with a USE flag.

2) sys-cluster/galera is not proven to work on all architectures that MariaDB does.  The author only accounts for amd64, x86 and ppc64 (and SunOS) in the build system. Therefore, the keywords are different.  While this could be managed, the first reason is the major one.
Comment 32 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2014-08-01 22:24:47 UTC
(In reply to Bertrand Jacquin from comment #30)
> (In reply to Brian Evans from comment #29)
> > dev-db/mariadb-galera and sys-cluster/galera are now in the main tree
> 
> Thank you Brian. Why do we have a distinction between dev-db/mariadb-galera
> and dev-db/mariadb ? Why not a USE flag ?

different upstream sources, it's not simply a flag on base mariadb.