Batch Changes missing bind source path with Rancher Desktop

Issue Description

This article outlines the steps to resolve an issue encountered using Sourcegraph CLI to run a batch change with Rancher Desktop. The issue involves an error message, "docker: Error response from daemon: invalid mount config for type 'bind': bind source path does not exist", even when using the `-workspace volume` option.

 

Resolution:

After extensive troubleshooting, it was determined that the issue was related to the directory path for bind mounts and the type of mount used by Rancher Desktop. Follow these steps to resolve the issue:

Step 1: Set SRC_BATCH_TMP_DIR ENV Variable

- Set the environment variable `SRC_BATCH_TMP_DIR` to `/tmp/rancher-desktop`. This is crucial for proper directory configuration.

Step 2: Adjust Mount Type (if necessary)

- If changing the environment variable alone does not resolve the issue, consider changing the Docker mount type. In this case, the user changed it from 9p to reverse-sshfs, which is the default option in Rancher Desktop.

Step 3: Run Batch Change

- Execute the preview or apply command with the `-cache` option, using the `SRC_BATCH_TMP_DIR` variable to run the batch change:
src batch preview -f spec.batch.yaml -cache $SRC_BATCH_TMP_DIR

 

Additional Information:

If the steps outlined above do not resolve the issue, you may want to explore the following: 

  • Confirm whether Docker is running within a virtual machine (VM)
  • Users can run the batch change command with the `-keep-logs` flag to retain logs after executing steps, which can be helpful for further troubleshooting or analysis.

 

 

Was this article helpful?
0 out of 0 found this helpful

Articles in this section