Skip to content

Commit 94ab49a

Browse files
committed
The filesystem plugin transition is finally over
In 2015, I wrote a new filesystem plugin (chef#559), because the original one used non-unique keys and so the data was not only incomplete but inconsistent. Since it was backwards incompatible, we called it `filesystem2`, and agreed to a migration path. That original PR only implemented it for linux, however, and it shortly followed with chef#564 for Darwin/OSX. The plan was, at that time to keep both for one major version (give people the chance to migrate to fs2), then for one major version make both names (`filesystem` and `filesystem2`) so that people could move back to the name `filesystem`, and then we'd finally drop the `filesystem2` name. Unfortunately, other platforms never got FS2 support, so this got hairy. In 2018 I wrote chef#181 which unified the various platforms' plugins so it was easier to implement fs2 on more platforms. Shortly there after I wrote chef#1266 that implemented fs2 for the rest of the unixes. And finally, I wrote chef#1267 implemented Windows to filesystem2. This was all still before Chef 17. For Chef 17 I wrote chef#1662 which finally made windows have the new data in the original name, the second-to-last-step. The plan being that in 18 we'd finally remove the `filesystem2` name... but we forgot to do that. This, is the final bit - remove all references to filesystem2. Closes chef#1872 Signed-off-by: Phil Dibowitz <[email protected]>
1 parent a46cad9 commit 94ab49a

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

lib/ohai/plugins/filesystem.rb

-4
Original file line numberDiff line numberDiff line change
@@ -744,10 +744,6 @@ def collect_old_version(shell_outs)
744744
fs_data["by_mountpoint"] = by_mountpoint
745745
fs_data["by_pair"] = by_pair
746746

747-
# Chef 16 added 'filesystem2'
748-
# In Chef 17 we made 'filesystem' and 'filesystem2' match (both new-style)
749-
# In Chef 18 we will drop 'filesystem2'
750747
filesystem fs_data
751-
filesystem2 fs_data
752748
end
753749
end

spec/unit/plugins/windows/filesystem_spec.rb

-8
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@
9191
}.each do |k, v|
9292
expect(plugin[:filesystem]["by_pair"][",C:"][k]).to eq(v)
9393
expect(plugin[:filesystem]["by_pair"][",D:"][k]).to eq(v)
94-
expect(plugin[:filesystem2]["by_pair"][",C:"][k]).to eq(v)
95-
expect(plugin[:filesystem2]["by_pair"][",D:"][k]).to eq(v)
9694
end
9795
end
9896

@@ -106,7 +104,6 @@
106104
"encryption_status" => "FullyDecrypted",
107105
}.each do |k, v|
108106
expect(plugin[:filesystem]["by_pair"][",C:"][k]).to eq(v)
109-
expect(plugin[:filesystem2]["by_pair"][",C:"][k]).to eq(v)
110107
end
111108

112109
{
@@ -118,7 +115,6 @@
118115
"encryption_status" => "EncryptionInProgress",
119116
}.each do |k, v|
120117
expect(plugin[:filesystem]["by_pair"][",D:"][k]).to eq(v)
121-
expect(plugin[:filesystem2]["by_pair"][",D:"][k]).to eq(v)
122118
end
123119
end
124120
end
@@ -141,8 +137,6 @@
141137
}.each do |k, v|
142138
expect(plugin[:filesystem]["by_pair"]["volume 0,C:"][k]).to eq(v)
143139
expect(plugin[:filesystem]["by_pair"]["volume 1,D:"][k]).to eq(v)
144-
expect(plugin[:filesystem2]["by_pair"]["volume 0,C:"][k]).to eq(v)
145-
expect(plugin[:filesystem2]["by_pair"]["volume 1,D:"][k]).to eq(v)
146140
end
147141
end
148142

@@ -156,7 +150,6 @@
156150
"encryption_status" => "FullyDecrypted",
157151
}.each do |k, v|
158152
expect(plugin[:filesystem]["by_pair"]["volume 0,C:"][k]).to eq(v)
159-
expect(plugin[:filesystem2]["by_pair"]["volume 0,C:"][k]).to eq(v)
160153
end
161154

162155
{
@@ -168,7 +161,6 @@
168161
"encryption_status" => "EncryptionInProgress",
169162
}.each do |k, v|
170163
expect(plugin[:filesystem]["by_pair"]["volume 1,D:"][k]).to eq(v)
171-
expect(plugin[:filesystem2]["by_pair"]["volume 1,D:"][k]).to eq(v)
172164
end
173165
end
174166
end

0 commit comments

Comments
 (0)