This repository was archived by the owner on Mar 22, 2018. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ var _ volume.Attacher = &cinderDiskAttacher{}
4444var _ volume.AttachableVolumePlugin = & cinderPlugin {}
4545
4646const (
47- checkSleepDuration = 1 * time .Second
47+ checkSleepDuration = 5 * time .Second
4848 operationFinishInitDealy = 1 * time .Second
4949 operationFinishFactor = 1.1
5050 operationFinishSteps = 10
Original file line number Diff line number Diff line change @@ -224,6 +224,18 @@ func probeAttachedVolume() error {
224224 scsiHostRescan ()
225225
226226 executor := exec .New ()
227+
228+ // udevadm settle waits for udevd to process the device creation
229+ // events for all hardware devices, thus ensuring that any device
230+ // nodes have been created successfully before proceeding.
231+ argsSettle := []string {"settle" , "--timeout=1" }
232+ cmdSettle := executor .Command ("udevadm" , argsSettle ... )
233+ _ , errSettle := cmdSettle .CombinedOutput ()
234+ if errSettle != nil {
235+ glog .Errorf ("error running udevadm settle %v\n " , errSettle )
236+ return errSettle
237+ }
238+
227239 args := []string {"trigger" }
228240 cmd := executor .Command ("udevadm" , args ... )
229241 _ , err := cmd .CombinedOutput ()
You can’t perform that action at this time.
0 commit comments