components/ruby/puppet-modules/openstack-cinder/patches/03-grep.patch
branchs11u3-sru
changeset 6035 c9748fcc32de
child 5860 afd31ba91ee9
equal deleted inserted replaced
6016:a477397bba8b 6035:c9748fcc32de
       
     1 Patch to change /bin/grep to /bin/ggrep as the module uses flags
       
     2 /bin/grep doesn't understand.
       
     3 
       
     4 The patch is not suitable for upstream and can be removed when
       
     5 /bin/grep enters this century.  See bug 22742880 for more information.
       
     6 
       
     7 --- openstack-cinder-6.1.0/spec/defines/cinder_type_set_spec.rb.orig	Fri Jan 15 11:57:08 2016
       
     8 +++ openstack-cinder-6.1.0/spec/defines/cinder_type_set_spec.rb	Fri Jan 15 11:57:13 2016
       
     9 @@ -19,7 +19,7 @@
       
    10    it 'should have its execs' do
       
    11      is_expected.to contain_exec('cinder type-key sith set monchichi=hippo').with(
       
    12        :command => 'cinder type-key sith set monchichi=hippo',
       
    13 -      :unless  => "cinder extra-specs-list | grep -Eq '\\bsith\\b.*\\bmonchichi\\b.*\\bhippo\\b'",
       
    14 +      :unless  => "cinder extra-specs-list | ggrep -Eq '\\bsith\\b.*\\bmonchichi\\b.*\\bhippo\\b'",
       
    15        :environment => [
       
    16          'OS_TENANT_NAME=admin',
       
    17          'OS_USERNAME=admin',
       
    18 --- openstack-cinder-6.1.0/spec/defines/cinder_type_spec.rb.orig	Fri Jan 15 11:57:13 2016
       
    19 +++ openstack-cinder-6.1.0/spec/defines/cinder_type_spec.rb	Fri Jan 15 11:57:19 2016
       
    20 @@ -24,7 +24,7 @@
       
    21          'OS_USERNAME=admin',
       
    22          'OS_PASSWORD=asdf',
       
    23          'OS_AUTH_URL=http://127.127.127.1:5000/v2.0/'],
       
    24 -      :unless  => "cinder type-list | grep -qP '\\bhippo\\b'",
       
    25 +      :unless  => "cinder type-list | ggrep -qP '\\bhippo\\b'",
       
    26        :require => 'Package[python-cinderclient]')
       
    27      is_expected.to contain_exec('cinder type-key hippo set volume_backend_name=name1')
       
    28      is_expected.to contain_exec('cinder type-key hippo set volume_backend_name=name2')
       
    29 --- openstack-cinder-6.1.0/manifests/type_set.pp.orig	Fri Jan 15 11:57:19 2016
       
    30 +++ openstack-cinder-6.1.0/manifests/type_set.pp	Fri Jan 15 11:57:21 2016
       
    31 @@ -58,7 +58,7 @@
       
    32    exec {"cinder type-key ${type} set ${key}=${name}":
       
    33      path        => ['/usr/bin', '/bin'],
       
    34      command     => "cinder type-key ${type} set ${key}=${name}",
       
    35 -    unless      => "cinder extra-specs-list | grep -Eq '\\b${type}\\b.*\\b${key}\\b.*\\b${name}\\b'",
       
    36 +    unless      => "cinder extra-specs-list | ggrep -Eq '\\b${type}\\b.*\\b${key}\\b.*\\b${name}\\b'",
       
    37      environment => concat($cinder_env, $region_env),
       
    38      require     => Package['python-cinderclient']
       
    39    }
       
    40 --- openstack-cinder-6.1.0/manifests/type.pp.orig	Fri Jan 15 11:57:21 2016
       
    41 +++ openstack-cinder-6.1.0/manifests/type.pp	Fri Jan 15 11:57:27 2016
       
    42 @@ -66,7 +66,7 @@
       
    43  
       
    44    exec {"cinder type-create ${volume_name}":
       
    45      command     => "cinder type-create ${volume_name}",
       
    46 -    unless      => "cinder type-list | grep -qP '\\b${volume_name}\\b'",
       
    47 +    unless      => "cinder type-list | ggrep -qP '\\b${volume_name}\\b'",
       
    48      environment => concat($cinder_env, $region_env),
       
    49      require     => Package['python-cinderclient'],
       
    50      path        => ['/usr/bin', '/bin'],