bosh-linux-stemcell-builder icon indicating copy to clipboard operation
bosh-linux-stemcell-builder copied to clipboard

Update Id Device Path Resolver logic in the agent

Open jpalermo opened this issue 1 year ago • 0 comments

The current logic is very rigid and inflexible: https://github.com/cloudfoundry/bosh-agent/blob/232da0ab1cbc633351996a52f34424f5989e54c9/infrastructure/devicepathresolver/id_device_path_resolver.go#L71-L97

We've run into problems where the disk id on Openstack is often truncated to 20 characters, but newer versions of Openstack may have the full disk id. This makes it impossible using the current logic for the CPI or the Agent to make the correct decision.

It would be better if the stemcell could provide a list of transformations to try in a preferred order and the agent smartly chooses the best match.

This is a bit tricky because you have to be careful of the partitions that are also listed in /dev/disk/by-id as well as the current retry logic which might make it difficult to be sure you are using the correct matching pattern.

jpalermo avatar Aug 24 '23 20:08 jpalermo