[Bug 637382] New: (r)quotad init missing /etc/sysconfig/quotad for setting of "-p (port)", etc.
https://bugzilla.novell.com/show_bug.cgi?id=637382 https://bugzilla.novell.com/show_bug.cgi?id=637382#c0 Summary: (r)quotad init missing /etc/sysconfig/quotad for setting of "-p (port)", etc. Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: All OS/Version: openSUSE 11.3 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: pgngw+dev001+novell.com@f-m.fm QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 SUSE/3.6.8-1.3 Firefox/3.6.8 goal is to set *static* ports for nfs services. refs: http://www.lowth.com/LinWiz/nfs_help.html http://www.novell.com/support/viewContent.do?externalId=7000524&sliceId=1 http://wiki.debian.org/SecuringNFS whereas MOUNTD & STATSD opts can be set/overridden in /etc/sysconfig/nfs, QUOTAD is missing the same option. cat /etc/init.d/quotad ... # /etc/init.d/quotad # # and its symbolic link # # /sbin/rcquotad ... rpm -q --whatprovides /etc/init.d/quotad quota-nfs-3.17-7.2.x86_64 ls -al /etc/sysconfig/*quota* /bin/ls: No match. @ http://www.novell.com/support/viewContent.do?externalId=7000524&sliceId=1 "... /etc/services .. * rquota, : add the port assignment to the file. For example: rquotad 4003/tcp rquotad 4003/udp .. Please note that custom edits of the /etc/init.d/nfsserver are not recommend, nor is it supported. Further, changed /etc/init.d scripts may be replaced during online updates or when updating to a new service pack. " iiuc, /etc/services is NOT guaranteed safe from upgrades/overwrites. I tried to raise the issue in #opensuse-factory, as it's likely an issue in/for 11.4 as well. Told 'not interested' ... Checked @ #opensuse, told that the port mods should be made in /etc/sysconfig/foo, ----------------------------- [12:21] <dev001> since there are some 'packagers' around -- where can I find Packaging Guidelines for if/when to use /etc/sysconfig/blah + /etc/init.d/blah pairs? reading here, http://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros, I see mention -- but not guideline statement/policy. [12:21] <yaloki> dev001: there is no need for a guideline [12:22] <yaloki> dev001: you need /etc/init.d/foo to have a script to start a daemon [12:22] <yaloki> dev001: if you can make it configurable (e.g. port number or such), then you store that configuration in /etc/sysconfig/foo and use those parameters in the init script [12:23] <dev001> yaloki: sure, that makes sense. and that's what I thought. but, it's not what novell does/recommends -- in at least the one case i'm looking at. [12:24] <yaloki> dev001: I'm packaging for SUSE/openSUSE since 10 years, so take my word for it [12:24] <yaloki> dev001: and that's also the convention [12:24] <dev001> yaloki: I'm not disagreeing with you. i'm telling you , however, what Novell does in the case of quotad. they recommend making static port assignments by mod'ing /etc/services. [12:25] <yaloki> dev001: well maybe that's because quotad is not configurable in a different way [12:25] <yaloki> dev001: many daemons look up which port they should listen on in /etc/services [12:25] <yaloki> dev001: (actually it's even a system call in glibc) [12:26] <dev001> yaloki: it most certainly is. adding a "-p port" spec is straightforward, and frequently/widely used. [12:26] <yaloki> dev001: well then the packager simply forgot to do that [12:26] <yaloki> dev001: file a bug ----------------------------- checking man page, man rquotad ------------------------- RQUOTAD(8) NAME rquotad, rpc.rquotad - remote quota server SYNOPSIS rpc.rquotad [ -sSFI ] [ -p port ] .. OPTIONS .. -p port, --port port Listen on alternate port port. .. ------------------------- Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c
wei wang
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c1
Jan Kara
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c2
--- Comment #2 from dev001x _
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c
Anna Bernathova
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c3
Anna Bernathova
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c4
Jan Kara
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c5
Anna Bernathova
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c6
Anna Bernathova
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c7
--- Comment #7 from dev001x _
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c8
--- Comment #8 from Jan Kara
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c9
--- Comment #9 from dev001x _
But there's no reason for it to be random when /etc/services has a port reserved for it. Or do you see one?
honestly, i'm confused as to what _should_ be ... i looked for, but did not find, an RFC for rquotad. this comment, http://kerneltrap.org/mailarchive/linux-fsdevel/2007/11/27/451355 seems to verify that there is none, really :-/ i can say simply that /etc/services has quotad 762/tcp quotad 762/udp not rquotad 4003/tcp rquotad 4003/udp as referenced/instructed @ http://www.novell.com/support/viewContent.do?externalId=7000524&sliceId=1 and, rquotad ignores 'quotad' port assignment in /etc/services, but DOES pick up 'rquotad' port if defined _either_ in /etc/services _as_ rquotad, or with a "-p (port)" spec. if you search around, the interchangeable (mis)use of quotad vs rquotad is, at best, confusing. maybe (?) some of the confusion comes from the facts that, per rquotad manpage: "... The results are used by quota(1) ..." my suggestion -- switch to consistent use pf rquotad. it's what novell references in its docs, there's a manpage for it, etc ... even the (mis)named /etc/init.d/quota references it. then again, not sure what implications that has elsewhere. like you said -- it's a mess. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c10
--- Comment #10 from Petr Gajdos
rquotad 4003/tcp rquotad 4003/udp
Note: our /etc/services reads pxc-splr-ft 4003/tcp # pxc-splr-ft pxc-splr-ft 4003/udp # pxc-splr-ft But I don't know what pxc-splr-ft is at all. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c11
--- Comment #11 from dev001x _
Fix for factory submitted (request id 47612).
I'd submitted this against 11.3. It's marked as fixed, but sumbitted for factory. Is there a fix for 11.3? (In reply to comment #10)
(In reply to comment #9)
rquotad 4003/tcp rquotad 4003/udp
Note: our /etc/services reads pxc-splr-ft 4003/tcp # pxc-splr-ft pxc-splr-ft 4003/udp # pxc-splr-ft
But I don't know what pxc-splr-ft is at all.
Note that there is NO specification, or even convention afaict, as to which particular static port(s) should be used. only that a static port should be assignable. the recommendation for simplicity in firewall mgmt that i've seen is simply that all the nfs-releated static ports be assigned to a small/contiguous range ... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c12
dev001x _
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c13
dev001x _
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c14
Anna Bernathova
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c15
Petr Gajdos
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c16
Jan Kara
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c17
dev001x _
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c18
Jan Kara
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c19
dev001x _
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c20
--- Comment #20 from dev001x _
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c21
dev001x _
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c22
Jan Kara
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c23
dev001x _
So are we still missing something in the end?
oh, honestly. this whole topic's a mess -- so who knows! ;-) re:
SUSE uses the one from quota-tools for quite some time
"The one provided with nfs-utils supports binding the daemon to a port with the -p directive. The one in quota-tools does not. Consult your distribution's documentation to determine if yours does." reads, to me, as you CAN'T bind the daemon to a static port ... or maybe it's just commenting as to method. i just don't know. but, if that's resolved, "in the end" we have, /etc/sysconfig/nfs providing option for static ports for MOUNTD_PORT="4002" & STATD_OPTIONS="-p 4000" in different formats, a newly created, /etc/sysconfig/rquotad in whatever format, for setting QUOTAD/RQUOTAD static port and, for LOCKD, (http://www.lowth.com/LinWiz/nfs_help_suse.php, https://bugzilla.redhat.com/show_bug.cgi?id=434795) adding to "/etc/modprobe.d/99-local.conf" options lockd nlm_udpport=4001 nlm_tcpport=4001 so that, we end up with (e.g., assigning 4000-4003 block or ports): rpcinfo -p | grep 40 100005 1 udp 4002 mountd 100005 1 tcp 4002 mountd 100005 2 udp 4002 mountd 100005 2 tcp 4002 mountd 100005 3 udp 4002 mountd 100005 3 tcp 4002 mountd 100024 1 udp 4000 status 100024 1 tcp 4000 status 100021 1 udp 4001 nlockmgr 100021 3 udp 4001 nlockmgr 100021 4 udp 4001 nlockmgr 100021 1 tcp 4001 nlockmgr 100021 3 tcp 4001 nlockmgr 100021 4 tcp 4001 nlockmgr 100011 1 udp 4003 rquotad 100011 2 udp 4003 rquotad 100011 1 tcp 4003 rquotad 100011 2 tcp 4003 rquotad so, re:
as long as you have a way to override it
i can override all ports in places that are NOT subject to overwrite. works for me. thanks! fwiw, if were up to me, *I* would strive for some sort of consistency for ALL the nfs-related daemons, & either (a) create ONE /etc/sysconfig/nfs_services config, as one place to config ALL the available options, or (b) at least also create /etc/sysconfig/lockd ... some issues at hand are: https://bugzilla.redhat.com/show_bug.cgi?id=434795#c20. but, like I said -- all options are (well, will be eventually) able to set to static ports, and are "officially" safe from inadvertent overwrite by installs, etc. so, again, if that's all correct -- "WORKS". thx. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c24
Jan Kara
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c25
Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c26
--- Comment #26 from dev001x _
I vote for just shell variable defines in /etc/sysconfig/nfs or similar.
+1
I think that yet-another special-purpose /etc/ file with configuration that each daemon reads would be unnecessary complexity ... though I'm not sure that is what you are suggesting.
in my comment, i'd intended just one file -- i'd simply called it /etc/sysconfig-nfs_services to be more descriptive and inclusive of all available ports. If this _is_ trending towards the all-in-one-place solution, great. Still _do_ need to address whether each daemon requires an option for setting UDP & TCP ports separately. Personally, I've never done so -- but, I _do_ note that, e.g., options lockd nlm_udpport=4001 nlm_tcpport=4001 certainly gives you the option. I've never seen the other daemons' ports split by protocol, and, afaict, @dynamic assignment, UDP & TCP get same port assignments. the (complete?) nfs-related services list is mountd status nlockmgr rquotad then, for VARS in a /etc/sysconfig/nfs, if VAR undefined, then port option == /etc/services or build-default (absolutely NO idea what to suggest for quotad vs rquotad, and whether or not to 'take' /etc/services' quotad value as a static *default*) if VAR defined, then simple overwrite of port value. finally, still need to address whether to call out VARS for port-only, or for daemon-options. i.e., from current /etc/syconfig/nfs MOUNTD_PORT="4002" ... STATD_OPTIONS="-p 4000" one's "just the port", the other's "all options". -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c27
Anna Bernathova
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c29
--- Comment #29 from dev001x _
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c
dev001x _
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c30
Vitezslav Cizek
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c31
Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c32
--- Comment #32 from Neil Brown
OK, I've added "RQUOTAD_PORT" to sysconfig for nfs and submitted the update for Factory. Obviously quotad needs to be changed to use this.
Actually that update didn't work at all.... But I have now updated Base:System and submitted request id 60268 for it to go into Factory. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c33
--- Comment #33 from Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c34
--- Comment #34 from Vitezslav Cizek
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c35
--- Comment #35 from Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c36
--- Comment #36 from Neil Brown
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c37
--- Comment #37 from Vitezslav Cizek
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c38
--- Comment #38 from Vitezslav Cizek
https://bugzilla.novell.com/show_bug.cgi?id=637382
https://bugzilla.novell.com/show_bug.cgi?id=637382#c39
Vitezslav Cizek
http://bugzilla.novell.com/show_bug.cgi?id=637382
http://bugzilla.novell.com/show_bug.cgi?id=637382#c40
--- Comment #40 from Bernhard Wiedemann
participants (1)
-
bugzilla_noreply@novell.com