File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
lib/puppet/provider/volume_group Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -58,14 +58,30 @@ def exists?
58
58
end
59
59
60
60
def physical_volumes = ( new_volumes = [ ] )
61
+ # Need to replace device path with real names, instead of symlink
62
+ if @resource . parameter ( :followsymlinks ) . value == :true then
63
+ new_volume_real = [ ]
64
+ new_volumes . each do |s |
65
+ if File . symlink? ( s )
66
+ device = File . expand_path ( File . readlink ( s ) , File . dirname ( s ) )
67
+ new_volume_real . push device
68
+ else
69
+ real_should . push s
70
+ end
71
+ end
72
+ else
73
+ new_volume_real = new_volumes
74
+ end
75
+
76
+
61
77
# Only take action if createonly is false just to be safe
62
78
# this is really only here to enforce the createonly setting
63
79
# if something goes wrong in physical_volumes
64
80
if @resource [ :createonly ] . to_s == "false"
65
81
existing_volumes = physical_volumes
66
- extraneous = existing_volumes - new_volumes
82
+ extraneous = existing_volumes - new_volume_real
67
83
extraneous . each { |volume | reduce_with ( volume ) }
68
- missing = new_volumes - existing_volumes
84
+ missing = new_volume_real - existing_volumes
69
85
missing . each { |volume | extend_with ( volume ) }
70
86
end
71
87
end
You can’t perform that action at this time.
0 commit comments