Skip null or missing URLs for S3

This commit is contained in:
Daman Arora 2026-01-14 14:12:31 -05:00
parent 387f958df1
commit dd39393400
1 changed files with 4 additions and 0 deletions

View File

@ -1247,6 +1247,10 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar
protected void addSecondaryStorageServerAddressToBuffer(StringBuilder buffer, List<DataStore> dataStores, String vmName) {
List<String> addresses = new ArrayList<>();
for (DataStore dataStore: dataStores) {
// S3 and other object stores may not have a URL, so better to skip them
if (dataStore == null || dataStore.getTO() == null || dataStore.getTO().getUrl() == null) {
continue;
}
String url = dataStore.getTO().getUrl();
String[] urlArray = url.split("/");