[node-patches] Change in ovirt-node[master]: Don't use lvmetad

nsoffer at redhat.com nsoffer at redhat.com
Tue Sep 30 23:48:32 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: Don't use lvmetad
......................................................................


Patch Set 6:

(2 comments)

http://gerrit.ovirt.org/#/c/33540/6/recipe/rhevh7-post.ks
File recipe/rhevh7-post.ks:

Line 6: dirs    /var/db
Line 7: EOF_RWTAB_RHEVH
Line 8: 
Line 9: # disable lvmetad rhbz#1147217
Line 10: sed -ie 's/^[^#]\(\s*use_lvmetad\)\s*=\s*[[:digit:]]/\1 = 0/' /etc/lvm/lvm.conf
You don't need [^#]. The pattern is: start of line + zero or more whitespace + use_lvmetad.

Since a comment is not whitespace, this automatically will not match comments.
Line 11: 
Line 12: enabled=$(grep -E '^[^#]\s*use_lvmetad\s*=\s*[1-9][0-9]*' /etc/lvm/lvm.conf)
Line 13: if [ -n "$enabled" ]; then
Line 14:     echo "lvmetad not disabled, value is:"


Line 8: 
Line 9: # disable lvmetad rhbz#1147217
Line 10: sed -ie 's/^[^#]\(\s*use_lvmetad\)\s*=\s*[[:digit:]]/\1 = 0/' /etc/lvm/lvm.conf
Line 11: 
Line 12: enabled=$(grep -E '^[^#]\s*use_lvmetad\s*=\s*[1-9][0-9]*' /etc/lvm/lvm.conf)
Same here about [^#].

Not sure why you are matching one or more digits - the expected values are "1" or "0". I think the pattern should be:

    "^\s*use_lvmetad\s*=\s*1"

This should not match since we just replaced the value to 0.

Maybe it will be better to check that we have the value we just set above:

    if ! grep -q -E "^\s*use_lvmetad = 0" /etc/lvm/lvm.conf; then
        complain and echo current value...
    fi
Line 13: if [ -n "$enabled" ]; then
Line 14:     echo "lvmetad not disabled, value is:"
Line 15:     grep -E '^[^#]\s*use_lvmetad\s*=' /etc/lvm/lvm.conf
Line 16: fi


-- 
To view, visit http://gerrit.ovirt.org/33540
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie111f462d15bde004506638e3d70943e3dd9daba
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Ryan Barry <rbarry at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes



More information about the node-patches mailing list