Bug 1084354 - [/etc/sysconfig/memcached] Update memcached info to be more informative
[/etc/sysconfig/memcached] Update memcached info to be more informative
Status: RESOLVED WONTFIX
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Network
Current
Other Other
: P5 - None : Enhancement (vote)
: Current
Assigned To: Dominique Leuenberger
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-07 16:58 UTC by Mikhail Kasimov
Modified: 2018-04-17 11:54 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
memcached conf-file with hint for user (1.13 KB, text/plain)
2018-03-07 16:58 UTC, Mikhail Kasimov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Kasimov 2018-03-07 16:58:13 UTC
Created attachment 763009 [details]
memcached conf-file with hint for user

Hello!

Please, update /etc/sysconfig/memcached with hint for user. This will make the memcached config format to be more transparent for user\admin.

Something like this:

============
# HINT: Place your own space separated memcached parameters to MEMCACHED_PARAMS= option in one line.
# Do NOT use MEMCACHED_PARAMS= multi-lines to put two or more parameters. Memcached will read the last MEMCACHED_PARAMS= line of your "list" and ignore all previous ones.
#
# For example: MEMCACHED_PARAMS="-l 127.0.0.1 -U 0" (here memcached will listen on 127.0.0.1 address on tcp port 11211 only, and udp port 11211 is off.)
#
============

New memcached conf-file is attached. Thanks!
Comment 1 Andreas Stieger 2018-03-08 07:31:39 UTC
(In reply to Mikhail Kasimov from comment #0)
> # HINT: Place your own space separated memcached parameters to
> MEMCACHED_PARAMS= option in one line.
> # Do NOT use MEMCACHED_PARAMS= multi-lines to put two or more parameters.
> Memcached will read the last MEMCACHED_PARAMS= line of your "list" and
> ignore all previous ones.

As this is a general hint applying to all sysconfig files, I do not see why it would need to be added to the this file explicitly.

> # For example: MEMCACHED_PARAMS="-l 127.0.0.1 -U 0" (here memcached will
> listen on 127.0.0.1 address on tcp port 11211 only, and udp port 11211 is
> off.)
> #

We should not repeat the memcached manpage here but merely reference it.
Comment 2 Mikhail Kasimov 2018-03-08 08:55:44 UTC
(In reply to Andreas Stieger from comment #1)
> (In reply to Mikhail Kasimov from comment #0)
> > # HINT: Place your own space separated memcached parameters to
> > MEMCACHED_PARAMS= option in one line.
> > # Do NOT use MEMCACHED_PARAMS= multi-lines to put two or more parameters.
> > Memcached will read the last MEMCACHED_PARAMS= line of your "list" and
> > ignore all previous ones.
> 
> As this is a general hint applying to all sysconfig files, I do not see why
> it would need to be added to the this file explicitly.


Ok, if such hint is applicable to all sysconfig file, let's have it there to be more user-friendly. Because this can help to avoid to make redundant hand's movements from user/admin and save his time on setting software up.

==========================
# HINT: Place your own space separated parameters to respective option in one line.
# Do NOT use multi-lines to put two or more parameters for one option.
# Parser will read and accept the last line of your "list" only and ignore all previous ones.
========================== 
 
> > # For example: MEMCACHED_PARAMS="-l 127.0.0.1 -U 0" (here memcached will
> > listen on 127.0.0.1 address on tcp port 11211 only, and udp port 11211 is
> > off.)
> > #
> 
> We should not repeat the memcached manpage here but merely reference it.

That's my own phrase I've made up, not from memcached manpage. :) And such example will also be friendly for user.

P.S. Generally speaking, some openSUSE's conf-files are lack of such user-friendly hints, compared to Ubuntu, for example. E.g. let's take Ubuntu's /ets/fstab file, which begins with hint:
===============================================
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
===============================================

openSUSE's doesn't have such hint, and this forces user/admin to make redundant hand's movement to run 'man fstab' and then back to fstab settings again. Where should I put my enhancement report for this? Thanks!
Comment 3 Marcus Rückert 2018-04-16 16:30:24 UTC
moving to dimstar as it is more a general distribution issue.
Comment 4 Dominique Leuenberger 2018-04-17 08:27:48 UTC
(In reply to Mikhail Kasimov from comment #2)
> > As this is a general hint applying to all sysconfig files, I do not see why
> > it would need to be added to the this file explicitly.
 
> 
> Ok, if such hint is applicable to all sysconfig file, let's have it there to
> be more user-friendly. Because this can help to avoid to make redundant
> hand's movements from user/admin and save his time on setting software up.
> 
> ==========================
> # HINT: Place your own space separated parameters to respective option in
> one line.
> # Do NOT use multi-lines to put two or more parameters for one option.
> # Parser will read and accept the last line of your "list" only and ignore
> all previous ones.
> ========================== 

Were you really expecting

OPTION="Value1"
OPTION="Value2"

to result in OPTION="Value1 Value2"?

That would be a very strange expectation. Any other reasonable look at the file you see that there are key=value assignments. Any duplication of keys obviously overwrites previous assignments.

IMHO, spelling this out in every file makes no sense
Comment 5 Mikhail Kasimov 2018-04-17 10:59:21 UTC
(In reply to Dominique Leuenberger from comment #4)
> (In reply to Mikhail Kasimov from comment #2)
> > > As this is a general hint applying to all sysconfig files, I do not see why
> > > it would need to be added to the this file explicitly.
>  
> > 
> > Ok, if such hint is applicable to all sysconfig file, let's have it there to
> > be more user-friendly. Because this can help to avoid to make redundant
> > hand's movements from user/admin and save his time on setting software up.
> > 
> > ==========================
> > # HINT: Place your own space separated parameters to respective option in
> > one line.
> > # Do NOT use multi-lines to put two or more parameters for one option.
> > # Parser will read and accept the last line of your "list" only and ignore
> > all previous ones.
> > ========================== 
> 
> Were you really expecting
> 
> OPTION="Value1"
> OPTION="Value2"
> 
> to result in OPTION="Value1 Value2"?
> 
> That would be a very strange expectation. Any other reasonable look at the
> file you see that there are key=value assignments. Any duplication of keys
> obviously overwrites previous assignments.
> 
> IMHO, spelling this out in every file makes no sense

Nothing strange here. It's a habit on ifcfg configuration manner, where some option can have two and more values, e.g.:

IPADDR =
IPADDR1 =
IPADDR2 =

(see https://www.unixmen.com/linux-basics-assign-multiple-ip-addresses-single-network-interface-card-centos-7/).

Wicked network framework has the same syntax, BTW.

If such manner is not acceptable for /sysconfig/ -- OK. But anyway, I'd give a short string somewhere about that as a pattern for all files from /sysconfig/.

Thanks!
Comment 6 Dominique Leuenberger 2018-04-17 11:54:51 UTC
IPADDR =
IPADDR1 =
IPADDR2 =

are three different options.

IMHO, Adding a standard text to all files on the system explaining that an option is an option and not multiple option only wastes bytes on the disk.