Update the rootFses to be an array instead of a map#113
Update the rootFses to be an array instead of a map#113ivo1116 wants to merge 1 commit intocloudfoundry:mainfrom
Conversation
ameowlia
left a comment
There was a problem hiding this comment.
❓ are there any tests to show that it is now returning the rootFSes in order?
| gardenHealthcheckRootFS = rootFSPath | ||
| break | ||
| if len(rootFSes) > 0 { | ||
| gardenHealthcheckRootFS = rootFSes[len(rootFSes)-1] |
There was a problem hiding this comment.
This code changes the behavior (I think) from before.
Before it looks like gardenHealthcheckRootFS was set to the first rootFSPath. Now it looks like it is being set to the last last rootFSPath.
❓ What is the intention behind this change? Is there a test change to go with it?
|
Hello @ameowlia, The change does not modify the behaviour, since it was inconsistent anyway. executor/initializer/initializer.go Line 177 in 111288a The new implementation uses an array and thus we can rely on a consistent behaviour in terms of the positioning of the FSes. We take the last one, since we want to preserve the current ordering and to exclude the FS3 from the list of candidates for sidecar processes like healthcheck and envoy, since it does not work with the latest envoy binary. |
Summary
The PR makes sure the FSes are always used in a consistent way. The map was removed in favour of an array. The FSes should be stored in ascending order, ie. [ cflinuxfs3, cflinuxfs4 ]
The github issue: cloudfoundry/diego-release#983
Backward Compatibility
Breaking Change? No
No breaking changes, just making sure the fses are used in a consistent way