Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 75514 - ypbind doesnt display a helpful error
Summary: ypbind doesnt display a helpful error
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-23 20:53 UTC by Jacob Joseph
Modified: 2005-01-30 11:39 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacob Joseph 2004-12-23 20:53:22 UTC
After updating my system, I am unable to start ypbind, and receive only the following output:
root # /etc/init.d/ypbind start
 * ERROR:  Problem starting needed services.
 *         "ypbind" was not started.

It turns out that this is related to domainname service, which in itself prints absolutely nothing:
root # /etc/init.d/domainname start
root #  

In fact, the eerror lines which do provide the necessary information to fix the problem, by adding an /etc/nisdomainname, are commented out for some reason.  By breaking, and producing absolutely no error output, this update of yp-tools has proved especially annoying.  

To save others such hassle, can we please have the domainname script print errors when it can do nothing else.  Additionally, can ypbind indicate which dependencies failed?  Lastly, what is the motivation for the new configuration method and could the respective configuration files simply be created from a quick read of the old yp config files?

-Jacob

Reproducible: Always
Steps to Reproduce:
Comment 1 SpanKY gentoo-dev 2004-12-24 01:40:49 UTC
run `emerge baselayout ypbind --noconfmem`, then `etc-update`

see if your system is still broken after that
Comment 2 Derick Swanepoel 2005-01-05 01:02:39 UTC
I have the same problem (baselayout-1.9.4-r6, ypbind-1.17.2-r1). Remerging them as SpanKY suggested did not fix it. ypbind only starts if a domainname is set in /etc/dnsdomainname. I'd say this is a pretty serious bug (there is no way to know from ypbind's failure message what one is supposed to do).
Comment 3 Jacob Joseph 2005-01-05 12:55:30 UTC
Indeed, SpanKY's suggestion did not work for me.  Aside from the lack of error output, which absolutely needs correction, I consider the requirement for a /etc/dnsdomainname to be a significant bug in itself.  It necessitates more maintenance of NIS machines and is in no way a dependency of ypbind.

-Jacob
Comment 4 SpanKY gentoo-dev 2005-01-05 15:20:40 UTC
are you both running baselayout-1.9.x ?
Comment 5 Derick Swanepoel 2005-01-24 00:08:50 UTC
As stated in my previous comment, I'm using baselayout-1.9.4-r6 (lastest stable x86).
Comment 6 SpanKY gentoo-dev 2005-01-28 23:10:24 UTC
so the only issue here is that ypbind isnt helpful
Comment 7 Derick Swanepoel 2005-01-29 04:29:16 UTC
No, the major issue is that the ypbind initscript depends on domainname to be
started. The second issue is that domainname fails silently if either the NIS
domainname or the DNS domainname can't be set.

Proposed solution for the first problem: It should not be necessary to set the
DNS domainname for ypbind to work.

Proposed solution for the second problem: The domainname script should print
error messages when the checks for setting NIS and DNS domainnames fail.
(There are already error messages, but they are commented out.)
Comment 8 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-29 18:53:17 UTC
> No, the major issue is that the ypbind initscript depends on domainname to be
> started.

How is that an issue.  ypbind needs the nis domainname set.

> The second issue is that domainname fails silently if either the NIS
> domainname or the DNS domainname can't be set.

Ok, that is a problem that should be fixed then.

> Proposed solution for the first problem: It should not be necessary to set 
> the DNS domainname for ypbind to work.

/etc/init.d/domainname sets the nis domainname as well.  THAT is the required functionality.
Comment 9 Jacob Joseph 2005-01-29 22:51:10 UTC
>> No, the major issue is that the ypbind initscript depends on domainname to be
>> started.
>How is that an issue.  ypbind needs the nis domainname set.

ypbind needs the NIS domain name set, *not* the DNS domain name.  Having both as a dependency unnecessarily complicates NIS setup.

-Jacob 
Comment 10 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-29 23:50:34 UTC
Jacob:  I think you don't understand how the init scripts work.  It's just saying that domainname needs to be run first... this is because it needs the nisdomain set.  domainname ALSO sets the dns domainname if you want it to.  This has NO consequences for NIS.  Hell, if you don't want it to set the DNS domainname, then just don't have it set the DNS domainname by editing /etc/conf.d/domainname.
Comment 11 Derick Swanepoel 2005-01-30 04:54:38 UTC
I think the main culprit in this problem is line 33 in /etc/init.d/domainname:

local retval2=2

retval2 is used for the status of the DNS domainname check. With its default
value being 2 (unlike 0 like for retval), it causes the script to always fail
if no DNS domainname is set because the return statement looks like this (line 63):

retval=$((retval + retval2))

This is in the latest stable baselayout (baselayout-1.9.4-r6). In the unstable
baselayout (1.11.8) the retval2 line is correct (default value is 0).

Funny, this is another example where I've generally had less issues with ~x86 than x86 :-P
Comment 12 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-30 09:22:41 UTC
Alright.  I'm going to mark this fixed then as the issue is resolved in ~x86
Comment 13 Derick Swanepoel 2005-01-30 11:39:13 UTC
Sorry to keep hammering at this, but if the issue is still present in x86, how can this bug be closed? Or is the intention to bump baselayout-1.11.8 to stable soon?