Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scsi_volume_id_device_path_resolver flaky on ubuntu jammy
We've gotten reports of intermittent agent_timed outs for deployments on vsphere. These we're caused by the agent failing to setup the ephemeral disk attached to the VM because the resolver code never entered the if statement: `if path.Base(rootDevicePath) == "sda"` Investigation on the VM showed that: `ls /sys/bus/scsi/devices/32:0:0:0/block` => `sdb` `ls /sys/bus/scsi/devices/32:0:1:0/block` => `sda` We relied on the root disk to always be exposed at `/dev/sda`. Which has worked for ages (the code essentially didn't change since 2014) but actually was always problematic since it assumes that naming of `/dev/sd*` is deterministic. Which according to https://www.suse.com/support/kb/doc/?id=00001844 was the case until kernel version 5.3 the kernel commit can be found here: torvalds/linux@f049cf1 The reliance seems unnecessary though, since both disks (os-root from the stemcell and the ephemeral disk) are associated with the same scsi host. fixes: ``` [linuxPlatform] 2022/12/02 13:56:04 INFO - Setting up raw ephemeral disks [File System] 2022/12/02 13:56:04 DEBUG - Glob '/sys/bus/scsi/devices/*:0:0:0/block/*' [linuxPlatform] 2022/12/02 13:56:04 DEBUG - Error getting ephermeral disk path Zero length hostID [linuxPlatform] 2022/12/02 13:56:04 INFO - Setting up ephemeral disk... [File System] 2022/12/02 13:56:04 DEBUG - Glob '/var/vcap/data/*' [File System] 2022/12/02 13:56:04 DEBUG - Making dir /var/vcap/data with perm 0750 [main] 2022/12/02 13:56:04 ERROR - App setup Running bootstrap: Setting up ephemeral disk: No ephemeral disk found, cannot use root partition as ephemeral disk [main] 2022/12/02 13:56:04 ERROR - Agent exited with error: Running bootstrap: Setting up ephemeral disk: No ephemeral disk found, cannot use root partition as ephemeral disk [arping] 2022/12/02 13:56:04 DEBUG - Broadcasting MAC addresses [File System] 2022/12/02 13:56:04 DEBUG - Checking if file exists /sys/class/net/eth0 [main] 2022/12/02 13:56:04 DEBUG - Starting agent [File System] 2022/12/02 13:56:04 DEBUG - Reading file /var/vcap/bosh/agent.json [File System] 2022/12/02 13:56:04 DEBUG - Read content ```
- Loading branch information