Skip to Content.
Sympa Menu

perfsonar-user - RE: [perfsonar-user] perfsonar config file format rant

Subject: perfSONAR User Q&A and Other Discussion

List archive

RE: [perfsonar-user] perfsonar config file format rant


Chronological Thread 
  • From: SCHAER Frederic <>
  • To: Andrew Lake <>, "" <>
  • Subject: RE: [perfsonar-user] perfsonar config file format rant
  • Date: Tue, 19 Apr 2016 14:53:52 +0000
  • Accept-language: fr-FR, en-US

Hi Andy,

 

Some news about this :

I was finally able to take a look, and successfully edited the configuration with Augeas, with the httpd lens.

 

Regards

 

De : Andrew Lake [mailto:]
Envoyé : mercredi 16 mars 2016 14:09
À : ; SCHAER Frederic <>
Objet : Re: [perfsonar-user] perfsonar config file format rant

 

Hi,

 

Thanks for the comment. You are correct, it is not XML nor is it intended to be. It is Apache config file format, and mirrors what the format the Apache web server uses. In Perl, the primary module used to parse such files is called Config::General (http://search.cpan.org/dist/Config-General/General.pm). As with all config file formats there are advantages and disadvantages. It’s a rather popular format in the Perl world which is what most of the tools are or were originally written in years ago. You can find libraries to parse it in other languages, though admittedly the libraries are not always as popular(i.e. well-supported). There are no CLI tools provided by perfsonar to manipulate it, though its should be possible to write a perl script to do hat you want with Config::General or (depending on what you are doing) use template features of you config management software. If all else fails I’ve always been able to get away with some old fashioned sed commands in our configuration management rules on ESnet but it depends what you are trying to do I guess.

 

Thanks,

Andy

 

 

 

 

On March 16, 2016 at 6:20:13 AM, SCHAER Frederic () wrote:

Hi,

 

First, I’d like to thank the perfsonar developpers for their work. This tool is very valuable to me.

And I’d like to apologize if the rest of this email looks a bit harsh, I tried to remain constructive ;)

 

SO.

I’d like to point out the weirdness of one (several ?) perfsonar configuration files.

I’m sure there’s a reason behind this, but I’m failing at understanding how good this reason can be.

 

The config file subject of this rant is : /etc/perfsonar/lsregistrationdaemon.conf

 

The format is a weird mix of “key <blanck> value” + some sort of xml “tagging” which then includes key+blank+value stuff which is not xml (or is it ?).. all of this being partially managed through the web interface.

 

Exerpt from the example file :

allow_internal_addresses     0

 

#<administrator>

#    name      J. Admin

#    email    

#</administrator>

 

 

The issue with that is that this makes management of this file (or at least parts of it) almost impossible, because there is no obvious tool capable of handling such a weird/custom format.

There are plenty of standard config file formats, of which I’m sure many would be capable of handling the varying number of </service> tags using for instance sections and subsections… while still allowing editing parts of the file with standard tools like Augeas without touching the rest of the generated config. Augeas can even do XML if needed.

 

I’m currently attempting to adapt my puppet setup to the new perfsonar updates, hence this hopefully constructive comment ;)

Maybe there’s a perfsonar tool shipped with the toolkit that allows CLI editing of this file (the purpose being to be able to provision a server with as little manual intervention as possible, ideally none), but for now I’m failing at finding a solution to provision the administrator “section” for instance .

 

Regards

Frederic

 

P.S : Augeas in theory is capable of editing XML, even if I feel XML isn’t a terribly admin-friendly format…

 



  • RE: [perfsonar-user] perfsonar config file format rant, SCHAER Frederic, 04/19/2016

Archive powered by MHonArc 2.6.16.

Top of Page