File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
services/secondary-storage/server/src/org/apache/cloudstack/storage/template Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -805,6 +805,10 @@ private List<String> listVolumes(String rootdir) {
805805 script .add ("-r" , rootdir );
806806 ZfsPathParser zpp = new ZfsPathParser (rootdir );
807807 script .execute (zpp );
808+ if (script .getExitValue () != 0 ) {
809+ s_logger .error ("Error while executing script " + script .toString ());
810+ throw new CloudRuntimeException ("Error while executing script " + script .toString ());
811+ }
808812 result .addAll (zpp .getPaths ());
809813 s_logger .info ("found " + zpp .getPaths ().size () + " volumes" + zpp .getPaths ());
810814 return result ;
@@ -817,6 +821,10 @@ private List<String> listTemplates(String rootdir) {
817821 script .add ("-r" , rootdir );
818822 ZfsPathParser zpp = new ZfsPathParser (rootdir );
819823 script .execute (zpp );
824+ if (script .getExitValue () != 0 ) {
825+ s_logger .error ("Error while executing script " + script .toString ());
826+ throw new CloudRuntimeException ("Error while executing script " + script .toString ());
827+ }
820828 result .addAll (zpp .getPaths ());
821829 s_logger .info ("found " + zpp .getPaths ().size () + " templates" + zpp .getPaths ());
822830 return result ;
You can’t perform that action at this time.
0 commit comments