[DRBD-user] drbdadm dump-xml with no resource

Mathieu Gagné mgagne at iweb.com
Tue Aug 31 18:01:22 CEST 2010

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On 8/31/10 11:26 AM, Lars Ellenberg wrote:
 > On Mon, Aug 30, 2010 at 03:02:52PM -0400, Mathieu Gagné wrote:
 >> Hi,
 >>
 >> I'm using "drbdadm dump-xml" to dump, edit and rewrite a DRBD
 >> configuration file.
 >
 > Really. Why? How?

For remote automation purpose. It seems to be the same command DRBD MC 
uses to parse a configuration file. dump-xml is very useful since you 
don't have to write a configuration parser just to read/write a DRBD 
configuration file, dump-xml does everything for you.

 >> Can someone look at it and see if it could be fixed or if it was the
 >> intended behavior? Thanks!
 >
 > what output would you expect (or like to see) from
 >   * an empty config file
 >   * some config file with some sections, but no resources
 >   * no config file at all

In my opinion:

Some config file with some sections, but no resources:
* Should output the exact same configuration as read in the 
configuration file so it could be dump back into the file.
* An alternative solution would be to propose an additional option to 
also output default values. Therefore external tools won't have to hard 
code those values if they aren't defined but want to display them anyway 
in an interface.

Empty config file:
* An empty <config> tag (ie. <config file="/usr/local/etc/drbd.conf" />)

No config file:
* Should returns an error since there's nothing to read from.


Regards,

-- 
Mathieu



More information about the drbd-user mailing list