All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "Williams, Dan J" <dan.j.williams@intel.com>,
	"qi.fuli@fujitsu.com" <qi.fuli@fujitsu.com>
Cc: "fukuri.sai@gmail.com" <fukuri.sai@gmail.com>,
	"nvdimm@lists.linux.dev" <nvdimm@lists.linux.dev>
Subject: Re: [RFC ndctl PATCH 0/3] Rename monitor.conf to ndctl.conf as a ndctl global config file
Date: Thu, 8 Jul 2021 06:34:45 +0000	[thread overview]
Message-ID: <9a5bb205bca971f3f806bcbfa5bcf76bbdc3b306.camel@intel.com> (raw)
In-Reply-To: <TYCPR01MB6461A39B4E076F0921335904F70E9@TYCPR01MB6461.jpnprd01.prod.outlook.com>

On Thu, 2021-06-17 at 00:25 +0000, qi.fuli@fujitsu.com wrote:
> > On Wed, 2021-06-02 at 09:47 -0700, Dan Williams wrote:
> > > On Tue, Jun 1, 2021 at 10:31 PM Verma, Vishal L
> > > <vishal.l.verma@intel.com> wrote:
> > > > 
> > > > [switching to the new mailing list]
> > > > 
> > > > On Mon, 2021-05-17 at 08:14 +0900, QI Fuli wrote:
> > > > > From: QI Fuli <qi.fuli@fujitsu.com>
> > > > > 
> > > > > This patch set is to rename monitor.conf to ndctl.conf, and make
> > > > > it a global ndctl configuration file that all ndctl commands can refer to.
> > > > > 
> > > > > As this patch set has been pending until now, I would like to know
> > > > > if current idea works or not. If yes, I will finish the documents and test.
> > > > > 
> > > > > Signed-off-by: QI Fuli <qi.fuli@fujitsu.com>
> > > > 
> > > > Hi Qi,
> > > > 
> > > > Thanks for picking up on this! The approach generally looks good to
> > > > me, I think we can definitely move forward with this direction.
> > > > 
> > > > One thing that stands out is - I don't think we can simply rename
> > > > the existing monitor.conf. We have to keep supporting the 'legacy'
> > > > monitor.conf so that we don't break any deployments. I'd suggest
> > > > keeping the old monitor.conf as is, and continuing to parse it as
> > > > is, but also adding a new ndctl.conf as you have done.
> > > > 
> > > > We can indicate that 'monitor.conf' is legacy, and any new features
> > > > will only get added to the new global config to encourage migration
> > > > to the new config. Perhaps we can even provide a helper script to
> > > > migrate the old config to new - but I think it needs to be a user
> > > > triggered action.
> > > > 
> > > > This is timely as I also need to go add some config related
> > > > functionality to daxctl, and basing it on this would be perfect, so
> > > > I'd love to get this series merged in soon.
> > > 
> > > I wonder if ndctl should treat /etc/ndctl like a conf.d directory of
> > > which all files with the .conf suffix are concatenated into one
> > > combined configuration file. I.e. something that maintains legacy, but
> > > also allows for config fragments to be deployed individually.
> > 
> > Agreed, this would be the most flexible. ciniparser doesn't seem to support
> > multiple files directly, but perhaps ndctl can, early on, load up multiple
> > files/dictionaries, and stash them in ndctl_ctx. Then there can be accessor
> > functions to retrieve specific conf strings from that as needed by different
> > commands.
> 
> Thank you very much for the comments.
> 
> I also agree, and I am working on the v2 patch set now.
> I found that the style of ndctl.conf is different from monitor.conf,
> since there is no section name in monitor.conf.
> Do I need to keep the legacy style in monitor.conf, i.e. Can I add
> the section name [monitor] to monitor.conf?

Sorry about the delayed reply, I missed this thread. I think adding it
to the sample monitor.conf is harmless, but I'm not sure that gets us
anything.. The goal is to continue to support any monitor.confs of the
old style that have already been deployed. Those wouldn't have a
[monitor] section header.

I think we'd have to treat the specific file /etc/ndctl/monitor.conf as
a special case, and just parse it the old way. We can make it so that a
new style [monitor] section is incompatible with the old style
monitor.conf (error out and fail if this is detected), and we won't
ever add any new functionality to the old monitor.conf to encourage
people to switch. We can additionally print a warning to stderr if the
old style file is being used.


      reply	other threads:[~2021-07-08  6:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 23:14 [RFC ndctl PATCH 0/3] Rename monitor.conf to ndctl.conf as a ndctl global config file QI Fuli
2021-05-16 23:14 ` [RFC ndctl PATCH 1/3] ndctl, ccan: import ciniparser QI Fuli
2021-05-16 23:14 ` [RFC ndctl PATCH 2/3] ndctl, util: add parse-configs helper QI Fuli
2021-05-16 23:14 ` [RFC ndctl PATCH 3/3] ndctl, rename monitor.conf to ndctl.conf QI Fuli
2021-06-02  6:33   ` Verma, Vishal L
2021-06-02  5:31 ` [RFC ndctl PATCH 0/3] Rename monitor.conf to ndctl.conf as a ndctl global config file Verma, Vishal L
2021-06-02 16:47   ` Dan Williams
2021-06-02 17:15     ` Verma, Vishal L
2021-06-17  0:25       ` qi.fuli
2021-07-08  6:34         ` Verma, Vishal L [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a5bb205bca971f3f806bcbfa5bcf76bbdc3b306.camel@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=fukuri.sai@gmail.com \
    --cc=nvdimm@lists.linux.dev \
    --cc=qi.fuli@fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.