Bug 569511 - lvm dumpconfig doesn't show the tags section
Summary: lvm dumpconfig doesn't show the tags section
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2
Version: 5.6
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Alasdair Kergon
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 1049888 1092639 1103916
TreeView+ depends on / blocked
 
Reported: 2010-03-01 16:21 UTC by Andreas Gabriel
Modified: 2014-09-16 00:24 UTC (History)
11 users (show)

Fixed In Version: lvm2-2.02.88-13.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1092639 (view as bug list)
Environment:
Last Closed: 2014-09-16 00:24:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1218 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2014-09-16 04:15:55 UTC

Description Andreas Gabriel 2010-03-01 16:21:20 UTC
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 #

Comment 1 Dave Wysochanski 2010-07-08 19:43:50 UTC
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().

Comment 2 Alasdair Kergon 2012-09-12 11:54:37 UTC
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'.

Comment 3 Alasdair Kergon 2014-01-30 12:16:06 UTC
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.]

Comment 6 Nenad Peric 2014-05-02 13:10:08 UTC
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

Comment 8 errata-xmlrpc 2014-09-16 00:24:52 UTC
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


Note You need to log in before you can comment on or make changes to this bug.