arcgisscripting.ExecuteError: ERROR 001270: Consolidating the data failed. Failed to execute (StageService).
I'm having this exact same problem in 10.7.1. The exact same script on Windows will run succesfully in about 3 minutes, but running from ArcPy on ImageServer(Linux, Ubuntu 20.04) will result in this exact same error.
I think it's due to data registration paths getting mangled by StageService.
When I pull the method StageService_server out of the try blocks (from examples) I can get better errors. The error message prints out the paths to .sd and .sdd files, and everytime, my Linux .sd path gets converted to a Windows path. (Uses backslashes instead of forward-slashes). No matter what I do to my Linux paths, the StageService_server method will convert only the .sd path to Windows.