bosh_agent/lib/bosh_agent/disk_util.rb
# Pay a penalty on this check the first time a persistent disk is added to a system
Pay a penalty on this check the first time a persistent disk is added to a system
Pay a penalty on this check the first time a persistent disk is added to a system
def ensure_no_partition?(disk, partition)
        check_count = 2
        check_count.times do
          if sfdisk_lookup_partition(disk, partition).empty?
          else
            if File.blockdev?(partition)
              return false 
            end
          end
          sleep 1
        end
        if File.blockdev?(partition)
          return false
        else
          return true
        end
      end
def ensure_no_partition? ( disk , partition ) check_count = 2 check_count . times do if sfdisk_lookup_partition ( disk , partition ) . empty? else if File . blockdev? ( partition ) return false end end sleep 1 end if File . blockdev? ( partition ) return false else return true end end
Pay a penalty on this check the first time a persistent disk is added to a system
Pay a penalty on this check the first time a persistent disk is added to a system
# keep on trying # break early if partition is there # Double check that the /dev entry is there
disk
<not_specific>
partition
<not_specific>