Merge "osd: fix pattern when matching ${data}"

This commit is contained in:
Jenkins 2015-08-05 15:10:30 +00:00 committed by Gerrit Code Review
commit 79fd0d9aeb
2 changed files with 14 additions and 29 deletions

View File

@ -72,8 +72,7 @@ ceph-disk prepare ${cluster_option} ${data} ${journal}
",
unless => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
ceph-disk list | grep ' *${data} .*ceph data, prepared' ||
ceph-disk list | grep ' *${data} .*ceph data, active' ||
ceph-disk list | grep -E ' *${data}1? .*ceph data, (prepared|active)' ||
ls -l /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}\$'
",
logoutput => true,
@ -93,7 +92,7 @@ fi
",
unless => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
ceph-disk list | grep ' *${data} .*ceph data, active' ||
ceph-disk list | grep -E ' *${data}1? .*ceph data, active' ||
ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}\$'
",
logoutput => true,
@ -106,13 +105,10 @@ ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}\$'
command => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' *${data} .*ceph data' | sed -ne 's/.*osd.\\([0-9][0-9]*\\).*/\\1/p')
id=\$(ceph-disk list | sed -nEe 's:^ *${data}1? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' *${data} .*mounted on' | sed -ne 's/.*osd.\\([0-9][0-9]*\\)\$/\\1/p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}\$' | sed -ne 's:.*/${cluster_name}-\\([0-9][0-9]*\\) -> .*:\\1:p' || true)
id=\$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | sed -nEe 's:.*/${cluster_name}-([0-9]+) *-> *${data}\$:\\1:p' || true)
fi
if [ \"\$id\" ] ; then
stop ceph-osd cluster=${cluster_name} id=\$id || true
@ -127,13 +123,10 @@ fi
unless => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' *${data} .*ceph data' | sed -ne 's/.*osd.\\([0-9][0-9]*\\).*/\\1/p')
id=\$(ceph-disk list | sed -nEe 's:^ *${data}1? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' *${data} .*mounted on' | sed -ne 's/.*osd.\\([0-9][0-9]*\\)\$/\\1/p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | grep ' ${data}\$' | sed -ne 's:.*/${cluster_name}-\\([0-9][0-9]*\\) -> .*:\\1:p' || true)
id=\$(ls -ld /var/lib/ceph/osd/${cluster_name}-* | sed -nEe 's:.*/${cluster_name}-([0-9]+) *-> *${data}\$:\\1:p' || true)
fi
if [ \"\$id\" ] ; then
test ! -d /var/lib/ceph/osd/${cluster_name}-\$id

View File

@ -39,8 +39,7 @@ ceph-disk prepare /tmp
",
'unless' => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
ceph-disk list | grep ' */tmp .*ceph data, prepared' ||
ceph-disk list | grep ' */tmp .*ceph data, active' ||
ceph-disk list | grep -E ' */tmp1? .*ceph data, (prepared|active)' ||
ls -l /var/lib/ceph/osd/ceph-* | grep ' /tmp\$'
",
'logoutput' => true
@ -58,7 +57,7 @@ fi
",
'unless' => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
ceph-disk list | grep ' */tmp .*ceph data, active' ||
ceph-disk list | grep -E ' */tmp1? .*ceph data, active' ||
ls -ld /var/lib/ceph/osd/ceph-* | grep ' /tmp\$'
",
'logoutput' => true
@ -88,8 +87,7 @@ ceph-disk prepare --cluster testcluster /tmp/data /tmp/journal
",
'unless' => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
ceph-disk list | grep ' */tmp/data .*ceph data, prepared' ||
ceph-disk list | grep ' */tmp/data .*ceph data, active' ||
ceph-disk list | grep -E ' */tmp/data1? .*ceph data, (prepared|active)' ||
ls -l /var/lib/ceph/osd/testcluster-* | grep ' /tmp/data\$'
",
'logoutput' => true
@ -107,7 +105,7 @@ fi
",
'unless' => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
ceph-disk list | grep ' */tmp/data .*ceph data, active' ||
ceph-disk list | grep -E ' */tmp/data1? .*ceph data, active' ||
ls -ld /var/lib/ceph/osd/testcluster-* | grep ' /tmp/data\$'
",
'logoutput' => true
@ -130,13 +128,10 @@ ls -ld /var/lib/ceph/osd/testcluster-* | grep ' /tmp/data\$'
'command' => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' */tmp .*ceph data' | sed -ne 's/.*osd.\\([0-9][0-9]*\\).*/\\1/p')
id=\$(ceph-disk list | sed -nEe 's:^ */tmp1? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' */tmp .*mounted on' | sed -ne 's/.*osd.\\([0-9][0-9]*\\)\$/\\1/p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ls -ld /var/lib/ceph/osd/ceph-* | grep ' /tmp\$' | sed -ne 's:.*/ceph-\\([0-9][0-9]*\\) -> .*:\\1:p' || true)
id=\$(ls -ld /var/lib/ceph/osd/ceph-* | sed -nEe 's:.*/ceph-([0-9]+) *-> */tmp\$:\\1:p' || true)
fi
if [ \"\$id\" ] ; then
stop ceph-osd cluster=ceph id=\$id || true
@ -151,13 +146,10 @@ fi
'unless' => "/bin/true # comment to satisfy puppet syntax requirements
set -ex
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' */tmp .*ceph data' | sed -ne 's/.*osd.\\([0-9][0-9]*\\).*/\\1/p')
id=\$(ceph-disk list | sed -nEe 's:^ */tmp1? .*(ceph data|mounted on).*osd\\.([0-9]+).*:\\2:p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ceph-disk list | grep ' */tmp .*mounted on' | sed -ne 's/.*osd.\\([0-9][0-9]*\\)\$/\\1/p')
fi
if [ -z \"\$id\" ] ; then
id=\$(ls -ld /var/lib/ceph/osd/ceph-* | grep ' /tmp\$' | sed -ne 's:.*/ceph-\\([0-9][0-9]*\\) -> .*:\\1:p' || true)
id=\$(ls -ld /var/lib/ceph/osd/ceph-* | sed -nEe 's:.*/ceph-([0-9]+) *-> */tmp\$:\\1:p' || true)
fi
if [ \"\$id\" ] ; then
test ! -d /var/lib/ceph/osd/ceph-\$id