Description of problem: If host tag settings in lvm.conf are enabled lvm dumpconfig doesn't show the tags section. Version-Release number of selected component (if applicable): lvm2 v2.02.39 Steps to Reproduce: 1. add following lines to lvm.conf # snip # tags { # create automatically hostname tag (uname -n) hosttags = 1 # set tag "local" to any host local {} } # snip # 2. execute lvm dumpconfig root@node01:~$ lvm dumpconf Actual results: # dumps lvm.conf except tags section Expected results: # snip # tags { hosttags = 1 local {} } # snip # or with resolved hosttags # snip # tags { node01, local } # snip #
This is because of the merge_config_tree() code, which deletes the 'tags' section and merges multiple config files. Would likely need to update this as well as _merge_section().
The tags section is different from the rest of the file as it controls which other config files will be processed and so which other tags will get set. Merging tags sections would create a hybrid that would be nonsense. The only thing we could reasonably do is create a fake tags section that shows just which tags are defined. Or/and we could display these with a new command like 'lvm tags'.
Command 'lvm tags' added which displays currently-active host tags. https://git.fedorahosted.org/cgit/lvm2.git/patch/?id=83358d4c039a36d5ef4b42b2213d73bb72ea7c26 This should be enough to find out which tags are set, and is a lot simpler than touching the dumpconfig code. [Originally committed as 'hosttags' but changed to 'tags' and rebased.]
as stated lvm dumpconfig will not display tags, but executing 'lvm tags' would output the tags defined: in lvm.conf: tags { # create automatically hostname tag (uname -n) hosttags = 1 # set tag "local" to any host local {} } [root@virt-122 ~]# lvm tags virt-122.cluster-qe.lab.eng.brq.redhat.com local marking VERIFIED with lvm2-2.02.88-13.el5
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1218.html