sr-scripts 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/sr-start-slave CHANGED
@@ -113,8 +113,17 @@ end
113
113
  current_instance.reload
114
114
  p current_instance
115
115
 
116
- # this should be something other than sleep, it needs to wait to make sure all disks are mounted
117
- sleep 15
116
+ # Wait for all the disks to finish attaching
117
+ disks_attaching = true
118
+ while disks_attaching
119
+ sleep 5
120
+ current_instance.reload
121
+ non_attached_disk_count = current_instance.block_device_mapping.find_all { |x| x["status"] != "attached" }.length
122
+ if non_attached_disk_count == 0
123
+ disks_attaching = false
124
+ end
125
+ end
126
+
118
127
 
119
128
  `mkdir /mnt/mysql`
120
129
  # NEED TO FIND OUT IF NUMBER OF DISKS IS GREATER THAN 1, IF SO, THEN use mdadm to create an array and mount, if not, then just mount
@@ -1,5 +1,5 @@
1
1
  module Sr
2
2
  module Scripts
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sr-scripts
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 8
10
- version: 0.0.8
9
+ - 9
10
+ version: 0.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Davy Campano
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-23 00:00:00 -05:00
18
+ date: 2011-02-28 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies: []
21
21