Summary: | net-dns/bind init script (named) should need mysql if USE=bind-mysql | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Martin Lindquist <bugs.gentoo.org> |
Component: | [OLD] Server | Assignee: | Konstantin Arkhipov (RETIRED) <voxus> |
Status: | RESOLVED LATER | ||
Severity: | enhancement | CC: | gentoo.bugs, jakub, uberlord, vivo |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Martin Lindquist
2005-11-19 14:54:28 UTC
I noticed after attempting to quick-fix this by inserting 'need mysql' into depend() in /etc/init.d/named that /etc/init.d/mysql has 'need named' in its depend(), which it informed me of when caching dependencies while running another init script. A somewhat dirty fix might be to have another init script run after mysql ('need mysql' and 'need named') and send SIGHUP to named (or use rndc), but perhaps someone has a better suggestion? it will cause a lot of voodoo in making 'personalized' init-scripts. mysql, berkdb, postgresql.. it will cause testing overhead too. *** Bug 121175 has been marked as a duplicate of this bug. *** (In reply to comment #1) > I noticed after attempting to quick-fix this by inserting 'need mysql' into > depend() in /etc/init.d/named that /etc/init.d/mysql has 'need named' Not here (CCing vivo to confirm): use dns net (non-slotted mysql-4.0) use dns net localmount netmount nfsmount (slotted mysql ebuilds) Adding need mysql to /etc/init.d/named works fine: # /etc/init.d/named stop * Re-caching dependency info (mtimes differ)... * Stopping chrooted named ... [ ok ] wac init.d # /etc/init.d/mysql stop * Stopping mysqld (/etc/mysql/my.cnf) ... [ ok ] wac init.d # /etc/init.d/named start * Starting mysqld (/etc/mysql/my.cnf) ... [ ok ] * Starting chrooted named ... Should be doable with a bit of sed magic based on use flags, no messing with mysql init scripts is required. confirmed, latest changes to the rc scripts after bug #108532 > Adding need mysql to /etc/init.d/named works fine:
try to add and/or remove named and or/mysql from default run level. you'll get:
* Service 'named' NEED service 'mysql', but service 'mysql' wants
* to USE service 'named'!
(In reply to comment #6) > > Adding need mysql to /etc/init.d/named works fine: > > try to add and/or remove named and or/mysql from default run level. you'll get: > > * Service 'named' NEED service 'mysql', but service 'mysql' wants > * to USE service 'named'! > Shrug. No such issue here... # grep need /etc/init.d/named need net mysql # rc-update del named * named removed from the following runlevels: default * rc-update complete. # rc-update add named default * named added to runlevel default * rc-update complete. what's your baselayout version? (In reply to comment #8) > what's your baselayout version? Never mind, reproduced now (looks like the caching has been playing around with that, so the issue only shows up later on). Doesn't seem to break anything however, just get the message you posted in Comment #6 but the services still start properly. Probably uberlord will have better explanation for this warning, I'll CC him. It's a classic chicken and egg situation - which comes first? bind can store its zone files in a mysql db mysql requires dns Now, as both init script need/use each other you get a circular dependency which is what the warning is about, so the ordering is not guaranteed. Technically one has to start before the order - but which one? We have no way of knowing in baselayout. Most people will not be storing their bind zones in a mysql db, so I suggest that mysql USES dns. bind should have no reference to mysql, but both the bind and mysql init scripts, configs and ebuilds should have a big fat warning about this situation and the user should tailor their init.d mysql and named scripts. That's just my optinion however. We are trying to work towards a possible solution for this in baselayout-1.13, but it's not going to be in portage for a long time yet. (In reply to comment #10) > mysql requires dns Well, it doesn't - "use dns net". Better said, I feel that we shouldn't be getting any warning unless there's "need dns". mysql can use dns, doesn't need it, isn't that the difference between use and need? There's should be warning (maybe rather error) in case of circular "need" statement, but not in this case. But maybe I missed something :) (In reply to comment #11) > (In reply to comment #10) > > mysql requires dns > > Well, it doesn't - "use dns net". Better said, I feel that we shouldn't be > getting any warning unless there's "need dns". mysql can use dns, doesn't need > it, isn't that the difference between use and need? There's should be warning > (maybe rather error) in case of circular "need" statement, but not in this > case. But maybe I missed something :) > The only difference between need and use is that if a needed service fails to start, we fail to start otherwise we try and start. > We are trying to work towards a possible
> solution for this in baselayout-1.13, but it's
> not going to be in portage for a long time yet.
so, we'll wait for it.
2 Years later ... still waiting :) though if it was fixed, the fix was forgotten for postgresql. My postgres starts fine, my named fails to start. Since baselayout 2 is almost ready, do we have something for it there? Do we now wait for that? enterprise ~ # emerge --info Portage 2.1.4.5 (hardened/amd64/multilib, gcc-3.4.6, glibc-2.6.1-r0, 2.6.25-hardened-r7 x86_64) ================================================================= System uname: 2.6.25-hardened-r7 x86_64 Intel(R) Xeon(TM) CPU 3.00GHz Timestamp of tree: Mon, 13 Oct 2008 16:21:01 +0000 app-shells/bash: 3.2_p33 dev-lang/python: 2.5.2-r7 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r2 sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-Os -march=nocona -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /opt/glftpd/etc /opt/glftpd/ftp-data /var/bind" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-Os -march=nocona -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://mirror.scarlet-internet.nl/pub/gentoo ftp://mirror.nutsmaas.nl/gentoo/" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/nx /usr/portage/local/layman/webapps-experimental /usr/local/portage" SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage" USE="7zip X a52 aac acpi aim alsa amd64 amr apache2 apm authdaemond avahi bash-completion bcmath berkdb bindist bzip2 bzlib cairo calendar cdr cli console cracklib cross crypt ctype cups curl curlwrappers dba dbus dedicated dlz dts dvb dvd dvdr encode exif fam fastcgi ffmpeg fftw firefox flash foomatic foomaticdb ftp gcc64 gd ggi gif glitz gnutls gstreamer gtk hal hardened icq idn imagemagick imap imlib ipv6 jabber jbig jpeg jpeg2k justify kerberos ldap lesstif libwww logrotate mad maildir mcal mdnsresponder-compat memlimit mhash midi mikmod mime mmap mng mp3 mp4 mp4live mpeg mpeg2 msn multilib ncurses netpbm nls nocd nptl nptlonly ogg oggvorbis opengl oscar pam pcre php pic plugins png posix postfix postgres ppds pulseaudio rdesktop readline resolvconf rle samba sasl sdl server session shared sharedmem simplexml slang slp snmp sockets sound spell sse sse2 ssl svg sysfs szip tcpd tetex theora thunderbird tidy tiff tokenizer truetype unicode unzip urandom usb vda vhosts videos vnc vorbis x264 xinetd xml xml2 xmlreader xmlrpc xmlwriter xorg xvid yahoo yp zeroconf zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias jk" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="radeon" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS |